mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-12-05 05:22:58 -05:00
Tests: check the prefixed export folder holds two entries before checking each is a file
This commit is contained in:
1 parent
ddfc1c4c7a
commit
2101a3af56
1 file changed
+3
-1
@@ -341,7 +341,9 @@ fn a_file_name_prefix_stays_in_the_folder() {
|
||||
assert!(out.len() == 2 && out.iter().all(|n| n.starts_with("web-")), "{out:?}");
|
||||
let up = names(&dir.join("up"));
|
||||
assert!(up.len() == 2 && up.iter().all(|n| n.starts_with("..-x-")), "{up:?}");
|
||||
assert!(std::fs::read_dir(dir.join("up")).unwrap().all(|e| e.unwrap().file_type().unwrap().is_file()), "no folder was made");
|
||||
let entries: Vec<_> = std::fs::read_dir(dir.join("up")).unwrap().map(|e| e.unwrap()).collect();
|
||||
assert_eq!(entries.len(), 2, "{entries:?}");
|
||||
assert!(entries.iter().all(|e| e.file_type().unwrap().is_file()), "no folder was made");
|
||||
assert!(!dir.join("x").exists(), "nothing is written beside the folder");
|
||||
let _ = std::fs::remove_dir_all(base);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user