aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/test9.in
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test9.in')
-rw-r--r--tests/test9.in11
1 files changed, 10 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