ref: 58c54e390fbfece997d189ddfb2ba4f1d9922c55
parent: fa29f36fe713a4bbdfca6770ebb3867436c1ac18
author: Jacob Moody <moody@posixcafe.org>
date: Sat Jun 25 18:35:35 EDT 2022
awk: add tests for unit strings in BEGIN
--- /dev/null
+++ b/cmd/awk.rc
@@ -1,0 +1,13 @@
+#!/bin/rc
+rfork e
+
+fn check{
+ expected=$1
+ shift
+ if(! ~ `{$*} $expected){
+ >[1=2] echo $* '!=' $expected
+ exit 'fail'
+ }
+}
+
+check 0 awk 'BEGIN{print length($1)}'
--- a/cmd/mkfile
+++ b/cmd/mkfile
@@ -1,6 +1,7 @@
</$objtype/mkfile
TEST=\
+ awk\
cpp\
date\
git\