Sylvestre Ledru
cbccc9a456
realpath: implement -E
2025-09-28 10:34:56 +02:00
Sylvestre Ledru
71b4de24e6
test: improve support non-utf-8
2025-08-14 10:54:04 +02:00
Sylvestre Ledru
a7f3cb0209
realpath: fix regression with empty string validation
...
Fixes issue introduced in b965c944837df66b233f57fca7275fbed4e4d311 where
switching from NonEmptyStringValueParser to OsString parser removed
validation that arguments cannot be empty strings.
- Add custom NonEmptyOsStringParser that validates OsString is not empty
- Use the parser for FILES, --relative-to, and --relative-base arguments
- Add test case to verify empty strings are rejected with exit code 1
- Fixes GNU realpath test failure
2025-08-14 10:52:37 +02:00
Sylvestre Ledru
f15dac138e
chmod/readlink/du: improve non-UTF-8 filename handling and code style
2025-08-14 10:52:24 +02:00
Sylvestre Ledru
ce7c571754
realpath: fix handling of non-UTF-8 filenames
2025-08-14 10:52:24 +02:00
Yuri Astrakhan
982805d3cd
chore: manual inline formatting
...
Minor manual cleanup - inlined many format args. This makes the code a bit more readable, and helps spot a few inefficiencies and possible bugs. Note that `&foo` in a `format!` parameter results in a 6% extra performance cost, and does not get inlined by the compiler (yet).
2025-04-08 00:23:21 -04:00
Sylvestre Ledru
a0179ea239
uutests: adjust the tests to use them
2025-03-28 21:40:31 +01:00
Sylvestre Ledru
a85539f530
Run cargo fmt on the tree
2025-03-24 21:33:12 +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
Daniel Hofstetter
32c88b4b96
basename,realpath: update spell-checker:ignore
2024-08-09 14:58:12 +02:00
Ben Wiederhake
e4b6687196
realpath+tests: remove unused spell-checker:disable
2024-04-30 18:28:20 +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
Thayne McCombs
17f9507e17
Add tests for non-utf8
2023-02-21 22:58:39 -07:00
Joining7943 and GitHub
f610f33aa7
tests/util: Don't trim output in CmdResult::stdout_matches and stdout_does_not_match (#4304 )
...
* tests/util: Fix documentation of UCommand::stderr_only and usage_error
* tests/util: Remove trimming from CmdResult::stdout_matches and stdout_does_not_match. Fix tests.
The tests are fixed to match the trailing newline instead of ignoring it.
2023-02-16 15:33:33 +01:00
Daniel Hofstetter
f6b646e4e5
clippy: fix warnings introduced with Rust 1.67.0
2023-01-27 17:37:56 +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
14e3c5176c
realpath: require arguments again
2022-10-13 20:06:27 +02:00
Niyaz Nigmatullin
94860f8af6
tests/realpath: add trailing slash usage tests
2022-08-15 22:47:03 +03:00
Niyaz Nigmatullin and GitHub
de65d4d649
Realpath relative options ( #3710 )
...
* realpath: introduce relative options, make correct exit codes, make pass
GNU test mist/realpath.sh
2022-07-12 08:29:20 +02:00
Niyaz Nigmatullin and GitHub
9d285e953d
Realpath symlinks handling, solves issue #3669 ( #3703 )
2022-07-10 16:49:25 +02:00
Sylvestre Ledru and GitHub
43a5b8c7d7
Merge pull request #3671 from niyaznigmatullin/fix_realpath_test
...
test_realpath: fixed test to be the one that was supposed to be
2022-07-06 09:42:15 +02:00
Niyaz Nigmatullin and Sylvestre Ledru
4e936d2d0d
test_realpath: include issue id to ignored testcase
2022-06-30 11:52:17 +02:00
Niyaz Nigmatullin and Sylvestre Ledru
9b2fa39760
test_realpath: get back to contains to pass in MacOs
2022-06-30 11:52:17 +02:00