mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-30 19:41:15 -03:00
Clean up the return type of parser_t::eval
parser_t::eval indicates whether there was a parse error. It can be easily confused with the status of the execution. Use a real type to make it more clear.
This commit is contained in:
@@ -5202,13 +5202,11 @@ static void test_illegal_command_exit_code() {
|
||||
{L"abc?def", STATUS_UNMATCHED_WILDCARD},
|
||||
};
|
||||
|
||||
int res = 0;
|
||||
UNUSED(res);
|
||||
const io_chain_t empty_ios;
|
||||
parser_t &parser = parser_t::principal_parser();
|
||||
|
||||
for (const auto &test : tests) {
|
||||
res = parser.eval(test.txt, empty_ios, TOP);
|
||||
parser.eval(test.txt, empty_ios, TOP);
|
||||
|
||||
int exit_status = parser.get_last_status();
|
||||
if (exit_status != test.result) {
|
||||
|
||||
Reference in New Issue
Block a user