MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_ignore_rules_reload

Function test_ignore_rules_reload

atomic-repository/src/ignore.rs:538–554  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

536
537 #[test]
538 fn test_ignore_rules_reload() {
539 let temp = TempDir::new().unwrap();
540 let ignore_path = temp.path().join(".atomicignore");
541
542 // Start with no ignore file
543 let mut rules = IgnoreRules::load(temp.path());
544 assert!(!rules.has_local_rules());
545 assert!(!rules.is_ignored(Path::new("target"), true));
546
547 // Create ignore file
548 std::fs::write(&ignore_path, "target/\n").unwrap();
549
550 // Reload and verify
551 rules.reload();
552 assert!(rules.has_local_rules());
553 assert!(rules.is_ignored(Path::new("target"), true));
554 }
555
556 #[test]
557 fn test_ignore_rules_repo_root() {

Callers

nothing calls this directly

Calls 4

writeFunction · 0.85
reloadMethod · 0.80
unwrapMethod · 0.45
pathMethod · 0.45

Tested by

no test coverage detected