aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/fish_tests.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2016-02-27 18:37:59 -0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2016-02-27 18:37:59 -0800
commitd628fe0deaa134efa1205a25e538f3cb828661a0 (patch)
treeda788321b10efb8740607bf454857de10fb783c3 /src/fish_tests.cpp
parentcbd3fa6b01bab709d0b6f5277a984685d8c45888 (diff)
Eliminate parser_t::show_errors
Errors are now unconditionally shown
Diffstat (limited to 'src/fish_tests.cpp')
-rw-r--r--src/fish_tests.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/fish_tests.cpp b/src/fish_tests.cpp
index 871e5622..f6441ffd 100644
--- a/src/fish_tests.cpp
+++ b/src/fish_tests.cpp
@@ -593,7 +593,7 @@ static void test_parser()
{
say(L"Testing parser");
- parser_t parser(true);
+ parser_t parser;
say(L"Testing block nesting");
if (!parse_util_detect_errors(L"if; end"))
@@ -781,7 +781,6 @@ static void test_parser()
do_test(comps.at(0).completion == L"alpha");
do_test(comps.at(1).completion == L"beta gamma");
do_test(comps.at(2).completion == L"delta");
-
}
/* Wait a while and then SIGINT the main thread */
@@ -1954,7 +1953,7 @@ static void test_is_potential_path()
int builtin_test(parser_t &parser, io_streams_t &streams, wchar_t **argv);
static bool run_one_test_test(int expected, wcstring_list_t &lst, bool bracket)
{
- parser_t parser(true);
+ parser_t parser;
size_t i, count = lst.size();
wchar_t **argv = new wchar_t *[count+3];
argv[0] = (wchar_t *)(bracket ? L"[" : L"test");
@@ -1993,7 +1992,7 @@ static bool run_test_test(int expected, const wcstring &str)
static void test_test_brackets()
{
// Ensure [ knows it needs a ]
- parser_t parser(true);
+ parser_t parser;
io_streams_t streams;
const wchar_t *argv1[] = {L"[", L"foo", NULL};
@@ -4116,7 +4115,7 @@ static void test_wcstring_tok(void)
int builtin_string(parser_t &parser, io_streams_t &streams, wchar_t **argv);
static void run_one_string_test(const wchar_t **argv, int expected_rc, const wchar_t *expected_out)
{
- parser_t parser(true);
+ parser_t parser;
io_streams_t streams;
streams.stdin_is_directly_redirected = false; // read from argv instead of stdin
int rc = builtin_string(parser, streams, const_cast<wchar_t**>(argv));