mirror of
https://github.com/ouch-org/ouch.git
synced 2025-06-07 03:55:28 +00:00
fix: assert stdout lines as BTreeSet instead raw String
This commit is contained in:
parent
0cd8485028
commit
8000b0cd0c
@ -1,10 +1,13 @@
|
|||||||
---
|
---
|
||||||
source: tests/ui.rs
|
source: tests/ui.rs
|
||||||
expression: "run_ouch(&decompress_command, dir)"
|
expression: stdout_lines
|
||||||
---
|
---
|
||||||
[INFO] extracted ( 0.00 B) "outputs/inputs"
|
{
|
||||||
[INFO] extracted ( 0.00 B) "outputs/inputs/input3"
|
"",
|
||||||
[INFO] extracted ( 0.00 B) "outputs/inputs/input2"
|
"[INFO] Files unpacked: 4",
|
||||||
[INFO] extracted ( 0.00 B) "outputs/inputs/input"
|
"[INFO] Successfully decompressed archive in <TMP_DIR>/outputs",
|
||||||
[INFO] Successfully decompressed archive in <TMP_DIR>/outputs
|
"[INFO] extracted ( 0.00 B) \"outputs/inputs\"",
|
||||||
[INFO] Files unpacked: 4
|
"[INFO] extracted ( 0.00 B) \"outputs/inputs/input\"",
|
||||||
|
"[INFO] extracted ( 0.00 B) \"outputs/inputs/input2\"",
|
||||||
|
"[INFO] extracted ( 0.00 B) \"outputs/inputs/input3\"",
|
||||||
|
}
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
#[macro_use]
|
#[macro_use]
|
||||||
mod utils;
|
mod utils;
|
||||||
|
|
||||||
use std::{ffi::OsStr, io, path::Path, process::Output};
|
use std::{collections::BTreeSet, ffi::OsStr, io, path::Path, process::Output};
|
||||||
|
|
||||||
use insta::assert_snapshot as ui;
|
use insta::assert_snapshot as ui;
|
||||||
use regex::Regex;
|
use regex::Regex;
|
||||||
@ -159,7 +159,9 @@ fn ui_test_ok_decompress_multiple_files() {
|
|||||||
run_ouch(&compress_command, dir);
|
run_ouch(&compress_command, dir);
|
||||||
|
|
||||||
let decompress_command = format!("ouch decompress output.tar.zst --dir {}", outputs_dir.to_str().unwrap());
|
let decompress_command = format!("ouch decompress output.tar.zst --dir {}", outputs_dir.to_str().unwrap());
|
||||||
ui!(run_ouch(&decompress_command, dir));
|
let stdout = run_ouch(&decompress_command, dir);
|
||||||
|
let stdout_lines = stdout.split('\n').collect::<BTreeSet<_>>();
|
||||||
|
insta::assert_debug_snapshot!(stdout_lines);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user