mirror of
git://git.sv.gnu.org/coreutils.git
synced 2026-04-21 03:12:48 +02:00
all: quote string arguments in error messages
These strings are often file names or other user specified parameters, which can give confusing errors in the presence of unexpected characters for example. * cfg.mk (sc_error_quotes): A new syntax check rule. * src/*.c: Wrap error() string arguments with quote(). * tests/: Adjust accordingly. * NEWS: Mention the improvement.
This commit is contained in:
@@ -119,8 +119,8 @@ sed 's/: Invalid.*/: expected a numeric value/' err > k && mv k err
|
||||
|
||||
cat <<EOF > exp_err
|
||||
printf: warning: ": character(s) following character constant have been ignored
|
||||
printf: ": expected a numeric value
|
||||
printf: a: expected a numeric value
|
||||
printf: '"': expected a numeric value
|
||||
printf: 'a': expected a numeric value
|
||||
EOF
|
||||
|
||||
compare exp out || fail=1
|
||||
|
||||
Reference in New Issue
Block a user