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

Function test_empty_ignore_file

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

Source from the content-addressed store, hash-verified

1015
1016 #[test]
1017 fn test_empty_ignore_file() {
1018 let temp = TempDir::new().unwrap();
1019 let ignore_path = temp.path().join(".atomicignore");
1020 std::fs::write(&ignore_path, "").unwrap();
1021
1022 let rules = IgnoreRules::load(temp.path());
1023
1024 // Empty file should still count as having local rules
1025 assert!(rules.has_local_rules());
1026 assert!(!rules.is_ignored(Path::new("anything.txt"), false));
1027 }
1028
1029 #[test]
1030 fn test_comments_only_ignore_file() {

Callers

nothing calls this directly

Calls 3

writeFunction · 0.50
unwrapMethod · 0.45
pathMethod · 0.45

Tested by

no test coverage detected