aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/test9.in
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2014-10-14 00:37:01 -0700
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2014-10-14 00:41:39 -0700
commit1927ebbc5dda3b130241cc3e0bbf6002662cd98f (patch)
tree8cdc5e19a96d02bcc6bbbe3fa79c4d9961404472 /tests/test9.in
parent5db9548f40b18d8e79567cc6651ebe24ee292fef (diff)
Improve error reporting for unclosed blocks
Diffstat (limited to 'tests/test9.in')
-rw-r--r--tests/test9.in11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/test9.in b/tests/test9.in
index 95a75843..35df1737 100644
--- a/tests/test9.in
+++ b/tests/test9.in
@@ -97,4 +97,15 @@ else
echo 'psub file was deleted'
end
+# Test support for unbalanced blocks
+function try_unbalanced_block
+ ../fish -c "echo $argv | source " 2>&1 | grep "Missing end" 1>&2
+end
+try_unbalanced_block 'begin'
+try_unbalanced_block 'while true'
+try_unbalanced_block 'for x in 1 2 3'
+try_unbalanced_block 'switch abc'
+try_unbalanced_block 'function anything'
+try_unbalanced_block 'if false'
+
false