test: harden migration and UI coverage

This commit is contained in:
objz committed 2026-07-27 00:37:48 +02:00
1 parent 9a390fd7a4
commit e21f68fd7c
6 files changed
+146 -15

No files matched your search

+2 -1
View File
@@ -253,7 +253,8 @@ mod tests {
#[test]
fn detect_format_errors_on_missing_file() {
let err = detect_format(Path::new("/nonexistent/pack.zip")).unwrap_err();
let tmp = tempfile::tempdir().unwrap();
let err = detect_format(&tmp.path().join("missing.zip")).unwrap_err();
assert!(err.contains("Cannot open"), "got: {err}");
}
+2 -1
View File
@@ -438,7 +438,8 @@ mod tests {
#[test]
fn parse_add_opens_returns_none_for_missing_file() {
assert!(parse_add_opens(Path::new("/nonexistent/x.zip")).is_none());
let tmp = tempfile::tempdir().unwrap();
assert!(parse_add_opens(&tmp.path().join("missing.zip")).is_none());
}
#[test]