tests/rustdoc-json: replace $.paths[*][? with $.paths[?

This fixes all 3 of these tests. Done automatically in VSCode.
This commit is contained in:
Alona Enraght-Moony 2025-03-20 23:02:39 +00:00
parent 7ab71c417b
commit 42631d8027
3 changed files with 6 additions and 6 deletions

View file

@ -38,7 +38,7 @@ pub type U2 = InPubMod2;
pub type U3 = InPubMod3;
// Check we only have paths for structs at their original path
//@ ismany "$.paths[*][?(@.crate_id==0 && @.kind=='struct')].path" '["path_name", "priv_mod", "InPrivMod"]' '["path_name", "pub_mod", "InPubMod"]'
//@ ismany "$.paths[?(@.crate_id==0 && @.kind=='struct')].path" '["path_name", "priv_mod", "InPrivMod"]' '["path_name", "pub_mod", "InPubMod"]'
pub use defines_and_reexports::{InPrivMod as XPrivMod, InPubMod as XPubMod};
use defines_and_reexports::{InPrivMod as XPrivMod2, InPubMod as XPubMod2};

View file

@ -14,7 +14,7 @@ pub use inner::Public;
//@ ismany "$.index[?(@.name=='simple_private')].inner.module.items[*]" $use_id
// Test for https://github.com/rust-lang/rust/issues/135309
//@ has "$.paths[*][?(@.kind=='module')].path" '["simple_private"]'
//@ has "$.paths[?(@.kind=='module')].path" '["simple_private"]'
//@ !has "$.paths[*].path" '["simple_private", "inner"]'
//@ has "$.paths[*][?(@.kind=='struct')].path" '["simple_private", "inner", "Public"]'
//@ has "$.paths[?(@.kind=='struct')].path" '["simple_private", "inner", "Public"]'
//@ !has "$.paths[*].path" '["simple_private", "Public"]'

View file

@ -15,7 +15,7 @@ pub use inner::Public;
//@ ismany "$.index[?(@.name=='simple_public')].inner.module.items[*]" $import_id $inner_id
//@ has "$.paths[*][?(@.kind=='module')].path" '["simple_public"]'
//@ has "$.paths[*][?(@.kind=='module')].path" '["simple_public", "inner"]'
//@ has "$.paths[*][?(@.kind=='struct')].path" '["simple_public", "inner", "Public"]'
//@ has "$.paths[?(@.kind=='module')].path" '["simple_public"]'
//@ has "$.paths[?(@.kind=='module')].path" '["simple_public", "inner"]'
//@ has "$.paths[?(@.kind=='struct')].path" '["simple_public", "inner", "Public"]'
//@ !has "$.paths[*].path" '["simple_public", "Public"]'