]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/blob - tools/regression/bin/sh/builtins/return5.0
Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.
[FreeBSD/stable/10.git] / tools / regression / bin / sh / builtins / return5.0
1 # $FreeBSD$
2
3 if [ "$1" != nested ]; then
4         f() {
5                 set -- nested
6                 . "$0"
7                 # Allow return to return from the function or the dot script.
8                 return 4
9         }
10         f
11         exit $(($? ^ 4))
12 fi
13 # To trigger the bug, the following commands must be at the top level,
14 # with newlines in between.
15 return 4
16 echo bad
17 exit 1