1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-09-16 19:56:17 +00:00

Merge pull request #2908 from cohosh/join_chkodr_default

join: fix default check order behaviour
This commit is contained in:
Sylvestre Ledru 2022-01-25 13:47:34 +01:00 committed by GitHub
commit 1415ebc263
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 52 additions and 14 deletions

View file

@ -289,7 +289,21 @@ fn wrong_line_order() {
.arg("fields_4.txt")
.fails()
.stderr_is(&format!(
"{} {}: fields_4.txt:5: is not sorted: 11 g 5 gh",
"{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
));

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

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