()
| 1223 | #[test] |
| 1224 | #[file_serial] |
| 1225 | fn test_add_cannot_add_atomic_dir() { |
| 1226 | let _guard = DirGuard::new(); |
| 1227 | |
| 1228 | let temp_dir = tempfile::tempdir().unwrap(); |
| 1229 | let repo_path = temp_dir.path(); |
| 1230 | |
| 1231 | // Initialize repository |
| 1232 | { |
| 1233 | let _repo = Repository::init(repo_path).unwrap(); |
| 1234 | } |
| 1235 | |
| 1236 | std::env::set_current_dir(repo_path).unwrap(); |
| 1237 | |
| 1238 | let add = Add::new().with_files(vec![".atomic"]); |
| 1239 | let result = add.run(); |
| 1240 | |
| 1241 | // Should succeed but skip the .atomic directory (it's ignored) |
| 1242 | // The command gracefully skips ignored paths rather than erroring |
| 1243 | assert!(result.is_ok()); |
| 1244 | } |
| 1245 | |
| 1246 | // Edge Case Tests |
| 1247 |
nothing calls this directly
no test coverage detected