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

Function test_pattern_asterisk

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

Source from the content-addressed store, hash-verified

779
780 #[test]
781 fn test_pattern_asterisk() {
782 let temp = TempDir::new().unwrap();
783 let ignore_path = temp.path().join(".atomicignore");
784 std::fs::write(&ignore_path, "*.o\n").unwrap();
785
786 let rules = IgnoreRules::load(temp.path());
787
788 assert!(rules.is_ignored(Path::new("main.o"), false));
789 assert!(rules.is_ignored(Path::new("lib.o"), false));
790 assert!(!rules.is_ignored(Path::new("main.c"), false));
791 }
792
793 #[test]
794 fn test_pattern_question_mark() {

Callers

nothing calls this directly

Calls 3

writeFunction · 0.50
unwrapMethod · 0.45
pathMethod · 0.45

Tested by

no test coverage detected