Commit Graph
24 Commits
Author SHA1 Message Date
AnthonyandGitHub 36ac85b1f3 tests: add WASI integration test support via wasmtime 2026-04-12 15:19:04 +02:00
oech3andGitHub 6c3de3e92f baseNM: protect names against argv[0] (#11373) 2026-03-18 00:36:30 +01:00
karanabeandGitHub 364d9e9dff basenc: Fix basenc.pl GNU-compat tests pass (#9203)
* fix(basenc): align base32 decode with GNU

* Add GNU-style basenc base32 tests

* Expand basenc base32 tests and simplify failures

Adds the GNU-style auto-padding/truncated cases to
tests/by-util/test_basenc.rs and rewrites the failure assertions to use
the chained fails().stdout_*(…).stderr_is(…) style for clarity.

* Restore GNU expectations for b32h_5 and b32h_6

Updates util/build-gnu.sh to stop forcing those two basenc tests to
expect empty stdout, so the GNU suite again checks for the leaked five
bytes before failure.

* Allow base32 decoder to auto-pad truncated blocks

Introduce PadResult, trim/pad incomplete base32 chunks, emit decoded
prefixes, and still return error: invalid input in line with GNU basenc.
2025-11-10 19:13:51 +01:00
Sylvestre LedruandDaniel Hofstetter 33ac2cf6e9 base58: it wasn't working properly with long input 2025-10-06 15:53:56 +02:00
AnarchistHoneybunandGitHub e16ce60a38 basenc: implement --base58 encoding option (#8751)
* basenc: implement --base58 encoding option

Add support for Base58 encoding to basenc as per GNU coreutils 9.8.
Base58 uses the alphabet '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'
which excludes visually ambiguous characters (0, O, I, l).

Resolves issue #8744.

* basenc: fix clippy warnings and spelling issues

Fix explicit iteration clippy warnings. Add Base58 alphabet to spell-checker ignore list to resolve cspell errors.
2025-10-05 14:03:45 +02:00
Daniel Hofstetter 93706cd68c basenc: allow non-UTF8 filenames 2025-09-05 10:54:51 +02:00
Dorian Peron 6e23d4e979 tests: patch tests to simplify imports 2025-07-01 03:36:46 +02:00
Sylvestre Ledru a0179ea239 uutests: adjust the tests to use them 2025-03-28 21:40:31 +01:00
Daniel Hofstetter d414dbc83b basenc: ignore case with "--base16 --decode" 2024-12-17 10:52:25 +01:00
Andrew Liebenow 32e1c54c78 Fix "coreutils manpage base64" bug 2024-10-05 08:17:10 -05:00
Andrew Liebenow ea7a543bfe Fix two bugs. Add property testing. 2024-09-24 19:25:29 -05:00
Andrew Liebenow 4f19c0e9ff Address PR comments. Simplify structure. 2024-09-24 07:49:28 -05:00
Andrew Liebenow cdebd24733 Finish fast decode/encode by folding in Z85 2024-09-22 08:28:20 -05:00
Andrew Liebenow 846cf06272 basenc: perform faster, streaming encoding
Improve the performance, both in memory and time, of the encoding
performed by the basenc (except in --z85 mode), base32, and base64
programs.

These programs now perform encoding in a buffered/streaming manner,
so encoding is not constrained by the amount of available memory.
2024-09-20 14:34:18 -05:00
Ben Wiederhake b39b405826 basenc+tests: remove unused spell-checker:disable 2024-04-30 18:28:20 +02:00
Ben Wiederhake 445905a045 base32/base64/basenc: permit repeating -d/-i/-w flags 2024-02-24 21:11:18 +01:00
Ben Wiederhake 36e142aa15 basenc: use last given encoding, instead of priority list 2024-02-24 20:44:07 +01:00
Ben Wiederhake c6f75c98b7 basenc: Test basic functionality
It's good that all encodings already work. Let's make sure they cannot regress!
2024-02-24 20:44:07 +01:00
Sylvestre LedruandGitHub b116a97fdc add missing \n 2024-01-15 10:43:20 +01:00
Sylvestre Ledru 8d24036f5c basenc: handle '--base32 .' arg 2024-01-14 23:27:00 +01: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
Michael Debertol b8c383e210 basenc: add utility
basenc is a brand-new gnu core utility (added less than 3 years ago!),
which enables some more encodings.
2021-08-06 00:07:19 +02:00