opnsense-src/tools/regression/bin/sh/execution/func2.0
Jilles Tjoelker c06336d428 sh: Get rid of unnecessary non-standard empty lists.
POSIX does not allow constructs like:
  if cmd; then fi
  { }
Add a colon dummy command, except in a test that verifies that such empty
lists do not cause crashes when used as a function definition.
2010-08-16 17:18:08 +00:00

12 lines
194 B
Text

# $FreeBSD$
# The empty pairs of braces here are to test that this does not cause a crash.
f() { }
f
hash -v f >/dev/null
f() { { }; }
f
hash -v f >/dev/null
f() { { } }
f
hash -v f >/dev/null