Add regression test for span 1-indexed check
This commit is contained in:
@@ -15,8 +15,8 @@ impl Foo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Testing spans, so all tests below code
|
// Testing spans, so all tests below code
|
||||||
//@ is "$.index[?(@.docs=='has span')].span.begin" "[13, 0]"
|
//@ is "$.index[?(@.docs=='has span')].span.begin" "[13, 1]"
|
||||||
//@ is "$.index[?(@.docs=='has span')].span.end" "[15, 1]"
|
//@ is "$.index[?(@.docs=='has span')].span.end" "[15, 2]"
|
||||||
// FIXME: this doesn't work due to https://github.com/freestrings/jsonpath/issues/91
|
// FIXME: this doesn't work due to https://github.com/freestrings/jsonpath/issues/91
|
||||||
// is "$.index[?(@.inner.impl.is_synthetic==true)].span" null
|
// is "$.index[?(@.inner.impl.is_synthetic==true)].span" null
|
||||||
pub struct Foo;
|
pub struct Foo;
|
||||||
|
|||||||
4
tests/rustdoc-json/span.rs
Normal file
4
tests/rustdoc-json/span.rs
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
pub mod bar {}
|
||||||
|
// This test ensures that spans are 1-indexed.
|
||||||
|
//@ is "$.index[?(@.name=='span')].span.begin" "[1, 1]"
|
||||||
|
//@ is "$.index[?(@.name=='bar')].span.begin" "[1, 1]"
|
||||||
Reference in New Issue
Block a user