1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

tests/join: test default check order behaviour

This commit is contained in:
Cecylia Bocovich 2022-01-22 17:50:13 -05:00
parent 594157d1e0
commit c8f9ea5b15
No known key found for this signature in database
GPG key ID: 009DE379FD9B7B90
2 changed files with 21 additions and 1 deletions

View file

@ -295,6 +295,20 @@ fn wrong_line_order() {
)); ));
} }
#[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
));
}
#[test] #[test]
fn headers() { fn headers() {
new_ucmd!() new_ucmd!()

6
tests/fixtures/join/fields_5.txt vendored Normal file
View file

@ -0,0 +1,6 @@
1
2
5
3
6
4