Add regression test for span 1-indexed check
This commit is contained in:
parent
59477a8ab2
commit
ba9a008d90
2 changed files with 6 additions and 2 deletions
|
@ -15,8 +15,8 @@ impl Foo {
|
|||
}
|
||||
|
||||
// Testing spans, so all tests below code
|
||||
//@ is "$.index[?(@.docs=='has span')].span.begin" "[13, 0]"
|
||||
//@ is "$.index[?(@.docs=='has span')].span.end" "[15, 1]"
|
||||
//@ is "$.index[?(@.docs=='has span')].span.begin" "[13, 1]"
|
||||
//@ is "$.index[?(@.docs=='has span')].span.end" "[15, 2]"
|
||||
// FIXME: this doesn't work due to https://github.com/freestrings/jsonpath/issues/91
|
||||
// is "$.index[?(@.inner.impl.is_synthetic==true)].span" null
|
||||
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]"
|
Loading…
Add table
Add a link
Reference in a new issue