1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 08:54:58 +00:00

test: Print the correct operator on error

This commit is contained in:
implicitfield 2022-09-30 21:09:29 +03:00 committed by Andreas Kling
parent 7760c00714
commit caab6ac968

View file

@ -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;