aboutsummaryrefslogtreecommitdiffhomepage
path: root/fish_tests.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2014-11-24 01:20:57 -0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2014-11-24 01:23:42 -0800
commiteafd5776292c37d37870fc6013029f7146f34f70 (patch)
tree6d9d81452eef02560933c42734ce92562407d875 /fish_tests.cpp
parent196a7c9d188304cd6b189b1bcf4e2c088fcf3434 (diff)
Hack the tokenizer to compress multiple adjacent newlines into one
This slightly reduces the size of parse trees, and is otherwise a minor optimization
Diffstat (limited to 'fish_tests.cpp')
-rw-r--r--fish_tests.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/fish_tests.cpp b/fish_tests.cpp
index 4df8322c..9fa6a110 100644
--- a/fish_tests.cpp
+++ b/fish_tests.cpp
@@ -458,10 +458,10 @@ static void test_tok()
say(L"Test destruction of broken tokenizer");
{
- const wchar_t *str = L"string <redirection 2>&1 'nested \"quoted\" '(string containing subshells ){and,brackets}$as[$well (as variable arrays)] not_a_redirect^ ^ ^^is_a_redirect";
+ const wchar_t *str = L"string <redirection 2>&1 'nested \"quoted\" '(string containing subshells ){and,brackets}$as[$well (as variable arrays)] not_a_redirect^ ^ ^^is_a_redirect Compress_Newlines\n \n\t\n \nInto_Just_One";
const int types[] =
{
- TOK_STRING, TOK_REDIRECT_IN, TOK_STRING, TOK_REDIRECT_FD, TOK_STRING, TOK_STRING, TOK_STRING, TOK_REDIRECT_OUT, TOK_REDIRECT_APPEND, TOK_STRING, TOK_END
+ TOK_STRING, TOK_REDIRECT_IN, TOK_STRING, TOK_REDIRECT_FD, TOK_STRING, TOK_STRING, TOK_STRING, TOK_REDIRECT_OUT, TOK_REDIRECT_APPEND, TOK_STRING, TOK_STRING, TOK_END, TOK_STRING, TOK_END
};
say(L"Test correct tokenization");