You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
venv/Git/usr/share/awk/assert.awk

21 lines
383 B

# assert --- assert that a condition is true. Otherwise, exit.
#
# Arnold Robbins, arnold@skeeve.com, Public Domain
# May, 1993
function assert(condition, string)
{
if (! condition) {
printf("%s:%d: assertion failed: %s\n",
FILENAME, FNR, string) > "/dev/stderr"
_assert_exit = 1
exit 1
}
}
END {
if (_assert_exit)
exit 1
}