diff --git a/tests/by-util/test_join.rs b/tests/by-util/test_join.rs index 3bf296290..743eda512 100644 --- a/tests/by-util/test_join.rs +++ b/tests/by-util/test_join.rs @@ -289,7 +289,21 @@ fn wrong_line_order() { .arg("fields_4.txt") .fails() .stderr_is(&format!( - "{0} {1}: fields_4.txt:5: is not sorted: 11 g 5 gh\n{0} {1}: input is not in sorted order", + "{0} {1}: fields_4.txt:5: is not sorted: 11 g 5 gh\n{0} {1}: input is not in sorted order", + ts.bin_path.to_string_lossy(), + ts.util_name + )); +} + +#[test] +fn both_files_wrong_line_order() { + let ts = TestScenario::new(util_name!()); + new_ucmd!() + .arg("fields_4.txt") + .arg("fields_5.txt") + .fails() + .stderr_is(&format!( + "{0} {1}: fields_5.txt:4: is not sorted: 3\n{0} {1}: fields_4.txt:5: is not sorted: 11 g 5 gh\n{0} {1}: input is not in sorted order", ts.bin_path.to_string_lossy(), ts.util_name )); diff --git a/tests/fixtures/join/fields_5.txt b/tests/fixtures/join/fields_5.txt new file mode 100644 index 000000000..13b9b0736 --- /dev/null +++ b/tests/fixtures/join/fields_5.txt @@ -0,0 +1,6 @@ +1 +2 +5 +3 +6 +4