summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2007-07-13 22:28:00 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2007-07-13 22:28:00 +0000
commit71f659dc00e304151b321b9249efa014b6faf883 (patch)
treec4ee507e7333673ca09bf9ae47ec4a6137fb6cfd
parenteea6647c658b56cd9fb99544e4c96b3628d0cd79 (diff)
downloadzsh-71f659dc00e304151b321b9249efa014b6faf883.tar.gz
zsh-71f659dc00e304151b321b9249efa014b6faf883.zip
23680: tests for 23671
-rw-r--r--ChangeLog4
-rw-r--r--Test/C04funcdef.ztst29
2 files changed, 33 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 01b9dd7e6..bf612582d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2007-07-13 Peter Stephenson <p.w.stephenson@ntlworld.com>
+
+ * 23680: Test/C04funcdef.ztst: tests for 23671.
+
2007-07-13 Peter Stephenson <pws@csr.com>
* 23671: Doc/Zsh/exec.yo, Src/exec.c: Function
diff --git a/Test/C04funcdef.ztst b/Test/C04funcdef.ztst
index 04098d2ce..d297ea418 100644
--- a/Test/C04funcdef.ztst
+++ b/Test/C04funcdef.ztst
@@ -70,3 +70,32 @@
0:User-defined math functions, multiple interfaces
>4
>5
+
+ command_not_found_handler() {
+ print "Great News! I've handled the command:"
+ print "$1"
+ print "with arguments:"
+ print -l ${argv[2,-1]}
+ }
+ ACommandWhichHadBetterNotExistOnTheSystem and some "really useful" args
+0:Command not found handler, success
+>Great News! I've handled the command:
+>ACommandWhichHadBetterNotExistOnTheSystem
+>with arguments:
+>and
+>some
+>really useful
+>args
+
+ command_not_found_handler() {
+ print "Your command:" >&2
+ print "$1" >&2
+ print "has gone down the tubes. Sorry." >&2
+ return 1
+ }
+ ThisCommandDoesNotExistEither
+127:Command not found handler, failure
+?Your command:
+?ThisCommandDoesNotExistEither
+?has gone down the tubes. Sorry.
+?(eval):7: command not found: ThisCommandDoesNotExistEither