]> git.ipfire.org Git - thirdparty/coreutils.git/commit
base64,base32: fix 'extra operand' error message
authorAssaf Gordon <assafgordon@gmail.com>
Wed, 19 Dec 2018 08:02:32 +0000 (01:02 -0700)
committerAssaf Gordon <assafgordon@gmail.com>
Tue, 1 Jan 2019 23:32:27 +0000 (16:32 -0700)
commit67c537b91cc80397401fcb02718f81c85ab6638b
tree47b5fbf20521771b91afd634fe52addb4a11f5da
parentd1de5857c71287e46dca6eddfbe6ca9f0deb9eef
base64,base32: fix 'extra operand' error message

In the following invocation, 'a' is the input file, and 'b' is the extra
operand:

  $ base64 a b

Report 'b' in the error message instead of 'a':

  $ base64 a b
  base64: extra operand 'b'

Discussed in https://lists.gnu.org/r/coreutils/2018-12/msg00008.html .

* src/basenc.c (main): If there is more than one non-option operand,
report the second one (assuming the first is a the input file name).
* tests/misc/base64.pl: Add tests.
* tests/misc/basenc.pl: Adjust expectedc error message in tests.
* NEWS: Mention bugfix.
NEWS
src/basenc.c
tests/misc/base64.pl
tests/misc/basenc.pl