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

Function test_pattern_question_mark

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

Source from the content-addressed store, hash-verified

792
793 #[test]
794 fn test_pattern_question_mark() {
795 let temp = TempDir::new().unwrap();
796 let ignore_path = temp.path().join(".atomicignore");
797 std::fs::write(&ignore_path, "file?.txt\n").unwrap();
798
799 let rules = IgnoreRules::load(temp.path());
800
801 assert!(rules.is_ignored(Path::new("file1.txt"), false));
802 assert!(rules.is_ignored(Path::new("filea.txt"), false));
803 assert!(!rules.is_ignored(Path::new("file.txt"), false));
804 assert!(!rules.is_ignored(Path::new("file12.txt"), false));
805 }
806
807 #[test]
808 fn test_pattern_double_asterisk() {

Callers

nothing calls this directly

Calls 3

writeFunction · 0.50
unwrapMethod · 0.45
pathMethod · 0.45

Tested by

no test coverage detected