Commit Graph
29 Commits
Author SHA1 Message Date
Alvaro GuimaraesandGitHub 3883cea03f uniq: fix -w to count bytes in C locale (#11061)
* uniq: fix -w to count bytes in C locale

* uniq: add CTYPE to spellchecker ignore list

* uniq: avoid String allocation by using std::env::var_os()
2026-02-23 10:06:22 +01:00
Sylvestre LedruandDaniel Hofstetter 23f3551e1c clap/locale: fix the colors for all programs (Closes: #8501)
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2025-09-05 08:25:59 +02:00
Dorian Peron 6e23d4e979 tests: patch tests to simplify imports 2025-07-01 03:36:46 +02:00
Jan Verbeek a9cd3f132e uniq: Flush BufWriter, make error context GNU-like 2025-03-31 13:46:33 +02:00
Sylvestre Ledru a0179ea239 uutests: adjust the tests to use them 2025-03-28 21:40:31 +01:00
Daniel Hofstetter df4dfea852 tests: replace run() with succeeds() or fails() 2025-03-09 16:53:56 +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
Sylvestre Ledru 1e23a3fa8d uniq: fix multibyte input
Should fix tests/uniq/uniq.pl
2025-01-01 13:17:52 +01:00
n4n5 ab67947321 fix clippy tests 2024-06-30 16:27:08 +02:00
Ben Wiederhake a699bfd1fb uniq: accept shortcuts for stringly-enum arguments 2024-04-14 15:39:46 +02:00
d060134d97 uniq: print version and help on stdout again (#6123)
* uniq: print version and help on stdout again

* uniq: format test

* uniq: replace redundant closure with fn

---------

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2024-03-25 09:40:36 +01:00
Daniel Hofstetter c85970485a uniq: use concat! in tests for better readability 2024-02-26 16:37:01 +01:00
Ben Wiederhake e91d0bd14f uniq: fix flaky test gnu_tests
The testcase tries to write to the stdin pipe while the process under
test is simultaneously exiting with an error code. Naturally, this is a
race, and we should ignore any stdin write errors. However, adding this
feature to the list makes it even more unreadable, and adds no real
value, so let's skip the input data entirely.
2024-02-25 17:59:09 +01:00
Yury ZhytkouandGitHub 17174ab986 uniq: pass remaining GNU tests (#5994) 2024-02-25 09:45:37 +01:00
LeviticohandGitHub b90b59c003 uniq: added support for deprecated -N option (#4228) 2023-09-24 14:44:44 +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
Daniel HofstetterandSylvestre Ledru 72862512da uniq: set default missing value for args 2022-06-30 11:52:46 +02:00
Sylvestre Ledru 7d8b1de213 uniq: Disable one of the gnu test for failing too often
See: https://github.com/uutils/coreutils/issues/3509
2022-05-10 13:54:33 +02:00
Terts Diepraam 87f06637a9 tests/uniq: add GNU tests as Rust tests
tests/uniq: fix and uncomment test case 120
2022-04-17 16:50:18 +02:00
Thomas Queiroz 1d8381064a tests/uniq: update test 2021-10-24 02:59:50 -03:00
Jan Scheer 3aeccfd802 fix a lot of clippy warnings 2021-05-29 15:11:22 +02:00
Yağız can Değirmenci 071899d24d tests: delete 'error:' prefix from the tests 2021-05-26 02:45:53 +03:00