summaryrefslogtreecommitdiff
path: root/tests/local.mk
diff options
context:
space:
mode:
authorBernhard Voelker <mail@bernhard-voelker.de>2023-01-04 20:14:01 +0100
committerBernhard Voelker <mail@bernhard-voelker.de>2023-01-05 19:43:25 +0100
commit4a7280927285dbcf0ac815aa3aecc65b144e3fa4 (patch)
tree532f9c4018e3443a29b4895442243f6ad3f5ba12 /tests/local.mk
parent6490a8076526ea1b11ea6a4dcf4ce5afdbcabe02 (diff)
downloadfindutils-4a7280927285dbcf0ac815aa3aecc65b144e3fa4.tar.gz
find: fix error diagnostics of options with mandatory, numeric arguments
The error diagnostic for wrong invocations with option that require numeric arguments (-inum, -links, -gid, -uid) was wrong and not helpful: $ find -gid find: invalid argument `-gid' to `-gid' * find/parser.c (parse_gid): Remove changing back of the ARG_PTR in the error case; thus simplify. (parse_inum,parse_links,parse_uid): Likewise. (get_num): While at it, mention -gid and -uid in the comment as well. (insert_num): Also improve the error diagnostic in the case the user has provided a non-numeric argument. Previously, it was just "invalid argument". * tests/find/opt-numeric-arg.sh: Add test. * tests/local.mk: Reference it. * NEWS (Bug Fixes): Mention the fix. Reported by Andreas Schwab <schwab@linux-m68k.org> in <https://lists.gnu.org/r/bug-findutils/2023-01/msg00001.html>
Diffstat (limited to 'tests/local.mk')
-rw-r--r--tests/local.mk1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/local.mk b/tests/local.mk
index 45a1cc73..ff4dd909 100644
--- a/tests/local.mk
+++ b/tests/local.mk
@@ -121,6 +121,7 @@ all_tests = \
tests/find/debug-missing-arg.sh \
tests/find/used.sh \
tests/find/newer.sh \
+ tests/find/opt-numeric-arg.sh \
tests/xargs/conflicting_opts.sh \
tests/xargs/verbose-quote.sh \
$(all_root_tests)