Commit Graph
34 Commits
Author SHA1 Message Date
Daniel HofstetterandGitHub 25a5b3f0b9 join: use show_error instead of eprintln (#11932) 2026-04-23 09:41:19 +02:00
✿ Fleur de BlueandGitHub 2a2cafdbd4 Re-enable unused_qualifications lint (#10571) 2026-02-03 21:55:21 +01:00
98d3dbad4e join: consider locale collation in field comparison (#9982)
Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
2026-01-20 14:24:30 +01:00
5d9afe8bc7 add tests with emoji for various commands (#8545)
* add tests with emoji for various commands

* test/ls: use touch instead of an empty write

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>

---------

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2025-09-03 09:57:04 +02:00
Sylvestre Ledru 1c5b95d1bb non-utf8: address review commits 2025-08-14 10:54:17 +02:00
Sylvestre Ledru 1056ebe0d5 Fix join to handle non-UTF-8 filenames 2025-08-14 10:52:24 +02:00
Sylvestre Ledru a0179ea239 uutests: adjust the tests to use them 2025-03-28 21:40:31 +01:00
Sylvestre Ledru 18cb7dcf9e Use the new function fails_with_code
Done with
```
$ perl -0777 -i -pe 's/([ \t]+)\.fails\(\)[ \t]*\n[ \t]+\.no_stdout\(\)[ \t]*\n[ \t]+\.code_is\(([0-9]+)\);/\1.fails_with_code(\2)\n\1.no_stdout();/gs' *rs
$ sed -i -e "s|.fails()(.*).code_is(|.fails_with_code(|g" *rs
$ perl -0777 -i -pe 's/([ \t]+)\.fails\(\)[ \t]*\n[ \t]+\.code_is\(([0-9]+)\);/\1.fails_with_code(\2);/gs' *rs
$ perl -0777 -i -pe 's/([ \t]+)\.fails\(\)(.*?)[ \t]+\.code_is\(([0-9]+)\);/\1.fails_with_code(\3)\2;/gs' *rs
...
```
2025-03-01 17:26:20 +01:00
Justin TraceyandGitHub a51a731704 join: add support for multibyte separators (#6736)
* join: add test for multibyte separators

* join: implement support for multibyte separators

* join: use a trait instead of an enum for separator

* join: test whitespace merging
2024-10-06 11:48:08 +02:00
Ben Wiederhake 42b3baf32f clippy: simplify code according to nightly 'needless_borrows_for_generic_args' lint
https://rust-lang.github.io/rust-clippy/master/index.html#/needless_borrows_for_generic_args
2024-07-18 15:59:36 +02:00
Sylvestre Ledru bfca6bf70f Add license headers on all files 2023-08-21 10:49:27 +02:00
Daniel Hofstetter 6988eb7ec6 tests: expand wildcard imports 2023-03-20 15:32:35 +01:00
Joining7943 1fadeb43b2 tests/util: Do not trim stderr in CmdResult::stderr_is. Add method stderr_trimmed_is.
Fix tests assert whitespace instead of trimming it. Disable some tests in `test_tr` because `tr`
produces too many newlines.
2023-01-22 14:56:19 +01:00
Terts Diepraam 9177cb7b24 all: add tests for usage error exit code 2022-09-10 20:59:42 +02:00
Justin Tracey b873d46ca0 join: flush stdout before final error message 2022-02-07 22:32:02 -05:00
Justin Tracey bf67c5d981 join: add tests for --check-order and stdout error 2022-02-07 22:26:27 -05:00
Terts DiepraamandGitHub 7fc82cd376 Merge pull request #2902 from jtracey/join-non-unicode-sep
join: add support for non-unicode field separators
2022-01-31 21:54:56 +01:00
Terts DiepraamandGitHub 7477761428 Merge pull request #2882 from jtracey/join-bigfields-compat
join: "support" field numbers larger than usize::MAX
2022-01-31 21:52:13 +01:00
Justin Tracey 58d65fb953 join: add support for non-unicode field separators
This allows for `-t` to take invalid unicode (but still single-byte) values
on unix-like platforms. Other platforms, which as of the time of this commit
do not support `OsStr::as_bytes()`, could possibly be supported in the future,
but would require design decisions as to what that means.
2022-01-30 20:04:22 -05:00
Sylvestre LedruandGitHub 52ab6325a0 Merge pull request #2881 from jtracey/join-null-field-sep
join: add support for `-t '\0'`
2022-01-29 10:55:04 +01:00
Cecylia Bocovich c8f9ea5b15 tests/join: test default check order behaviour 2022-01-22 17:51:29 -05:00
Cecylia Bocovich 594157d1e0 join: fix default check order behaviour
If neither --nocheck-order or --check-order are specified, only fail on
unsorted inputs if either file contains unpaired lines.
2022-01-22 17:51:29 -05:00
Cecylia Bocovich 67878de379 join: print unsorted line in error message
This expands the error message that is printed if either input file has
an unsorted line. Both the program name (join) and the offending line
are printed out with the message to match the behaviour of the GNU
utility.
2022-01-21 11:47:37 -05:00
Justin Tracey ce3df12eaa join: "support" field numbers larger than usize::MAX
They silently get folded to usize::MAX, which is the official GNU behavior.
2022-01-17 17:49:41 -05:00
Terts DiepraamandGitHub 08efa1fe5a Merge branch 'main' into join-null-field-sep 2022-01-17 12:59:52 +01:00