test: harden migration and UI coverage
This commit is contained in:
1 parent
9a390fd7a4
commit
e21f68fd7c
6 files changed
+146
-15
No files matched your search
@@ -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}");
|
||||
}
|
||||
|
||||
|
||||
@@ -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]
|
||||
|
||||
Reference in new issue
Block a user