summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPaul Eggert <eggert@CS.UCLA.EDU>2008-10-26 00:45:18 -0700
committerJim Meyering <meyering@redhat.com>2008-10-26 09:51:33 +0100
commit2bf151cd937dd44f00bc7249d5d8d95e9a34f207 (patch)
treeac51409f8525344548b2b3bbae71856bf8b9722b /tests
parent153477479abd5b4dfda5feb109e3ebf28a578bad (diff)
downloadcoreutils-2bf151cd937dd44f00bc7249d5d8d95e9a34f207.tar.xz
seq: improve quality of format-checking code
* src/seq.c (validate_format): Remove. Migrate its checks into... (long_double_format): Report an error and exit if an error is found, instead of returning NULL. All callers changed. Use a more-consistent format for diagnostics. * tests/misc/seq: Adjust to the more-consistent format for diagnostics.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/misc/seq10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/misc/seq b/tests/misc/seq
index 227132208..7f808cf6c 100755
--- a/tests/misc/seq
+++ b/tests/misc/seq
@@ -81,20 +81,20 @@ my @Tests =
# In coreutils-[6.0..6.9], this would mistakenly succeed and print "%Lg".
['fmt-c', qw(-f %%g 1), {EXIT => 1},
- {ERR => "seq: invalid format string: `%%g'\n" . $try_help }],
+ {ERR => "seq: format `%%g' has no % directive\n"}],
# In coreutils-6.9..6.10, this would fail with an erroneous diagnostic:
# "seq: memory exhausted". In coreutils-6.0..6.8, it would mistakenly
# succeed and print a blank line.
['fmt-eos1', qw(-f % 1), {EXIT => 1},
- {ERR => "seq: no % directive in format string `%'\n" . $try_help }],
+ {ERR => "seq: format `%' ends in %\n"}],
['fmt-eos2', qw(-f %g% 1), {EXIT => 1},
- {ERR => "seq: invalid format string: `%g%'\n" . $try_help }],
+ {ERR => "seq: format `%g%' has too many % directives\n"}],
['fmt-d', qw(-f "" 1), {EXIT => 1},
- {ERR => "seq: no % directive in format string `'\n" . $try_help }],
+ {ERR => "seq: format `' has no % directive\n"}],
['fmt-e', qw(-f %g%g 1), {EXIT => 1},
- {ERR => "seq: too many % directives in format string `%g%g'\n"}],
+ {ERR => "seq: format `%g%g' has too many % directives\n"}],
# With coreutils-6.12 and earlier, with a UTF8 numeric locale that uses
# something other than "." as the decimal point, this use of seq would