mirror of
https://github.com/ouch-org/ouch.git
synced 2025-06-06 11:35:45 +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
|
||||
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] extracted ( 0.00 B) "outputs/inputs/input"
|
||||
[INFO] Successfully decompressed archive in <TMP_DIR>/outputs
|
||||
[INFO] Files unpacked: 4
|
||||
{
|
||||
"",
|
||||
"[INFO] Files unpacked: 4",
|
||||
"[INFO] Successfully decompressed archive in <TMP_DIR>/outputs",
|
||||
"[INFO] extracted ( 0.00 B) \"outputs/inputs\"",
|
||||
"[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]
|
||||
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 regex::Regex;
|
||||
@ -159,7 +159,9 @@ fn ui_test_ok_decompress_multiple_files() {
|
||||
run_ouch(&compress_command, dir);
|
||||
|
||||
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]
|
||||
|
Loading…
x
Reference in New Issue
Block a user