diff options
author | implicitfield <114500360+implicitfield@users.noreply.github.com> | 2022-09-30 21:09:29 +0300 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-10-02 21:33:01 +0200 |
commit | caab6ac968d8b22d9b089543a3881cc2159ee6e7 (patch) | |
tree | cfaadec8b675cb8435c233cef4d16e7b7ad10134 /Userland/Utilities/test.cpp | |
parent | 7760c007140f8acbd6f214898a7c8e7a565f4875 (diff) | |
download | serenity-caab6ac968d8b22d9b089543a3881cc2159ee6e7.zip |
test: Print the correct operator on error
Diffstat (limited to 'Userland/Utilities/test.cpp')
-rw-r--r-- | Userland/Utilities/test.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Userland/Utilities/test.cpp b/Userland/Utilities/test.cpp index c05a27d6de..6a471dae6b 100644 --- a/Userland/Utilities/test.cpp +++ b/Userland/Utilities/test.cpp @@ -390,7 +390,9 @@ static OwnPtr<Condition> parse_simple_expression(char* argv[]) case 'N': case 'O': case 's': - fatal_error("Unsupported operator \033[1m%s", argv[optind]); + // 'optind' has been incremented to refer to the argument after the + // operator, while we want to print the operator itself. + fatal_error("Unsupported operator \033[1m%s", argv[optind - 1]); default: --optind; break; |