()
| 1087 | #[test] |
| 1088 | #[file_serial] |
| 1089 | fn test_add_run_with_force() { |
| 1090 | let _guard = DirGuard::new(); |
| 1091 | |
| 1092 | let temp_dir = tempfile::tempdir().unwrap(); |
| 1093 | let repo_path = temp_dir.path(); |
| 1094 | |
| 1095 | // Initialize repository |
| 1096 | { |
| 1097 | let _repo = Repository::init(repo_path).unwrap(); |
| 1098 | } |
| 1099 | |
| 1100 | // Create a file |
| 1101 | std::fs::write(repo_path.join("test.txt"), "Hello").unwrap(); |
| 1102 | |
| 1103 | std::env::set_current_dir(repo_path).unwrap(); |
| 1104 | |
| 1105 | let add = Add::new().with_files(vec!["test.txt"]).with_force(true); |
| 1106 | let result = add.run(); |
| 1107 | |
| 1108 | assert!(result.is_ok(), "Add with force failed: {:?}", result.err()); |
| 1109 | } |
| 1110 | |
| 1111 | #[test] |
| 1112 | #[file_serial] |
nothing calls this directly
no test coverage detected