1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-10 00:31:07 +02:00

23680: tests for 23671

This commit is contained in:
Peter Stephenson 2007-07-13 22:28:00 +00:00
parent eea6647c65
commit 71f659dc00
2 changed files with 33 additions and 0 deletions

View file

@ -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

View file

@ -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