()
| 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() { |