()
| 1179 | #[test] |
| 1180 | #[serial] |
| 1181 | fn test_add_with_unicode_filename() { |
| 1182 | let _guard = DirGuard::new(); |
| 1183 | |
| 1184 | let temp_dir = tempfile::tempdir().unwrap(); |
| 1185 | let repo_path = temp_dir.path(); |
| 1186 | |
| 1187 | // Initialize repository |
| 1188 | { |
| 1189 | let _repo = Repository::init(repo_path).unwrap(); |
| 1190 | } |
| 1191 | |
| 1192 | // Create a file with unicode name |
| 1193 | std::fs::write(repo_path.join("文件.txt"), "内容").unwrap(); |
| 1194 | |
| 1195 | std::env::set_current_dir(repo_path).unwrap(); |
| 1196 | |
| 1197 | let add = Add::new().with_files(vec!["文件.txt"]); |
| 1198 | let result = add.run(); |
| 1199 | |
| 1200 | assert!( |
| 1201 | result.is_ok(), |
| 1202 | "Add unicode file failed: {:?}", |
| 1203 | result.err() |
| 1204 | ); |
| 1205 | } |
| 1206 | |
| 1207 | #[test] |
| 1208 | #[serial] |
nothing calls this directly
no test coverage detected