mirror of
https://github.com/opnsense/src.git
synced 2026-05-04 17:05:14 -04:00
sh: Add tests for some somewhat obscure aspects of function definitions.
This commit is contained in:
parent
562b28821e
commit
36ae1a9441
2 changed files with 12 additions and 0 deletions
6
tools/regression/bin/sh/parser/func2.0
Normal file
6
tools/regression/bin/sh/parser/func2.0
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
# $FreeBSD$
|
||||
|
||||
f() { return 42; }
|
||||
f() { return 3; } &
|
||||
f
|
||||
[ $? -eq 42 ]
|
||||
6
tools/regression/bin/sh/parser/func3.0
Normal file
6
tools/regression/bin/sh/parser/func3.0
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
# $FreeBSD$
|
||||
|
||||
name=/var/empty/nosuch
|
||||
f() { true; } <$name
|
||||
name=/dev/null
|
||||
f
|
||||
Loading…
Reference in a new issue