opnsense-src/tools/regression/bin/sh/builtins/printf4.0
Jilles Tjoelker 6a6760db7f sh: Make warnings in the printf builtin non-fatal, like in the program.
The #define for warnx now behaves much like the libc function (except that
it uses sh command name and output).

Also, it now uses C99 __VA_ARGS__ so there is no need for three different
macros for 0, 1 or 2 parameters.
2010-12-20 23:06:57 +00:00

5 lines
73 B
Text

# $FreeBSD$
set -e
v=$(! printf "%d" 4wrong 2>/dev/null)
[ "$v" = "4" ]