Answer stability round 2: 0 🔴, 1 🟡 (0 misread); keep a Rust file whose modules cannot be told apart as Haiku left it where the planted file has no module
CI / tests (pull_request) Successful in 6m22s
CI / tests (pull_request) Successful in 6m22s
This commit is contained in:
@@ -735,6 +735,13 @@ class CheckedTreeTest(unittest.TestCase):
|
||||
checked_tree(planted, copy, str(self.root / "check"))
|
||||
self.assertEqual(self.held("check"), {"src/lib.rs": "fn a() { 1 }\n#[cfg(test)]\nmod tests { fn t() {} }\n"})
|
||||
|
||||
def test_takes_a_rust_file_the_fix_added_as_it_is_where_its_modules_cannot_be_told_apart(self):
|
||||
planted = self.tree("planted", {"src/lib.rs": "fn a() {}\n"})
|
||||
added = "#[cfg(test)]\nmod tests {}\nfn b() { #[cfg(test)] mod tests {} }\n"
|
||||
copy = self.tree("copy", {"src/lib.rs": "fn a() {}\n", "src/new.rs": added})
|
||||
checked_tree(planted, copy, str(self.root / "check"))
|
||||
self.assertEqual(self.held("check")["src/new.rs"], added)
|
||||
|
||||
def test_leaves_a_rust_link_as_a_link_whatever_it_points_at(self):
|
||||
planted = self.tree("planted", {"z.rs": "fn a() {}\n#[cfg(test)]\nmod tests {}\n", "a.txt": "text"})
|
||||
copy = self.tree("copy", {"a.txt": "text"})
|
||||
|
||||
Reference in New Issue
Block a user