summary refs log tree commit diff
path: root/tests/rustdoc-json/span.rs
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2025-04-16 15:28:28 +0200
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2025-04-18 20:32:40 +0200
commitba9a008d90ad7b9c11379a00766f9e4ebbcdc126 (patch)
tree123f20138051987165ada3d720e2e13bf3476c3d /tests/rustdoc-json/span.rs
parent59477a8ab21480a5c3da0313ef5a235091d8cbee (diff)
downloadrust-ba9a008d90ad7b9c11379a00766f9e4ebbcdc126.tar.gz
rust-ba9a008d90ad7b9c11379a00766f9e4ebbcdc126.zip
Add regression test for span 1-indexed check
Diffstat (limited to 'tests/rustdoc-json/span.rs')
-rw-r--r--tests/rustdoc-json/span.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/rustdoc-json/span.rs b/tests/rustdoc-json/span.rs
new file mode 100644
index 00000000000..c96879d0e68
--- /dev/null
+++ b/tests/rustdoc-json/span.rs
@@ -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]"