awk/testdir/t.assert

10 lines
228 B
Plaintext

# tests whether function returns sensible type bits
function assert(cond) { # assertion
if (!cond) print " >>> assert failed <<<"
}
function i(x) { return x }
{ m = length($1); n = length($2); n = i(n); assert(m > n) }