diff options
author | 2014-01-03 15:27:39 -0800 | |
---|---|---|
committer | 2014-01-03 15:27:39 -0800 | |
commit | b8079953d89be2d05f28d95a141806e3bea87515 (patch) | |
tree | a577fae859bc9c2c8aa4e1a8e004de9352bc51bb | |
parent | 993148552efcffb60c7e1be7aa3322f1bffa1c74 (diff) |
Fix for cross-test interference where cancellation from one test would
lead to failure in expansion test
-rw-r--r-- | fish_tests.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/fish_tests.cpp b/fish_tests.cpp index ce61a40a..6a52f120 100644 --- a/fish_tests.cpp +++ b/fish_tests.cpp @@ -710,6 +710,7 @@ static void test_cancellation() /* Here the command substitution is an infinite loop. echo never even gets its argument, so when we cancel we expect no output */ test_1_cancellation(L"echo (while true ; echo blah ; end)"); + fprintf(stderr, "."); /* Nasty infinite loop that doesn't actually execute anything */ @@ -724,9 +725,13 @@ static void test_cancellation() fprintf(stderr, "\n"); + /* Restore signal handling */ proc_pop_interactive(); signal_reset_handlers(); + + /* Ensure that we don't think we should cancel */ + reader_reset_interrupted(); } static void test_indents() @@ -970,13 +975,13 @@ static int expand_test(const wchar_t *in, int flags, ...) size_t i=0; int res=1; wchar_t *arg; - + if (expand_string(in, output, flags)) { } - #if 0 + printf("input: %ls\n", in); for (size_t idx=0; idx < output.size(); idx++) { printf("%ls\n", output.at(idx).completion.c_str()); |