diff options
author | andy.boot <bootandy@gmail.com> | 2024-01-29 22:17:16 +0000 |
---|---|---|
committer | andy.boot <bootandy@gmail.com> | 2024-01-29 22:29:11 +0000 |
commit | 5ba26ee88182beb50bf38476938b5247744ed667 (patch) | |
tree | 725362e9f29fb3f83e6a682c0c8ded3f83841535 | |
parent | 44dac2006b6acd89d3ff79de45dc4b2733709f80 (diff) |
tests: fix test test_apparent_sizeclean
my 'many' line is: 4.0K ┌─┴ many │ the characters 4.0K are 4 chars.
photosheep's space for 'many' is '44B' which is 3 chars and so my system
needs 1 more char. Hence there is one more space character padding
floating round.
-rw-r--r-- | tests/test_exact_output.rs | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/tests/test_exact_output.rs b/tests/test_exact_output.rs index 1cc06f2..c2e7f88 100644 --- a/tests/test_exact_output.rs +++ b/tests/test_exact_output.rs @@ -54,7 +54,11 @@ fn exact_output_test<T: AsRef<OsStr>>(valid_outputs: Vec<String>, command_args: let will_fail = valid_outputs.iter().any(|i| output.contains(i)); if !will_fail { - eprintln!("output:\n{}\ndoes not contain any of:\n{:?}",output, valid_outputs.iter()); + eprintln!( + "output:\n{}\ndoes not contain any of:\n{}", + output, + valid_outputs.join("\n\n") + ); } assert!(will_fail) } @@ -202,12 +206,19 @@ pub fn test_apparent_size() { fn apparent_size_output() -> Vec<String> { // The apparent directory sizes are too unpredictable and system dependent to try and match - let files = r#" + let one_space_before = r#" + 0B ┌── a_file + 6B ├── hello_file + "# + .trim() + .to_string(); + + let two_space_before = r#" 0B ┌── a_file 6B ├── hello_file "# .trim() .to_string(); - vec![files] + vec![one_space_before, two_space_before] } |