Test that rust_test_files gathers the files of every declaring file
This commit is contained in:
@@ -839,6 +839,7 @@ class CheckedTreeTest(unittest.TestCase):
|
||||
"in the folder of a module file": ({"src/pick.rs": self.DECLARING, "src/pick/tests.rs": ""}, {"src/pick/tests.rs"}),
|
||||
"beside another crate root": ({"src/bin/tool.rs": self.DECLARING, "src/bin/tests.rs": ""}, {"src/bin/tests.rs"}),
|
||||
"beside a mod.rs": ({"src/pick/mod.rs": self.DECLARING, "src/pick/tests.rs": ""}, {"src/pick/tests.rs"}),
|
||||
"declared in two files": ({"src/lib.rs": self.DECLARING, "src/tests.rs": "", "src/pick.rs": self.DECLARING.replace("tests", "checks"), "src/pick/checks.rs": ""}, {"src/tests.rs", "src/pick/checks.rs"}),
|
||||
"declared by no file": ({"src/lib.rs": "fn a() {}\n", "src/tests.rs": ""}, set()),
|
||||
}
|
||||
for name, (files, found) in cases.items():
|
||||
|
||||
Reference in New Issue
Block a user