()
| 1151 | #[test] |
| 1152 | #[serial] |
| 1153 | fn test_add_with_path_containing_spaces() { |
| 1154 | let _guard = DirGuard::new(); |
| 1155 | |
| 1156 | let temp_dir = tempfile::tempdir().unwrap(); |
| 1157 | let repo_path = temp_dir.path(); |
| 1158 | |
| 1159 | // Initialize repository |
| 1160 | { |
| 1161 | let _repo = Repository::init(repo_path).unwrap(); |
| 1162 | } |
| 1163 | |
| 1164 | // Create a file with spaces in name |
| 1165 | std::fs::write(repo_path.join("my file.txt"), "content").unwrap(); |
| 1166 | |
| 1167 | std::env::set_current_dir(repo_path).unwrap(); |
| 1168 | |
| 1169 | let add = Add::new().with_files(vec!["my file.txt"]); |
| 1170 | let result = add.run(); |
| 1171 | |
| 1172 | assert!( |
| 1173 | result.is_ok(), |
| 1174 | "Add file with spaces failed: {:?}", |
| 1175 | result.err() |
| 1176 | ); |
| 1177 | } |
| 1178 | |
| 1179 | #[test] |
| 1180 | #[serial] |
nothing calls this directly
no test coverage detected