git: 5f659bb0b63d - main - test(1): quote closing bracket in error message
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 29 Jul 2024 20:18:03 UTC
The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=5f659bb0b63d0d0068645d70e1c39f7a26fafd63 commit 5f659bb0b63d0d0068645d70e1c39f7a26fafd63 Author: Daniel Tameling <tamelingdaniel@gmail.com> AuthorDate: 2024-07-24 11:56:16 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-07-29 20:08:33 +0000 test(1): quote closing bracket in error message If test is called as [ and one forgets to close the bracket, the error message is currently [: missing ] To make it obvious that this is not something printed in brackets, quote the closing bracket in the message, which is what everybody else is doing: [: missing ']' Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1346 --- bin/test/test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/test/test.c b/bin/test/test.c index af2783f0aee9..a35c5b424d3f 100644 --- a/bin/test/test.c +++ b/bin/test/test.c @@ -198,7 +198,7 @@ main(int argc, char **argv) p++; if (strcmp(p, "[") == 0) { if (strcmp(argv[--argc], "]") != 0) - error("missing ]"); + error("missing ']'"); argv[argc] = NULL; }