diff options
author | 2013-06-15 14:32:38 -0700 | |
---|---|---|
committer | 2013-06-15 14:32:38 -0700 | |
commit | 827a9d640c97b95931280e55b8567f69985c2ff1 (patch) | |
tree | 618d6c4be725ab4fc3bb1065459100095bcb31ed /fish_tests.cpp | |
parent | e2a506e54a297dcbd13cdb881936e50bbefceb28 (diff) |
Added parse builtin for testing. Lots of work on simulated execution.
Diffstat (limited to 'fish_tests.cpp')
-rw-r--r-- | fish_tests.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/fish_tests.cpp b/fish_tests.cpp index 35c1e327..20d79288 100644 --- a/fish_tests.cpp +++ b/fish_tests.cpp @@ -1722,8 +1722,16 @@ void history_tests_t::test_history_speed(void) static void test_new_parser(void) { say(L"Testing new parser!"); + const wcstring src = L"echo hello world"; + parse_node_tree_t parse_tree; parse_t parser; - parser.parse(L"echo hello"); + parser.parse(src, &parse_tree); + parse_execution_context_t ctx(parse_tree, src); + say(L"Simulating execution:"); + wcstring simulation = ctx.simulate(); + printf("%ls\n", simulation.c_str()); + + } /** |