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

Function test_pattern_leading_slash

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

Source from the content-addressed store, hash-verified

819
820 #[test]
821 fn test_pattern_leading_slash() {
822 let temp = TempDir::new().unwrap();
823 let ignore_path = temp.path().join(".atomicignore");
824 std::fs::write(&ignore_path, "/root_only.txt\n").unwrap();
825
826 let rules = IgnoreRules::load(temp.path());
827
828 assert!(rules.is_ignored(Path::new("root_only.txt"), false));
829 assert!(!rules.is_ignored(Path::new("sub/root_only.txt"), false));
830 }
831
832 #[test]
833 fn test_pattern_bracket_range() {

Callers

nothing calls this directly

Calls 3

writeFunction · 0.50
unwrapMethod · 0.45
pathMethod · 0.45

Tested by

no test coverage detected