code: regress

ref: 2d24dea30ee375b9f0e0690e544c5feccff26cb8
dir: /cmd/awk.rc/

View raw version
#!/bin/rc
rfork e

fn check{
	expected=$1
	shift
	if(~ `{$*} $expected){
		status=''	
	}
	if not{
		>[1=2] echo $* '!=' $expected
		exit 'fail'
	}
}

check 0 awk 'BEGIN{print length($1)}'