diff options
author | Jim Meyering <meyering@redhat.com> | 2011-11-27 15:36:06 +0100 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2011-11-27 21:13:18 +0100 |
commit | 5b3e538b7fc193f8e54b16aeb99b48f28744c1db (patch) | |
tree | 4f40b688b15636dced20a9ad30f54be419c0f4b9 | |
parent | 040bc8b50fe36120ed3fec10575df2590b081eca (diff) | |
download | coreutils-5b3e538b7fc193f8e54b16aeb99b48f28744c1db.tar.xz |
tests: add a syntax check for last week's global change
Last week I made a global change, commit a2c811db, `tests: use
"compare exp out", not "compare out exp"', but forgot to add a
corresponding syntax check rule. Without that, it is far too
easy to add a new test or to merge in an old one that would
be non-conforming. Obviously this is only a heuristic, since
it relies on the expected-output file to have a name that starts
with "exp".
* cfg.mk (sc_prohibit_reversed_compare_failure): Prohibit use of
compare with reversed arguments.
-rw-r--r-- | cfg.mk | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -280,6 +280,12 @@ sc_prohibit_framework_failure: halt='use framework_failure_ instead' \ $(_sc_search_regexp) +# In tests, use "compare expected actual", not the reverse. +sc_prohibit_reversed_compare_failure: + @prohibit='\<compare [^ ]+ (exp|/dev/null)' \ + halt='reversed compare arguments' \ + $(_sc_search_regexp) + ########################################################### _p0 = \([^"'/]\|"\([^\"]\|[\].\)*"\|'\([^\']\|[\].\)*' _pre = $(_p0)\|[/][^"'/*]\|[/]"\([^\"]\|[\].\)*"\|[/]'\([^\']\|[\].\)*'\)* |