From e0a4d49ef368a8379ef32424f47a0c59da1c50dd Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Sun, 7 Aug 2022 14:03:33 -0700 Subject: [PATCH] Bravely stop appending a newline in reader_shell_test This newline apparently dates back to when we required all statements to be terminated; but our AST no longer requires that so we can remove this. No functional change expected here. --- src/reader.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/reader.cpp b/src/reader.cpp index 83d4355e8..a49806faf 100644 --- a/src/reader.cpp +++ b/src/reader.cpp @@ -2646,12 +2646,7 @@ static eval_res_t reader_run_command(parser_t &parser, const wcstring &cmd) { return eval_res; } -static parser_test_error_bits_t reader_shell_test(const parser_t &parser, const wcstring &b) { - wcstring bstr = b; - - // Append a newline, to act as a statement terminator. - bstr.push_back(L'\n'); - +static parser_test_error_bits_t reader_shell_test(const parser_t &parser, const wcstring &bstr) { parse_error_list_t errors; parser_test_error_bits_t res = parse_util_detect_errors(bstr, &errors, true /* do accept incomplete */);