coreutils
coreutils copied to clipboard
base32/base64/basenc: implement and test proper flag parsing
This PR fixes several issues:
- Basic functionality of
basencwas not tested – it already works, yes, but let's make sure it doesn't regress. basencshould not decide according to some arbitrary built-in priority list (ENCODINGS), but rather let the last encoding on the command-line override any earlier ones. (This fixes a GNU behavior bug.)- Permit repeated flags on the command-line; i.e. the flags
-d,-i, and-w. (This fixes a GNU behavior bug.)
This fixes #5998 for the special case of base32, base64, and basenc.