Summary
Follow-on to #11655. Scientific-notation inputs are now correctly rejected in the default --invalid=abort mode, but the rejection path bypasses --invalid=warn/ignore/fail handling — uutils halts after the first invalid value and exits 2 regardless of the requested mode, while GNU prints the bad value, continues with the remaining inputs, and exits 0 for warn/ignore.
Regular invalid inputs (random garbage strings) behave correctly; only the scientific-notation rejection path is broken.
Found by fuzz_numfmt.
Reproduction
$ LC_ALL=C /usr/bin/numfmt --invalid=warn 100 1e5 200
100
numfmt: invalid suffix in input: '1e5'
1e5
200
(rc=0)
$ LC_ALL=C target/debug/numfmt --invalid=warn 100 1e5 200
100
numfmt: invalid suffix in input: '1e5'
(rc=2)
Same divergence for --invalid=ignore and --invalid=fail (for fail, both should exit 2 but GNU still prints all three numbers).
Sanity check — other invalid inputs handle --invalid=warn correctly:
$ numfmt --invalid=warn 100 garbage 200 # both print all three, rc=0
Summary
Follow-on to #11655. Scientific-notation inputs are now correctly rejected in the default
--invalid=abortmode, but the rejection path bypasses--invalid=warn/ignore/failhandling — uutils halts after the first invalid value and exits 2 regardless of the requested mode, while GNU prints the bad value, continues with the remaining inputs, and exits 0 forwarn/ignore.Regular invalid inputs (random garbage strings) behave correctly; only the scientific-notation rejection path is broken.
Found by
fuzz_numfmt.Reproduction
Same divergence for
--invalid=ignoreand--invalid=fail(forfail, both should exit 2 but GNU still prints all three numbers).Sanity check — other invalid inputs handle
--invalid=warncorrectly:$ numfmt --invalid=warn 100 garbage 200 # both print all three, rc=0