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

Function test_pattern_double_asterisk

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

Source from the content-addressed store, hash-verified

806
807 #[test]
808 fn test_pattern_double_asterisk() {
809 let temp = TempDir::new().unwrap();
810 let ignore_path = temp.path().join(".atomicignore");
811 std::fs::write(&ignore_path, "**/temp\n").unwrap();
812
813 let rules = IgnoreRules::load(temp.path());
814
815 assert!(rules.is_ignored(Path::new("temp"), false));
816 assert!(rules.is_ignored(Path::new("a/temp"), false));
817 assert!(rules.is_ignored(Path::new("a/b/c/temp"), false));
818 }
819
820 #[test]
821 fn test_pattern_leading_slash() {

Callers

nothing calls this directly

Calls 3

writeFunction · 0.50
unwrapMethod · 0.45
pathMethod · 0.45

Tested by

no test coverage detected