awk/testdir/t.assert

10 lines
228 B
Plaintext
Raw Normal View History

2019-06-23 05:13:57 -04:00
# 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) }