()
| 1208 | #[test] |
| 1209 | #[serial] |
| 1210 | fn test_status_run_short_format() { |
| 1211 | let _guard = DirGuard::new(); |
| 1212 | |
| 1213 | let temp_dir = tempfile::tempdir().unwrap(); |
| 1214 | let repo_path = temp_dir.path(); |
| 1215 | |
| 1216 | // Initialize a repository and drop handle to release lock |
| 1217 | { |
| 1218 | let repo_result = Repository::init(repo_path); |
| 1219 | assert!( |
| 1220 | repo_result.is_ok(), |
| 1221 | "Failed to init repository: {:?}", |
| 1222 | repo_result.err() |
| 1223 | ); |
| 1224 | } |
| 1225 | |
| 1226 | // Change to repo directory |
| 1227 | std::env::set_current_dir(repo_path).unwrap(); |
| 1228 | |
| 1229 | let status = Status::new().with_short(true); |
| 1230 | let result = status.run(); |
| 1231 | |
| 1232 | assert!( |
| 1233 | result.is_ok(), |
| 1234 | "Status short command failed: {:?}", |
| 1235 | result.err() |
| 1236 | ); |
| 1237 | } |
| 1238 | |
| 1239 | #[test] |
| 1240 | #[serial] |
nothing calls this directly
no test coverage detected