aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/test9.in
diff options
context:
space:
mode:
authorGravatar Jan Kanis <jan.code@jankanis.nl>2012-12-19 15:56:19 +0100
committerGravatar Jan Kanis <jan.code@jankanis.nl>2012-12-20 16:11:46 +0100
commit1f0ae8b06d7e10d2a12cfd28efb3032af7b4d2f1 (patch)
tree2bfdc97c97b9c10ea62060a4ca2430fe84c5767a /tests/test9.in
parentaa477195d44b156cafaae098776ecddedfb9911e (diff)
fixed #449, added test
Diffstat (limited to 'tests/test9.in')
-rw-r--r--tests/test9.in25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/test9.in b/tests/test9.in
new file mode 100644
index 00000000..688dfb3f
--- /dev/null
+++ b/tests/test9.in
@@ -0,0 +1,25 @@
+# Test events.
+
+# This pattern caused a crash; github issue #449
+
+set -g var before
+
+function test1 --on-event test
+ set -g var $var:test1
+ functions -e test2
+end
+
+function test2 --on-event test
+ # this should not run, as test2 gets removed before it has a chance of running
+ set -g var $var:test2a
+end
+emit test
+
+echo $var
+
+
+function test3 --on-event test3
+ echo received event test3 with args: $argv
+end
+
+emit test3 foo bar