aboutsummaryrefslogtreecommitdiffhomepage
path: root/fish_tests.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2014-03-17 08:45:25 -0700
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2014-03-20 21:32:02 -0700
commit1c58b6d83e36f014189461a5d4a23fa590f66b45 (patch)
treea5cc5f05844277b630d835066e6708bb48ab1820 /fish_tests.cpp
parent1305c02579a3b4976ddbd964cf174b71a36b8e41 (diff)
Rewrite parser_t::eval_args to use new AST parser
Diffstat (limited to 'fish_tests.cpp')
-rw-r--r--fish_tests.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/fish_tests.cpp b/fish_tests.cpp
index 5b7bcea6..35b1a7ff 100644
--- a/fish_tests.cpp
+++ b/fish_tests.cpp
@@ -620,6 +620,15 @@ static void test_parser()
/* This is disabled since it produces a long backtrace. We should find a way to either visually compress the backtrace, or disable error spewing */
parser_t::principal_parser().eval(L"function recursive1 ; recursive2 ; end ; function recursive2 ; recursive1 ; end ; recursive1; ", io_chain_t(), TOP);
#endif
+
+ say(L"Testing eval_args");
+ completion_list_t comps;
+ parser_t::principal_parser().eval_args(L"alpha 'beta gamma' delta", comps);
+ do_test(comps.size() == 3);
+ 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 */