diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test9.in | 11 | ||||
-rw-r--r-- | tests/test9.out | 2 |
2 files changed, 12 insertions, 1 deletions
diff --git a/tests/test9.in b/tests/test9.in index b8842727..a38fbc7c 100644 --- a/tests/test9.in +++ b/tests/test9.in @@ -1,5 +1,14 @@ +# ensure that builtins that produce no output can still truncate files +# (bug PCA almost reintroduced!) +echo "Testing that builtins can truncate files" +echo abc > /tmp/file_truncation_test.txt +cat /tmp/file_truncation_test.txt +echo -n > /tmp/file_truncation_test.txt +cat /tmp/file_truncation_test.txt + # Test events. + # This pattern caused a crash; github issue #449 set -g var before @@ -25,4 +34,4 @@ end emit test3 foo bar # test empty argument -emit
\ No newline at end of file +emit diff --git a/tests/test9.out b/tests/test9.out index 779f9a84..8e19365c 100644 --- a/tests/test9.out +++ b/tests/test9.out @@ -1,2 +1,4 @@ +Testing that builtins can truncate files +abc before:test1 received event test3 with args: foo bar |