From 8dc67d9c5a896db616506fa301d2706fa6b42ddd Mon Sep 17 00:00:00 2001 From: Bertrand Martin Date: Tue, 21 Apr 2026 16:10:28 +0200 Subject: [PATCH 01/15] Add failsafe-driven compatibility harness --- pom.xml | 60 +- .../java/io/jawk/BwkMiscIT.java} | 50 +- .../java/io/jawk/BwkPIT.java} | 50 +- .../java/io/jawk/BwkTIT.java} | 51 +- src/it/java/io/jawk/GawkCompatibilityIT.java | 350 + src/it/java/io/jawk/GawkMaketestsParser.java | 229 + .../resources/bwk/misc/inputs/funstack.in | 0 .../resources/bwk/misc/results/funstack.ok | 0 .../resources/bwk/misc/scripts/funstack.awk | 0 .../resources/bwk/p/inputs/test.countries | 0 .../resources/bwk/p/results/p.1.ok | 0 .../resources/bwk/p/results/p.10.ok | 0 .../resources/bwk/p/results/p.11.ok | 0 .../resources/bwk/p/results/p.12.ok | 0 .../resources/bwk/p/results/p.13.ok | 0 .../resources/bwk/p/results/p.14.ok | 0 .../resources/bwk/p/results/p.15.ok | 0 .../resources/bwk/p/results/p.16.ok | 0 .../resources/bwk/p/results/p.17.ok | 0 .../resources/bwk/p/results/p.18.ok | 0 .../resources/bwk/p/results/p.19.ok | 0 .../resources/bwk/p/results/p.2.ok | 0 .../resources/bwk/p/results/p.20.ok | 0 .../resources/bwk/p/results/p.21.ok | 0 .../resources/bwk/p/results/p.21a.ok | 0 .../resources/bwk/p/results/p.22.ok | 0 .../resources/bwk/p/results/p.23.ok | 0 .../resources/bwk/p/results/p.24.ok | 0 .../resources/bwk/p/results/p.25.ok | 0 .../resources/bwk/p/results/p.26.ok | 0 .../resources/bwk/p/results/p.26a.ok | 0 .../resources/bwk/p/results/p.27.ok | 0 .../resources/bwk/p/results/p.28.ok | 0 .../resources/bwk/p/results/p.29.ok | 0 .../resources/bwk/p/results/p.3.ok | 0 .../resources/bwk/p/results/p.30.ok | 0 .../resources/bwk/p/results/p.31.ok | 0 .../resources/bwk/p/results/p.32.ok | 0 .../resources/bwk/p/results/p.33.ok | 0 .../resources/bwk/p/results/p.34.ok | 0 .../resources/bwk/p/results/p.35.ok | 0 .../resources/bwk/p/results/p.36.ok | 0 .../resources/bwk/p/results/p.37.ok | 0 .../resources/bwk/p/results/p.38.ok | 0 .../resources/bwk/p/results/p.39.ok | 0 .../resources/bwk/p/results/p.4.ok | 0 .../resources/bwk/p/results/p.40.ok | 0 .../resources/bwk/p/results/p.41.ok | 0 .../resources/bwk/p/results/p.42.ok | 0 .../resources/bwk/p/results/p.43.ok | 0 .../resources/bwk/p/results/p.44.ok | 0 .../resources/bwk/p/results/p.45.ok | 0 .../resources/bwk/p/results/p.46.ok | 0 .../resources/bwk/p/results/p.47.ok | 0 .../resources/bwk/p/results/p.48.ok | 0 .../resources/bwk/p/results/p.48a.ok | 0 .../resources/bwk/p/results/p.49.ok | 0 .../resources/bwk/p/results/p.5.ok | 0 .../resources/bwk/p/results/p.50.ok | 0 .../resources/bwk/p/results/p.51.ok | 0 .../resources/bwk/p/results/p.52.ok | 0 .../resources/bwk/p/results/p.5a.ok | 0 .../resources/bwk/p/results/p.6.ok | 0 .../resources/bwk/p/results/p.7.ok | 0 .../resources/bwk/p/results/p.8.ok | 0 .../resources/bwk/p/results/p.9.ok | 0 .../resources/bwk/p/results/p.table.ok | 0 src/{test => it}/resources/bwk/p/scripts/p.1 | 0 src/{test => it}/resources/bwk/p/scripts/p.10 | 0 src/{test => it}/resources/bwk/p/scripts/p.11 | 0 src/{test => it}/resources/bwk/p/scripts/p.12 | 0 src/{test => it}/resources/bwk/p/scripts/p.13 | 0 src/{test => it}/resources/bwk/p/scripts/p.14 | 0 src/{test => it}/resources/bwk/p/scripts/p.15 | 0 src/{test => it}/resources/bwk/p/scripts/p.16 | 0 src/{test => it}/resources/bwk/p/scripts/p.17 | 0 src/{test => it}/resources/bwk/p/scripts/p.18 | 0 src/{test => it}/resources/bwk/p/scripts/p.19 | 0 src/{test => it}/resources/bwk/p/scripts/p.2 | 0 src/{test => it}/resources/bwk/p/scripts/p.20 | 0 src/{test => it}/resources/bwk/p/scripts/p.21 | 0 .../resources/bwk/p/scripts/p.21a | 0 src/{test => it}/resources/bwk/p/scripts/p.22 | 0 src/{test => it}/resources/bwk/p/scripts/p.23 | 0 src/{test => it}/resources/bwk/p/scripts/p.24 | 0 src/{test => it}/resources/bwk/p/scripts/p.25 | 0 src/{test => it}/resources/bwk/p/scripts/p.26 | 0 .../resources/bwk/p/scripts/p.26a | 0 src/{test => it}/resources/bwk/p/scripts/p.27 | 0 src/{test => it}/resources/bwk/p/scripts/p.28 | 0 src/{test => it}/resources/bwk/p/scripts/p.29 | 0 src/{test => it}/resources/bwk/p/scripts/p.3 | 0 src/{test => it}/resources/bwk/p/scripts/p.30 | 0 src/{test => it}/resources/bwk/p/scripts/p.31 | 0 src/{test => it}/resources/bwk/p/scripts/p.32 | 0 src/{test => it}/resources/bwk/p/scripts/p.33 | 0 src/{test => it}/resources/bwk/p/scripts/p.34 | 0 src/{test => it}/resources/bwk/p/scripts/p.35 | 0 src/{test => it}/resources/bwk/p/scripts/p.36 | 0 src/{test => it}/resources/bwk/p/scripts/p.37 | 0 src/{test => it}/resources/bwk/p/scripts/p.38 | 0 src/{test => it}/resources/bwk/p/scripts/p.39 | 0 src/{test => it}/resources/bwk/p/scripts/p.4 | 0 src/{test => it}/resources/bwk/p/scripts/p.40 | 0 src/{test => it}/resources/bwk/p/scripts/p.41 | 0 src/{test => it}/resources/bwk/p/scripts/p.42 | 0 src/{test => it}/resources/bwk/p/scripts/p.43 | 0 src/{test => it}/resources/bwk/p/scripts/p.44 | 0 src/{test => it}/resources/bwk/p/scripts/p.45 | 0 src/{test => it}/resources/bwk/p/scripts/p.46 | 0 src/{test => it}/resources/bwk/p/scripts/p.47 | 0 src/{test => it}/resources/bwk/p/scripts/p.48 | 0 .../resources/bwk/p/scripts/p.48a | 0 src/{test => it}/resources/bwk/p/scripts/p.49 | 0 src/{test => it}/resources/bwk/p/scripts/p.5 | 0 src/{test => it}/resources/bwk/p/scripts/p.50 | 0 src/{test => it}/resources/bwk/p/scripts/p.51 | 0 src/{test => it}/resources/bwk/p/scripts/p.52 | 0 src/{test => it}/resources/bwk/p/scripts/p.5a | 0 src/{test => it}/resources/bwk/p/scripts/p.6 | 0 src/{test => it}/resources/bwk/p/scripts/p.7 | 0 src/{test => it}/resources/bwk/p/scripts/p.8 | 0 src/{test => it}/resources/bwk/p/scripts/p.9 | 0 .../resources/bwk/p/scripts/p.table | 0 .../resources/bwk/t/inputs/test.data | 0 .../resources/bwk/t/results/t.0.ok | 0 .../resources/bwk/t/results/t.0a.ok | 0 .../resources/bwk/t/results/t.1.ok | 0 .../resources/bwk/t/results/t.1.x.ok | 0 .../resources/bwk/t/results/t.2.ok | 0 .../resources/bwk/t/results/t.2.x.ok | 0 .../resources/bwk/t/results/t.3.ok | 0 .../resources/bwk/t/results/t.3.x.ok | 0 .../resources/bwk/t/results/t.4.ok | 0 .../resources/bwk/t/results/t.4.x.ok | 0 .../resources/bwk/t/results/t.5.x.ok | 0 .../resources/bwk/t/results/t.6.ok | 0 .../resources/bwk/t/results/t.6.x.ok | 0 .../resources/bwk/t/results/t.6a.ok | 0 .../resources/bwk/t/results/t.6b.ok | 0 .../resources/bwk/t/results/t.8.x.ok | 0 .../resources/bwk/t/results/t.8.y.ok | 0 .../resources/bwk/t/results/t.NF.ok | 0 .../resources/bwk/t/results/t.a.ok | 0 .../resources/bwk/t/results/t.addops.ok | 0 .../resources/bwk/t/results/t.aeiou.ok | 0 .../resources/bwk/t/results/t.aeiouy.ok | 0 .../resources/bwk/t/results/t.arith.ok | 0 .../resources/bwk/t/results/t.array.ok | 0 .../resources/bwk/t/results/t.array1.ok | 0 .../resources/bwk/t/results/t.array2.ok | 0 .../resources/bwk/t/results/t.assert.ok | 0 .../resources/bwk/t/results/t.avg.ok | 0 .../resources/bwk/t/results/t.b.x.ok | 0 .../resources/bwk/t/results/t.be.ok | 0 .../resources/bwk/t/results/t.beginexit.ok | 0 .../resources/bwk/t/results/t.beginnext.ok | 0 .../resources/bwk/t/results/t.break.ok | 0 .../resources/bwk/t/results/t.break1.ok | 0 .../resources/bwk/t/results/t.break2.ok | 0 .../resources/bwk/t/results/t.break3.ok | 0 .../resources/bwk/t/results/t.bug1.ok | 0 .../resources/bwk/t/results/t.builtins.ok | 0 .../resources/bwk/t/results/t.cat.ok | 0 .../resources/bwk/t/results/t.cat1.ok | 0 .../resources/bwk/t/results/t.cat2.ok | 0 .../resources/bwk/t/results/t.cmp.ok | 0 .../resources/bwk/t/results/t.coerce.ok | 0 .../resources/bwk/t/results/t.coerce2.ok | 0 .../resources/bwk/t/results/t.comment.ok | 0 .../resources/bwk/t/results/t.comment1.ok | 0 .../resources/bwk/t/results/t.concat.ok | 0 .../resources/bwk/t/results/t.cond.ok | 0 .../resources/bwk/t/results/t.contin.ok | 0 .../resources/bwk/t/results/t.count.ok | 0 .../resources/bwk/t/results/t.crlf.ok | 0 .../resources/bwk/t/results/t.cum.ok | 0 .../resources/bwk/t/results/t.d.x.ok | 0 .../resources/bwk/t/results/t.delete0.ok | 0 .../resources/bwk/t/results/t.delete1.ok | 0 .../resources/bwk/t/results/t.delete2.ok | 0 .../resources/bwk/t/results/t.delete3.ok | 0 .../resources/bwk/t/results/t.do.ok | 0 .../resources/bwk/t/results/t.e.ok | 0 .../resources/bwk/t/results/t.else.ok | 0 .../resources/bwk/t/results/t.exit.ok | 0 .../resources/bwk/t/results/t.exit1.ok | 0 .../resources/bwk/t/results/t.f.ok | 0 .../resources/bwk/t/results/t.f.x.ok | 0 .../resources/bwk/t/results/t.f0.ok | 0 .../resources/bwk/t/results/t.f1.ok | 0 .../resources/bwk/t/results/t.f2.ok | 0 .../resources/bwk/t/results/t.f3.ok | 0 .../resources/bwk/t/results/t.f4.ok | 0 .../resources/bwk/t/results/t.for.ok | 0 .../resources/bwk/t/results/t.for1.ok | 0 .../resources/bwk/t/results/t.for2.ok | 0 .../resources/bwk/t/results/t.for3.ok | 0 .../resources/bwk/t/results/t.format4.ok | 0 .../resources/bwk/t/results/t.fun.ok | 0 .../resources/bwk/t/results/t.fun0.ok | 0 .../resources/bwk/t/results/t.fun1.ok | 0 .../resources/bwk/t/results/t.fun2.ok | 0 .../resources/bwk/t/results/t.fun3.ok | 0 .../resources/bwk/t/results/t.fun4.ok | 0 .../resources/bwk/t/results/t.fun5.ok | 0 .../resources/bwk/t/results/t.getline1.ok | 0 .../resources/bwk/t/results/t.getval.ok | 0 .../resources/bwk/t/results/t.gsub.ok | 0 .../resources/bwk/t/results/t.gsub1.ok | 0 .../resources/bwk/t/results/t.gsub3.ok | 0 .../resources/bwk/t/results/t.gsub4.ok | 0 .../resources/bwk/t/results/t.i.x.ok | 0 .../resources/bwk/t/results/t.if.ok | 0 .../resources/bwk/t/results/t.in.ok | 0 .../resources/bwk/t/results/t.in1.ok | 0 .../resources/bwk/t/results/t.in2.ok | 0 .../resources/bwk/t/results/t.in3.ok | 0 .../resources/bwk/t/results/t.incr.ok | 0 .../resources/bwk/t/results/t.incr2.ok | 0 .../resources/bwk/t/results/t.incr3.ok | 0 .../resources/bwk/t/results/t.index.ok | 0 .../resources/bwk/t/results/t.intest.ok | 0 .../resources/bwk/t/results/t.intest2.ok | 0 .../resources/bwk/t/results/t.j.x.ok | 0 .../resources/bwk/t/results/t.longstr.ok | 0 .../resources/bwk/t/results/t.makef.ok | 0 .../resources/bwk/t/results/t.match.ok | 0 .../resources/bwk/t/results/t.match1.ok | 0 .../resources/bwk/t/results/t.max.ok | 0 .../resources/bwk/t/results/t.mod.ok | 0 .../resources/bwk/t/results/t.monotone.ok | 0 .../resources/bwk/t/results/t.nameval.ok | 0 .../resources/bwk/t/results/t.next.ok | 0 .../resources/bwk/t/results/t.not.ok | 0 .../resources/bwk/t/results/t.null0.ok | 0 .../resources/bwk/t/results/t.ofmt.ok | 0 .../resources/bwk/t/results/t.ofs.ok | 0 .../resources/bwk/t/results/t.ors.ok | 0 .../resources/bwk/t/results/t.pat.ok | 0 .../resources/bwk/t/results/t.pipe.ok | 0 .../resources/bwk/t/results/t.pp.ok | 0 .../resources/bwk/t/results/t.pp1.ok | 0 .../resources/bwk/t/results/t.pp2.ok | 0 .../resources/bwk/t/results/t.printf.ok | 0 .../resources/bwk/t/results/t.printf2.ok | 0 .../resources/bwk/t/results/t.quote.ok | 0 .../resources/bwk/t/results/t.randk.ok | 0 .../resources/bwk/t/results/t.re1.ok | 0 .../resources/bwk/t/results/t.re1a.ok | 0 .../resources/bwk/t/results/t.re2.ok | 0 .../resources/bwk/t/results/t.re3.ok | 0 .../resources/bwk/t/results/t.re4.ok | 0 .../resources/bwk/t/results/t.re5.ok | 0 .../resources/bwk/t/results/t.re7.ok | 0 .../resources/bwk/t/results/t.reFS.ok | 0 .../resources/bwk/t/results/t.rec.ok | 0 .../resources/bwk/t/results/t.redir1.ok | 0 .../resources/bwk/t/results/t.reg.ok | 0 .../resources/bwk/t/results/t.roff.ok | 0 .../resources/bwk/t/results/t.sep.ok | 0 .../resources/bwk/t/results/t.seqno.ok | 0 .../resources/bwk/t/results/t.set0.ok | 0 .../resources/bwk/t/results/t.set0a.ok | 0 .../resources/bwk/t/results/t.set0b.ok | 0 .../resources/bwk/t/results/t.set1.ok | 0 .../resources/bwk/t/results/t.set2.ok | 0 .../resources/bwk/t/results/t.set3.ok | 0 .../resources/bwk/t/results/t.split1.ok | 0 .../resources/bwk/t/results/t.split2.ok | 0 .../resources/bwk/t/results/t.split2a.ok | 0 .../resources/bwk/t/results/t.split3.ok | 0 .../resources/bwk/t/results/t.split4.ok | 0 .../resources/bwk/t/results/t.split8.ok | 0 .../resources/bwk/t/results/t.split9.ok | 0 .../resources/bwk/t/results/t.split9a.ok | 0 .../resources/bwk/t/results/t.stately.ok | 0 .../resources/bwk/t/results/t.strcmp.ok | 0 .../resources/bwk/t/results/t.strcmp1.ok | 0 .../resources/bwk/t/results/t.strnum.ok | 0 .../resources/bwk/t/results/t.sub0.ok | 0 .../resources/bwk/t/results/t.sub1.ok | 0 .../resources/bwk/t/results/t.sub2.ok | 0 .../resources/bwk/t/results/t.sub3.ok | 0 .../resources/bwk/t/results/t.substr.ok | 0 .../resources/bwk/t/results/t.substr1.ok | 0 .../resources/bwk/t/results/t.time.ok | 0 .../resources/bwk/t/results/t.vf.ok | 0 .../resources/bwk/t/results/t.vf1.ok | 0 .../resources/bwk/t/results/t.vf2.ok | 0 .../resources/bwk/t/results/t.vf3.ok | 0 .../resources/bwk/t/results/t.x.ok | 0 src/{test => it}/resources/bwk/t/scripts/t.0 | 0 src/{test => it}/resources/bwk/t/scripts/t.0a | 0 src/{test => it}/resources/bwk/t/scripts/t.1 | 0 .../resources/bwk/t/scripts/t.1.x | 0 src/{test => it}/resources/bwk/t/scripts/t.2 | 0 .../resources/bwk/t/scripts/t.2.x | 0 src/{test => it}/resources/bwk/t/scripts/t.3 | 0 .../resources/bwk/t/scripts/t.3.x | 0 src/{test => it}/resources/bwk/t/scripts/t.4 | 0 .../resources/bwk/t/scripts/t.4.x | 0 .../resources/bwk/t/scripts/t.5.x | 0 src/{test => it}/resources/bwk/t/scripts/t.6 | 0 .../resources/bwk/t/scripts/t.6.x | 0 src/{test => it}/resources/bwk/t/scripts/t.6a | 0 src/{test => it}/resources/bwk/t/scripts/t.6b | 0 .../resources/bwk/t/scripts/t.8.x | 0 .../resources/bwk/t/scripts/t.8.y | 0 src/{test => it}/resources/bwk/t/scripts/t.NF | 0 src/{test => it}/resources/bwk/t/scripts/t.a | 0 .../resources/bwk/t/scripts/t.addops | 0 .../resources/bwk/t/scripts/t.aeiou | 0 .../resources/bwk/t/scripts/t.aeiouy | 0 .../resources/bwk/t/scripts/t.arith | 0 .../resources/bwk/t/scripts/t.array | 0 .../resources/bwk/t/scripts/t.array1 | 0 .../resources/bwk/t/scripts/t.array2 | 0 .../resources/bwk/t/scripts/t.assert | 0 .../resources/bwk/t/scripts/t.avg | 0 .../resources/bwk/t/scripts/t.b.x | 0 src/{test => it}/resources/bwk/t/scripts/t.be | 0 .../resources/bwk/t/scripts/t.beginexit | 0 .../resources/bwk/t/scripts/t.beginnext | 0 .../resources/bwk/t/scripts/t.break | 0 .../resources/bwk/t/scripts/t.break1 | 0 .../resources/bwk/t/scripts/t.break2 | 0 .../resources/bwk/t/scripts/t.break3 | 0 .../resources/bwk/t/scripts/t.bug1 | 0 .../resources/bwk/t/scripts/t.builtins | 0 .../resources/bwk/t/scripts/t.cat | 0 .../resources/bwk/t/scripts/t.cat1 | 0 .../resources/bwk/t/scripts/t.cat2 | 0 .../resources/bwk/t/scripts/t.cmp | 0 .../resources/bwk/t/scripts/t.coerce | 0 .../resources/bwk/t/scripts/t.coerce2 | 0 .../resources/bwk/t/scripts/t.comment | 0 .../resources/bwk/t/scripts/t.comment1 | 0 .../resources/bwk/t/scripts/t.concat | 0 .../resources/bwk/t/scripts/t.cond | 0 .../resources/bwk/t/scripts/t.contin | 0 .../resources/bwk/t/scripts/t.count | 0 .../resources/bwk/t/scripts/t.crlf | 0 .../resources/bwk/t/scripts/t.cum | 0 .../resources/bwk/t/scripts/t.d.x | 0 .../resources/bwk/t/scripts/t.delete0 | 0 .../resources/bwk/t/scripts/t.delete1 | 0 .../resources/bwk/t/scripts/t.delete2 | 0 .../resources/bwk/t/scripts/t.delete3 | 0 src/{test => it}/resources/bwk/t/scripts/t.do | 0 src/{test => it}/resources/bwk/t/scripts/t.e | 0 .../resources/bwk/t/scripts/t.else | 0 .../resources/bwk/t/scripts/t.exit | 0 .../resources/bwk/t/scripts/t.exit1 | 0 src/{test => it}/resources/bwk/t/scripts/t.f | 0 .../resources/bwk/t/scripts/t.f.x | 0 src/{test => it}/resources/bwk/t/scripts/t.f0 | 0 src/{test => it}/resources/bwk/t/scripts/t.f1 | 0 src/{test => it}/resources/bwk/t/scripts/t.f2 | 0 src/{test => it}/resources/bwk/t/scripts/t.f3 | 0 src/{test => it}/resources/bwk/t/scripts/t.f4 | 0 .../resources/bwk/t/scripts/t.for | 0 .../resources/bwk/t/scripts/t.for1 | 0 .../resources/bwk/t/scripts/t.for2 | 0 .../resources/bwk/t/scripts/t.for3 | 0 .../resources/bwk/t/scripts/t.format4 | 0 .../resources/bwk/t/scripts/t.fun | 0 .../resources/bwk/t/scripts/t.fun0 | 0 .../resources/bwk/t/scripts/t.fun1 | 0 .../resources/bwk/t/scripts/t.fun2 | 0 .../resources/bwk/t/scripts/t.fun3 | 0 .../resources/bwk/t/scripts/t.fun4 | 0 .../resources/bwk/t/scripts/t.fun5 | 0 .../resources/bwk/t/scripts/t.getline1 | 0 .../resources/bwk/t/scripts/t.getval | 0 .../resources/bwk/t/scripts/t.gsub | 0 .../resources/bwk/t/scripts/t.gsub1 | 0 .../resources/bwk/t/scripts/t.gsub3 | 0 .../resources/bwk/t/scripts/t.gsub4 | 0 .../resources/bwk/t/scripts/t.i.x | 0 src/{test => it}/resources/bwk/t/scripts/t.if | 0 src/{test => it}/resources/bwk/t/scripts/t.in | 0 .../resources/bwk/t/scripts/t.in1 | 0 .../resources/bwk/t/scripts/t.in2 | 0 .../resources/bwk/t/scripts/t.in3 | 0 .../resources/bwk/t/scripts/t.incr | 0 .../resources/bwk/t/scripts/t.incr2 | 0 .../resources/bwk/t/scripts/t.incr3 | 0 .../resources/bwk/t/scripts/t.index | 0 .../resources/bwk/t/scripts/t.intest | 0 .../resources/bwk/t/scripts/t.intest2 | 0 .../resources/bwk/t/scripts/t.j.x | 0 .../resources/bwk/t/scripts/t.longstr | 0 .../resources/bwk/t/scripts/t.makef | 0 .../resources/bwk/t/scripts/t.match | 0 .../resources/bwk/t/scripts/t.match1 | 0 .../resources/bwk/t/scripts/t.max | 0 .../resources/bwk/t/scripts/t.mod | 0 .../resources/bwk/t/scripts/t.monotone | 0 .../resources/bwk/t/scripts/t.nameval | 0 .../resources/bwk/t/scripts/t.next | 0 .../resources/bwk/t/scripts/t.not | 0 .../resources/bwk/t/scripts/t.null0 | 0 .../resources/bwk/t/scripts/t.ofmt | 0 .../resources/bwk/t/scripts/t.ofs | 0 .../resources/bwk/t/scripts/t.ors | 0 .../resources/bwk/t/scripts/t.pat | 0 .../resources/bwk/t/scripts/t.pipe | 0 src/{test => it}/resources/bwk/t/scripts/t.pp | 0 .../resources/bwk/t/scripts/t.pp1 | 0 .../resources/bwk/t/scripts/t.pp2 | 0 .../resources/bwk/t/scripts/t.printf | 0 .../resources/bwk/t/scripts/t.printf2 | 0 .../resources/bwk/t/scripts/t.quote | 0 .../resources/bwk/t/scripts/t.randk | 0 .../resources/bwk/t/scripts/t.re1 | 0 .../resources/bwk/t/scripts/t.re1a | 0 .../resources/bwk/t/scripts/t.re2 | 0 .../resources/bwk/t/scripts/t.re3 | 0 .../resources/bwk/t/scripts/t.re4 | 0 .../resources/bwk/t/scripts/t.re5 | 0 .../resources/bwk/t/scripts/t.re7 | 0 .../resources/bwk/t/scripts/t.reFS | 0 .../resources/bwk/t/scripts/t.rec | 0 .../resources/bwk/t/scripts/t.redir1 | 0 .../resources/bwk/t/scripts/t.reg | 0 .../resources/bwk/t/scripts/t.roff | 0 .../resources/bwk/t/scripts/t.sep | 0 .../resources/bwk/t/scripts/t.seqno | 0 .../resources/bwk/t/scripts/t.set0 | 0 .../resources/bwk/t/scripts/t.set0a | 0 .../resources/bwk/t/scripts/t.set0b | 0 .../resources/bwk/t/scripts/t.set1 | 0 .../resources/bwk/t/scripts/t.set2 | 0 .../resources/bwk/t/scripts/t.set3 | 0 .../resources/bwk/t/scripts/t.split1 | 0 .../resources/bwk/t/scripts/t.split2 | 0 .../resources/bwk/t/scripts/t.split2a | 0 .../resources/bwk/t/scripts/t.split3 | 0 .../resources/bwk/t/scripts/t.split4 | 0 .../resources/bwk/t/scripts/t.split8 | 0 .../resources/bwk/t/scripts/t.split9 | 0 .../resources/bwk/t/scripts/t.split9a | 0 .../resources/bwk/t/scripts/t.stately | 0 .../resources/bwk/t/scripts/t.strcmp | 0 .../resources/bwk/t/scripts/t.strcmp1 | 0 .../resources/bwk/t/scripts/t.strnum | 0 .../resources/bwk/t/scripts/t.sub0 | 0 .../resources/bwk/t/scripts/t.sub1 | 0 .../resources/bwk/t/scripts/t.sub2 | 0 .../resources/bwk/t/scripts/t.sub3 | 0 .../resources/bwk/t/scripts/t.substr | 0 .../resources/bwk/t/scripts/t.substr1 | 0 .../resources/bwk/t/scripts/t.time | 0 src/{test => it}/resources/bwk/t/scripts/t.vf | 0 .../resources/bwk/t/scripts/t.vf1 | 0 .../resources/bwk/t/scripts/t.vf2 | 0 .../resources/bwk/t/scripts/t.vf3 | 0 src/{test => it}/resources/bwk/t/scripts/t.x | 0 src/{test => it}/resources/gawk/ChangeLog | 0 src/{test => it}/resources/gawk/ChangeLog.0 | 0 src/{test => it}/resources/gawk/ChangeLog.1 | 0 src/{test => it}/resources/gawk/Gentests | 0 src/{test => it}/resources/gawk/Makefile.am | 0 src/{test => it}/resources/gawk/Makefile.in | 0 src/{test => it}/resources/gawk/Maketests | 0 src/it/resources/gawk/README | 24 + src/{test => it}/resources/gawk/aadelete1.awk | 0 src/{test => it}/resources/gawk/aadelete1.ok | 0 src/{test => it}/resources/gawk/aadelete2.awk | 0 src/{test => it}/resources/gawk/aadelete2.ok | 0 src/{test => it}/resources/gawk/aarray1.awk | 0 src/{test => it}/resources/gawk/aarray1.ok | 0 src/{test => it}/resources/gawk/aasort.awk | 0 src/{test => it}/resources/gawk/aasort.ok | 0 src/{test => it}/resources/gawk/aasorti.awk | 0 src/{test => it}/resources/gawk/aasorti.ok | 0 src/{test => it}/resources/gawk/addcomma.awk | 0 src/{test => it}/resources/gawk/addcomma.in | 0 src/{test => it}/resources/gawk/addcomma.ok | 0 src/{test => it}/resources/gawk/anchgsub.awk | 0 src/{test => it}/resources/gawk/anchgsub.in | 0 src/{test => it}/resources/gawk/anchgsub.ok | 0 src/{test => it}/resources/gawk/anchor.awk | 0 src/{test => it}/resources/gawk/anchor.in | 0 src/{test => it}/resources/gawk/anchor.ok | 0 src/{test => it}/resources/gawk/apiterm.awk | 0 src/{test => it}/resources/gawk/apiterm.in | 0 src/{test => it}/resources/gawk/apiterm.ok | 0 src/{test => it}/resources/gawk/argarray.awk | 0 src/{test => it}/resources/gawk/argarray.in | 0 src/{test => it}/resources/gawk/argarray.ok | 0 .../resources/gawk/argcasfile.awk | 0 src/{test => it}/resources/gawk/argcasfile.in | 0 src/{test => it}/resources/gawk/argcasfile.ok | 0 src/{test => it}/resources/gawk/argtest.awk | 0 src/{test => it}/resources/gawk/argtest.ok | 0 src/{test => it}/resources/gawk/arrayind1.awk | 0 src/{test => it}/resources/gawk/arrayind1.in | 0 src/{test => it}/resources/gawk/arrayind1.ok | 0 src/{test => it}/resources/gawk/arrayind2.awk | 0 src/{test => it}/resources/gawk/arrayind2.ok | 0 src/{test => it}/resources/gawk/arrayind3.awk | 0 src/{test => it}/resources/gawk/arrayind3.ok | 0 src/{test => it}/resources/gawk/arrayparm.awk | 0 src/{test => it}/resources/gawk/arrayparm.ok | 0 src/{test => it}/resources/gawk/arrayprm2.awk | 0 src/{test => it}/resources/gawk/arrayprm2.ok | 0 src/{test => it}/resources/gawk/arrayprm3.awk | 0 src/{test => it}/resources/gawk/arrayprm3.ok | 0 src/{test => it}/resources/gawk/arrayref.awk | 0 src/{test => it}/resources/gawk/arrayref.ok | 0 src/{test => it}/resources/gawk/arraysort.awk | 0 src/{test => it}/resources/gawk/arraysort.ok | 0 .../resources/gawk/arraysort2.awk | 0 src/{test => it}/resources/gawk/arraysort2.ok | 0 .../resources/gawk/arraytype-mpfr.ok | 0 src/{test => it}/resources/gawk/arraytype.awk | 0 src/{test => it}/resources/gawk/arraytype.ok | 0 src/{test => it}/resources/gawk/arrdbg.awk | 0 src/{test => it}/resources/gawk/arrymem1.awk | 0 src/{test => it}/resources/gawk/arrymem1.ok | 0 src/{test => it}/resources/gawk/arryref2.awk | 0 src/{test => it}/resources/gawk/arryref2.ok | 0 src/{test => it}/resources/gawk/arryref3.awk | 0 src/{test => it}/resources/gawk/arryref3.ok | 0 src/{test => it}/resources/gawk/arryref4.awk | 0 src/{test => it}/resources/gawk/arryref4.ok | 0 src/{test => it}/resources/gawk/arryref5.awk | 0 src/{test => it}/resources/gawk/arryref5.ok | 0 src/{test => it}/resources/gawk/arynasty.awk | 0 src/{test => it}/resources/gawk/arynasty.ok | 0 src/{test => it}/resources/gawk/arynocls.awk | 6 +- src/{test => it}/resources/gawk/arynocls.in | 0 src/{test => it}/resources/gawk/arynocls.ok | 0 src/{test => it}/resources/gawk/aryprm1.awk | 0 src/{test => it}/resources/gawk/aryprm1.ok | 0 src/{test => it}/resources/gawk/aryprm2.awk | 0 src/{test => it}/resources/gawk/aryprm2.ok | 0 src/{test => it}/resources/gawk/aryprm3.awk | 0 src/{test => it}/resources/gawk/aryprm3.ok | 0 src/{test => it}/resources/gawk/aryprm4.awk | 0 src/{test => it}/resources/gawk/aryprm4.ok | 0 src/{test => it}/resources/gawk/aryprm5.awk | 0 src/{test => it}/resources/gawk/aryprm5.ok | 0 src/{test => it}/resources/gawk/aryprm6.awk | 0 src/{test => it}/resources/gawk/aryprm6.ok | 0 src/{test => it}/resources/gawk/aryprm7.awk | 0 src/{test => it}/resources/gawk/aryprm7.ok | 0 src/{test => it}/resources/gawk/aryprm8.awk | 0 src/{test => it}/resources/gawk/aryprm8.ok | 0 src/{test => it}/resources/gawk/aryprm9.awk | 0 src/{test => it}/resources/gawk/aryprm9.ok | 0 src/{test => it}/resources/gawk/arysubnm.awk | 0 src/{test => it}/resources/gawk/arysubnm.ok | 0 src/{test => it}/resources/gawk/aryunasgn.awk | 0 src/{test => it}/resources/gawk/aryunasgn.ok | 0 src/{test => it}/resources/gawk/asgext.awk | 0 src/{test => it}/resources/gawk/asgext.in | 0 src/{test => it}/resources/gawk/asgext.ok | 0 src/{test => it}/resources/gawk/asort.awk | 0 src/{test => it}/resources/gawk/asort.ok | 0 src/{test => it}/resources/gawk/asortbool.awk | 0 src/{test => it}/resources/gawk/asortbool.ok | 0 src/{test => it}/resources/gawk/asorti.awk | 0 src/{test => it}/resources/gawk/asorti.ok | 0 .../resources/gawk/asortsymtab.awk | 0 .../resources/gawk/asortsymtab.ok | 0 .../resources/gawk/assignnumfield.awk | 0 .../resources/gawk/assignnumfield.in | 0 .../resources/gawk/assignnumfield.ok | 0 .../resources/gawk/assignnumfield2.awk | 0 .../resources/gawk/assignnumfield2.ok | 0 src/{test => it}/resources/gawk/awkpath.ok | 0 src/{test => it}/resources/gawk/back89.awk | 0 src/{test => it}/resources/gawk/back89.in | 0 src/{test => it}/resources/gawk/back89.ok | 0 src/{test => it}/resources/gawk/backbigs1.awk | 0 src/{test => it}/resources/gawk/backbigs1.in | 0 src/{test => it}/resources/gawk/backbigs1.ok | 0 src/{test => it}/resources/gawk/backgsub.awk | 0 src/{test => it}/resources/gawk/backgsub.in | 0 src/{test => it}/resources/gawk/backgsub.ok | 0 .../resources/gawk/backsmalls1.awk | 0 .../resources/gawk/backsmalls1.in | 0 .../resources/gawk/backsmalls1.ok | 0 .../resources/gawk/backsmalls2.awk | 0 .../resources/gawk/backsmalls2.ok | 0 src/{test => it}/resources/gawk/backw.awk | 0 src/{test => it}/resources/gawk/backw.in | 0 src/{test => it}/resources/gawk/backw.ok | 0 src/{test => it}/resources/gawk/badargs.ok | 0 .../resources/gawk/badassign1.awk | 0 src/{test => it}/resources/gawk/badassign1.ok | 0 src/{test => it}/resources/gawk/badbuild.awk | 0 src/{test => it}/resources/gawk/badbuild.in | 0 src/{test => it}/resources/gawk/badbuild.ok | 0 .../resources/gawk/beginfile1.awk | 0 src/{test => it}/resources/gawk/beginfile1.ok | 0 src/{test => it}/resources/gawk/beginfile2.in | 0 src/{test => it}/resources/gawk/beginfile2.ok | 0 src/{test => it}/resources/gawk/beginfile2.sh | 0 src/{test => it}/resources/gawk/binmode1.ok | 0 src/{test => it}/resources/gawk/callparam.awk | 0 src/{test => it}/resources/gawk/callparam.ok | 0 .../resources/gawk/charasbytes.awk | 0 .../resources/gawk/charasbytes.in | 0 .../resources/gawk/charasbytes.ok | 0 src/it/resources/gawk/check_retest.awk | 2 + src/it/resources/gawk/checknegtime.awk | 22 + src/{test => it}/resources/gawk/childin.awk | 0 src/{test => it}/resources/gawk/childin.in | 0 src/{test => it}/resources/gawk/childin.ok | 0 src/it/resources/gawk/clobber.awk | 98 + src/it/resources/gawk/clobber.ok | 1 + src/{test => it}/resources/gawk/clos1way.awk | 0 src/{test => it}/resources/gawk/clos1way.ok | 0 src/{test => it}/resources/gawk/clos1way2.awk | 0 src/{test => it}/resources/gawk/clos1way2.in | 0 src/{test => it}/resources/gawk/clos1way2.ok | 0 src/{test => it}/resources/gawk/clos1way3.awk | 0 src/{test => it}/resources/gawk/clos1way3.ok | 0 src/{test => it}/resources/gawk/clos1way4.awk | 0 src/{test => it}/resources/gawk/clos1way4.ok | 0 src/{test => it}/resources/gawk/clos1way5.awk | 0 src/{test => it}/resources/gawk/clos1way5.ok | 0 src/{test => it}/resources/gawk/clos1way6.awk | 0 src/{test => it}/resources/gawk/clos1way6.ok | 0 .../resources/gawk/close_status.awk | 0 .../resources/gawk/close_status.ok | 0 src/{test => it}/resources/gawk/closebad.awk | 0 src/{test => it}/resources/gawk/closebad.ok | 0 src/{test => it}/resources/gawk/clsflnam.awk | 0 src/{test => it}/resources/gawk/clsflnam.in | 0 src/{test => it}/resources/gawk/clsflnam.ok | 0 .../resources/gawk/cmdlinefsbacknl.ok | 0 .../resources/gawk/cmdlinefsbacknl.sh | 0 src/{test => it}/resources/gawk/colonwarn.awk | 0 src/{test => it}/resources/gawk/colonwarn.in | 0 src/{test => it}/resources/gawk/colonwarn.ok | 0 src/{test => it}/resources/gawk/commas.awk | 0 src/{test => it}/resources/gawk/commas.ok | 0 src/{test => it}/resources/gawk/compare.awk | 0 src/{test => it}/resources/gawk/compare.in | 0 src/{test => it}/resources/gawk/compare.ok | 0 src/{test => it}/resources/gawk/compare2.awk | 0 src/{test => it}/resources/gawk/compare2.ok | 0 src/{test => it}/resources/gawk/concat1.awk | 0 src/{test => it}/resources/gawk/concat1.in | 0 src/{test => it}/resources/gawk/concat1.ok | 0 src/{test => it}/resources/gawk/concat2.awk | 0 src/{test => it}/resources/gawk/concat2.ok | 0 src/{test => it}/resources/gawk/concat3.awk | 0 src/{test => it}/resources/gawk/concat3.ok | 0 src/{test => it}/resources/gawk/concat4.awk | 0 src/{test => it}/resources/gawk/concat4.in | 0 src/{test => it}/resources/gawk/concat4.ok | 0 src/{test => it}/resources/gawk/concat5.awk | 0 src/{test => it}/resources/gawk/concat5.ok | 0 src/{test => it}/resources/gawk/convfmt.awk | 0 src/{test => it}/resources/gawk/convfmt.ok | 0 src/{test => it}/resources/gawk/crlf.awk | 0 src/{test => it}/resources/gawk/crlf.ok | 0 src/{test => it}/resources/gawk/csv1.awk | 0 src/{test => it}/resources/gawk/csv1.in | 0 src/{test => it}/resources/gawk/csv1.ok | 0 src/{test => it}/resources/gawk/csv2.awk | 0 src/{test => it}/resources/gawk/csv2.ok | 0 src/{test => it}/resources/gawk/csv3.awk | 0 src/{test => it}/resources/gawk/csv3.in | 0 src/{test => it}/resources/gawk/csv3.ok | 0 src/{test => it}/resources/gawk/csvodd.awk | 0 src/{test => it}/resources/gawk/csvodd.in | 0 src/{test => it}/resources/gawk/csvodd.ok | 0 src/{test => it}/resources/gawk/datanonl.awk | 0 src/{test => it}/resources/gawk/datanonl.in | 0 src/{test => it}/resources/gawk/datanonl.ok | 0 src/it/resources/gawk/dbugeval.in | 2 + src/it/resources/gawk/dbugeval.ok | 1 + src/it/resources/gawk/dbugeval2.awk | 4 + src/it/resources/gawk/dbugeval2.in | 3 + src/it/resources/gawk/dbugeval2.ok | 7 + src/it/resources/gawk/dbugeval3.awk | 4 + src/it/resources/gawk/dbugeval3.in | 2 + src/it/resources/gawk/dbugeval3.ok | 3 + .../resources/gawk/dbugeval4.awk} | 0 src/it/resources/gawk/dbugeval4.in | 2 + src/it/resources/gawk/dbugeval4.ok | 5 + src/it/resources/gawk/dbugtypedre1.awk | 1 + src/it/resources/gawk/dbugtypedre1.in | 4 + src/it/resources/gawk/dbugtypedre1.ok | 17 + src/it/resources/gawk/dbugtypedre2.awk | 1 + src/it/resources/gawk/dbugtypedre2.in | 4 + src/it/resources/gawk/dbugtypedre2.ok | 15 + src/{test => it}/resources/gawk/defref.awk | 0 src/{test => it}/resources/gawk/defref.ok | 0 src/{test => it}/resources/gawk/delargv.awk | 0 src/{test => it}/resources/gawk/delargv.ok | 0 src/{test => it}/resources/gawk/delarpm2.awk | 0 src/{test => it}/resources/gawk/delarpm2.ok | 0 src/{test => it}/resources/gawk/delarprm.awk | 0 .../resources/gawk/delarprm.ok} | 0 src/{test => it}/resources/gawk/delfunc.awk | 0 src/{test => it}/resources/gawk/delfunc.ok | 0 src/{test => it}/resources/gawk/delsub.awk | 0 src/{test => it}/resources/gawk/delsub.ok | 0 src/{test => it}/resources/gawk/devfd.in1 | 0 src/{test => it}/resources/gawk/devfd.in2 | 0 src/{test => it}/resources/gawk/devfd.in4 | 0 src/{test => it}/resources/gawk/devfd.in5 | 0 src/{test => it}/resources/gawk/devfd.ok | 0 src/{test => it}/resources/gawk/devfd1.awk | 0 src/{test => it}/resources/gawk/devfd1.ok | 0 src/{test => it}/resources/gawk/devfd2.ok | 0 src/{test => it}/resources/gawk/dfacheck1.awk | 0 src/{test => it}/resources/gawk/dfacheck1.in | 0 src/{test => it}/resources/gawk/dfacheck1.ok | 0 src/{test => it}/resources/gawk/dfacheck2.awk | 0 src/{test => it}/resources/gawk/dfacheck2.in | 0 src/{test => it}/resources/gawk/dfacheck2.ok | 0 src/{test => it}/resources/gawk/dfamb1.awk | 0 src/{test => it}/resources/gawk/dfamb1.in | 0 src/{test => it}/resources/gawk/dfamb1.ok | 0 src/{test => it}/resources/gawk/dfastress.awk | 0 src/{test => it}/resources/gawk/dfastress.ok | 0 src/{test => it}/resources/gawk/divzero.awk | 0 src/{test => it}/resources/gawk/divzero.ok | 0 src/{test => it}/resources/gawk/divzero2.awk | 0 src/{test => it}/resources/gawk/divzero2.ok | 0 src/{test => it}/resources/gawk/double1.awk | 0 src/{test => it}/resources/gawk/double1.ok | 0 src/{test => it}/resources/gawk/double2.awk | 0 src/{test => it}/resources/gawk/double2.ok | 0 src/{test => it}/resources/gawk/dtdgport.awk | 0 src/{test => it}/resources/gawk/dumpvars.in | 0 src/{test => it}/resources/gawk/dumpvars.ok | 0 src/{test => it}/resources/gawk/dynlj.awk | 0 src/{test => it}/resources/gawk/dynlj.ok | 0 src/{test => it}/resources/gawk/elemnew1.awk | 0 .../resources/gawk/elemnew1.ok} | 0 src/{test => it}/resources/gawk/elemnew2.awk | 0 src/{test => it}/resources/gawk/elemnew2.ok | 0 src/{test => it}/resources/gawk/elemnew3.awk | 0 src/{test => it}/resources/gawk/elemnew3.ok | 0 src/{test => it}/resources/gawk/eofsplit.awk | 0 .../resources/gawk/eofsplit.ok} | 0 src/{test => it}/resources/gawk/eofsrc1.ok | 0 src/{test => it}/resources/gawk/eofsrc1a.awk | 0 src/{test => it}/resources/gawk/eofsrc1b.awk | 0 src/{test => it}/resources/gawk/errno.awk | 0 src/{test => it}/resources/gawk/errno.in | 0 src/{test => it}/resources/gawk/errno.ok | 0 .../resources/gawk/escapebrace.awk | 0 .../resources/gawk/escapebrace.in | 0 .../resources/gawk/escapebrace.ok | 0 src/{test => it}/resources/gawk/exit.ok | 0 src/{test => it}/resources/gawk/exit.sh | 0 src/{test => it}/resources/gawk/exit2.awk | 0 .../resources/gawk/exit2.ok} | 0 src/{test => it}/resources/gawk/exitval1.awk | 0 src/{test => it}/resources/gawk/exitval1.ok | 0 src/{test => it}/resources/gawk/exitval2.awk | 0 src/{test => it}/resources/gawk/exitval2.ok | 0 src/{test => it}/resources/gawk/exitval2.w32 | 0 src/{test => it}/resources/gawk/exitval3.awk | 0 src/{test => it}/resources/gawk/exitval3.ok | 0 .../resources/gawk/fcall_exit.awk | 0 src/{test => it}/resources/gawk/fcall_exit.ok | 0 .../resources/gawk/fcall_exit2.awk | 0 .../resources/gawk/fcall_exit2.in | 0 .../resources/gawk/fcall_exit2.ok | 0 src/{test => it}/resources/gawk/fflush.ok | 0 src/{test => it}/resources/gawk/fflush.sh | 0 .../resources/gawk/fieldassign.awk | 0 .../resources/gawk/fieldassign.in | 0 .../resources/gawk/fieldassign.ok | 0 src/{test => it}/resources/gawk/fieldwdth.awk | 0 src/{test => it}/resources/gawk/fieldwdth.in | 0 src/{test => it}/resources/gawk/fieldwdth.ok | 0 src/{test => it}/resources/gawk/filefuncs.awk | 0 .../resources/gawk/filefuncs.ok} | 0 src/it/resources/gawk/fix-fmtspcl.awk | 23 + src/{test => it}/resources/gawk/fldchg.awk | 0 src/{test => it}/resources/gawk/fldchg.in | 0 src/{test => it}/resources/gawk/fldchg.ok | 0 src/{test => it}/resources/gawk/fldchgnf.awk | 0 src/{test => it}/resources/gawk/fldchgnf.in | 0 src/{test => it}/resources/gawk/fldchgnf.ok | 0 src/{test => it}/resources/gawk/fldterm.awk | 0 src/{test => it}/resources/gawk/fldterm.in | 0 src/{test => it}/resources/gawk/fldterm.ok | 0 .../resources/gawk/fmtspcl-mpfr.ok} | 0 src/{test => it}/resources/gawk/fmtspcl.awk | 0 src/{test => it}/resources/gawk/fmtspcl.tok | 0 src/{test => it}/resources/gawk/fmttest.awk | 0 src/{test => it}/resources/gawk/fmttest.ok | 0 src/{test => it}/resources/gawk/fnamedat.awk | 0 src/{test => it}/resources/gawk/fnamedat.in | 0 src/{test => it}/resources/gawk/fnamedat.ok | 0 src/{test => it}/resources/gawk/fnarray.awk | 0 src/{test => it}/resources/gawk/fnarray.ok | 0 src/{test => it}/resources/gawk/fnarray2.awk | 0 src/{test => it}/resources/gawk/fnarray2.in | 0 src/{test => it}/resources/gawk/fnarray2.ok | 0 .../resources/gawk/fnarydel-mpfr.ok | 0 src/{test => it}/resources/gawk/fnarydel.awk | 0 src/{test => it}/resources/gawk/fnarydel.ok | 0 src/{test => it}/resources/gawk/fnaryscl.awk | 0 src/{test => it}/resources/gawk/fnaryscl.ok | 0 src/{test => it}/resources/gawk/fnasgnm.awk | 0 src/{test => it}/resources/gawk/fnasgnm.in | 0 src/{test => it}/resources/gawk/fnasgnm.ok | 0 src/{test => it}/resources/gawk/fnmatch.awk | 0 src/{test => it}/resources/gawk/fnmatch.ok | 0 src/{test => it}/resources/gawk/fnmisc.awk | 0 src/{test => it}/resources/gawk/fnmisc.ok | 0 .../resources/gawk/fnparydl-mpfr.ok | 0 src/{test => it}/resources/gawk/fnparydl.awk | 0 src/{test => it}/resources/gawk/fnparydl.ok | 0 src/{test => it}/resources/gawk/forcenum.awk | 0 src/{test => it}/resources/gawk/forcenum.ok | 0 src/{test => it}/resources/gawk/fordel.awk | 0 .../fork.ok => it/resources/gawk/fordel.ok} | 0 src/{test => it}/resources/gawk/fork.awk | 0 .../fork2.ok => it/resources/gawk/fork.ok} | 0 src/{test => it}/resources/gawk/fork2.awk | 0 .../resources/gawk/fork2.ok} | 0 src/{test => it}/resources/gawk/forref.awk | 0 src/{test => it}/resources/gawk/forref.ok | 0 src/{test => it}/resources/gawk/forsimp.awk | 0 src/{test => it}/resources/gawk/forsimp.ok | 0 src/{test => it}/resources/gawk/fpat1.awk | 0 src/{test => it}/resources/gawk/fpat1.in | 0 src/{test => it}/resources/gawk/fpat1.ok | 0 src/{test => it}/resources/gawk/fpat2.awk | 0 src/{test => it}/resources/gawk/fpat2.ok | 0 src/{test => it}/resources/gawk/fpat3.awk | 0 src/{test => it}/resources/gawk/fpat3.in | 0 src/{test => it}/resources/gawk/fpat3.ok | 0 src/{test => it}/resources/gawk/fpat4.awk | 0 src/{test => it}/resources/gawk/fpat4.ok | 0 src/{test => it}/resources/gawk/fpat5.awk | 0 src/{test => it}/resources/gawk/fpat5.in | 0 src/{test => it}/resources/gawk/fpat5.ok | 0 src/{test => it}/resources/gawk/fpat6.awk | 0 src/{test => it}/resources/gawk/fpat6.in | 0 src/{test => it}/resources/gawk/fpat6.ok | 0 src/{test => it}/resources/gawk/fpat7.awk | 0 src/{test => it}/resources/gawk/fpat7.in | 0 src/{test => it}/resources/gawk/fpat7.ok | 0 src/{test => it}/resources/gawk/fpat8.awk | 0 src/{test => it}/resources/gawk/fpat8.in | 0 src/{test => it}/resources/gawk/fpat8.ok | 0 src/{test => it}/resources/gawk/fpat9.awk | 0 src/{test => it}/resources/gawk/fpat9.in | 0 src/{test => it}/resources/gawk/fpat9.ok | 0 src/{test => it}/resources/gawk/fpatnull.awk | 0 src/{test => it}/resources/gawk/fpatnull.in | 0 src/{test => it}/resources/gawk/fpatnull.ok | 0 .../gawk/fr/LC_MESSAGES/nlstringtest.mo | Bin 0 -> 304 bytes src/{test => it}/resources/gawk/fsbs.awk | 0 src/{test => it}/resources/gawk/fsbs.in | 0 src/{test => it}/resources/gawk/fsbs.ok | 0 src/{test => it}/resources/gawk/fscaret.awk | 0 src/{test => it}/resources/gawk/fscaret.in | 0 src/{test => it}/resources/gawk/fscaret.ok | 0 src/{test => it}/resources/gawk/fsfwfs.awk | 0 src/{test => it}/resources/gawk/fsfwfs.in | 0 src/{test => it}/resources/gawk/fsfwfs.ok | 0 src/{test => it}/resources/gawk/fsnul1.awk | 0 src/{test => it}/resources/gawk/fsnul1.in | Bin src/{test => it}/resources/gawk/fsnul1.ok | 0 src/{test => it}/resources/gawk/fsrs.awk | 0 src/{test => it}/resources/gawk/fsrs.in | 0 src/{test => it}/resources/gawk/fsrs.ok | 0 src/{test => it}/resources/gawk/fsspcoln.awk | 0 src/{test => it}/resources/gawk/fsspcoln.in | 0 src/{test => it}/resources/gawk/fsspcoln.ok | 0 src/{test => it}/resources/gawk/fstabplus.awk | 0 src/{test => it}/resources/gawk/fstabplus.in | 0 src/{test => it}/resources/gawk/fstabplus.ok | 0 src/{test => it}/resources/gawk/fts.awk | 0 src/{test => it}/resources/gawk/functab1.awk | 0 src/{test => it}/resources/gawk/functab1.ok | 0 src/{test => it}/resources/gawk/functab2.awk | 0 src/{test => it}/resources/gawk/functab2.ok | 0 src/{test => it}/resources/gawk/functab3.awk | 0 src/{test => it}/resources/gawk/functab3.ok | 0 src/{test => it}/resources/gawk/functab4.awk | 0 src/{test => it}/resources/gawk/functab4.ok | 0 src/{test => it}/resources/gawk/functab5.awk | 0 src/{test => it}/resources/gawk/functab5.ok | 0 src/{test => it}/resources/gawk/functab6.awk | 0 src/{test => it}/resources/gawk/functab6.ok | 0 src/{test => it}/resources/gawk/funlen.awk | 0 src/{test => it}/resources/gawk/funlen.in | 0 src/{test => it}/resources/gawk/funlen.ok | 0 src/{test => it}/resources/gawk/funsemnl.awk | 0 src/{test => it}/resources/gawk/funsemnl.ok | 0 src/{test => it}/resources/gawk/funsmnam.awk | 0 src/{test => it}/resources/gawk/funsmnam.ok | 0 src/{test => it}/resources/gawk/funstack.awk | 0 src/{test => it}/resources/gawk/funstack.in | 0 src/{test => it}/resources/gawk/funstack.ok | 0 src/{test => it}/resources/gawk/fwtest.awk | 0 src/{test => it}/resources/gawk/fwtest.in | 0 src/{test => it}/resources/gawk/fwtest.ok | 0 src/{test => it}/resources/gawk/fwtest2.awk | 0 src/{test => it}/resources/gawk/fwtest2.in | 0 src/{test => it}/resources/gawk/fwtest2.ok | 0 src/{test => it}/resources/gawk/fwtest3.awk | 0 src/{test => it}/resources/gawk/fwtest3.in | 0 src/{test => it}/resources/gawk/fwtest3.ok | 0 src/{test => it}/resources/gawk/fwtest4.awk | 0 src/{test => it}/resources/gawk/fwtest4.in | 0 src/{test => it}/resources/gawk/fwtest4.ok | 0 src/{test => it}/resources/gawk/fwtest5.awk | 0 src/{test => it}/resources/gawk/fwtest5.in | 0 src/{test => it}/resources/gawk/fwtest5.ok | 0 src/{test => it}/resources/gawk/fwtest6.awk | 0 src/{test => it}/resources/gawk/fwtest6.in | 0 src/{test => it}/resources/gawk/fwtest6.ok | 0 src/{test => it}/resources/gawk/fwtest7.awk | 0 src/{test => it}/resources/gawk/fwtest7.in | 0 src/{test => it}/resources/gawk/fwtest7.ok | 0 src/{test => it}/resources/gawk/fwtest8.awk | 0 src/{test => it}/resources/gawk/fwtest8.in | 0 src/{test => it}/resources/gawk/fwtest8.ok | 0 src/it/resources/gawk/genpot.awk | 1 + src/it/resources/gawk/genpot.ok | 5 + src/{test => it}/resources/gawk/gensub.awk | 0 src/{test => it}/resources/gawk/gensub.in | 0 src/{test => it}/resources/gawk/gensub.ok | 0 src/{test => it}/resources/gawk/gensub2.awk | 0 src/{test => it}/resources/gawk/gensub2.ok | 0 src/{test => it}/resources/gawk/gensub3.awk | 0 src/{test => it}/resources/gawk/gensub3.in | 0 src/{test => it}/resources/gawk/gensub3.ok | 0 src/{test => it}/resources/gawk/gensub4.awk | 0 src/{test => it}/resources/gawk/gensub4.ok | 0 src/{test => it}/resources/gawk/getfile.awk | 0 src/{test => it}/resources/gawk/getfile.ok | 0 src/{test => it}/resources/gawk/getline.awk | 0 src/{test => it}/resources/gawk/getline.in | 0 src/{test => it}/resources/gawk/getline.ok | 0 src/{test => it}/resources/gawk/getline2.awk | 0 src/it/resources/gawk/getline2.ok | 2 + src/{test => it}/resources/gawk/getline3.awk | 0 src/{test => it}/resources/gawk/getline3.ok | 0 src/{test => it}/resources/gawk/getline4.awk | 0 src/{test => it}/resources/gawk/getline4.in | 0 src/{test => it}/resources/gawk/getline4.ok | 0 src/{test => it}/resources/gawk/getline5.awk | 0 src/{test => it}/resources/gawk/getline5.ok | 0 src/{test => it}/resources/gawk/getlnbuf.awk | 0 src/{test => it}/resources/gawk/getlnbuf.in | 0 src/{test => it}/resources/gawk/getlnbuf.ok | 0 src/{test => it}/resources/gawk/getlndir.awk | 0 src/{test => it}/resources/gawk/getlndir.ok | 0 src/{test => it}/resources/gawk/getlnfa.awk | 0 src/{test => it}/resources/gawk/getlnfa.ok | 0 src/{test => it}/resources/gawk/getlnhd.awk | 0 src/{test => it}/resources/gawk/getlnhd.ok | 0 src/{test => it}/resources/gawk/getnr2tb.awk | 0 src/{test => it}/resources/gawk/getnr2tb.in | 0 src/{test => it}/resources/gawk/getnr2tb.ok | 0 src/{test => it}/resources/gawk/getnr2tm.awk | 0 src/{test => it}/resources/gawk/getnr2tm.in | 0 src/{test => it}/resources/gawk/getnr2tm.ok | 0 src/{test => it}/resources/gawk/gnuops2.awk | 0 src/{test => it}/resources/gawk/gnuops2.ok | 0 src/{test => it}/resources/gawk/gnuops3.awk | 0 src/{test => it}/resources/gawk/gnuops3.ok | 0 src/{test => it}/resources/gawk/gnureops.awk | 0 src/{test => it}/resources/gawk/gnureops.ok | 0 src/{test => it}/resources/gawk/gsubasgn.awk | 0 src/{test => it}/resources/gawk/gsubasgn.ok | 0 src/{test => it}/resources/gawk/gsubind.awk | 0 src/{test => it}/resources/gawk/gsubind.ok | 0 src/{test => it}/resources/gawk/gsubtest.awk | 0 src/{test => it}/resources/gawk/gsubtest.ok | 0 src/{test => it}/resources/gawk/gsubtst2.awk | 0 src/{test => it}/resources/gawk/gsubtst2.ok | 0 src/{test => it}/resources/gawk/gsubtst3.awk | 0 src/{test => it}/resources/gawk/gsubtst3.in | 0 src/{test => it}/resources/gawk/gsubtst3.ok | 0 src/{test => it}/resources/gawk/gsubtst4.awk | 0 src/{test => it}/resources/gawk/gsubtst4.ok | 0 src/{test => it}/resources/gawk/gsubtst5.awk | 0 src/{test => it}/resources/gawk/gsubtst5.in | 0 src/{test => it}/resources/gawk/gsubtst5.ok | 0 src/{test => it}/resources/gawk/gsubtst6.awk | 0 src/{test => it}/resources/gawk/gsubtst6.ok | 0 src/{test => it}/resources/gawk/gsubtst7.awk | 0 src/{test => it}/resources/gawk/gsubtst7.in | 0 src/{test => it}/resources/gawk/gsubtst7.ok | 0 src/{test => it}/resources/gawk/gsubtst8.awk | 0 src/{test => it}/resources/gawk/gsubtst8.in | 0 src/{test => it}/resources/gawk/gsubtst8.ok | 0 src/{test => it}/resources/gawk/gtlnbufv.awk | 0 src/{test => it}/resources/gawk/hello.awk | 0 src/{test => it}/resources/gawk/hex.awk | 0 src/{test => it}/resources/gawk/hex.ok | 0 src/{test => it}/resources/gawk/hex2.awk | 0 src/{test => it}/resources/gawk/hex2.in | 0 src/{test => it}/resources/gawk/hex2.ok | 0 src/{test => it}/resources/gawk/hsprint.awk | 0 src/{test => it}/resources/gawk/hsprint.ok | 0 src/{test => it}/resources/gawk/icasefs.awk | 0 src/{test => it}/resources/gawk/icasefs.ok | 0 src/{test => it}/resources/gawk/icasers.awk | 0 src/{test => it}/resources/gawk/icasers.in | 0 src/{test => it}/resources/gawk/icasers.ok | 0 src/{test => it}/resources/gawk/id.awk | 0 src/{test => it}/resources/gawk/id.ok | 0 src/{test => it}/resources/gawk/igncdym.awk | 0 src/{test => it}/resources/gawk/igncdym.in | 0 src/{test => it}/resources/gawk/igncdym.ok | 0 src/{test => it}/resources/gawk/igncfs.awk | 0 src/{test => it}/resources/gawk/igncfs.in | 0 src/{test => it}/resources/gawk/igncfs.ok | 0 src/{test => it}/resources/gawk/ignrcas2.awk | 0 src/{test => it}/resources/gawk/ignrcas2.ok | 0 src/{test => it}/resources/gawk/ignrcas3.awk | 0 src/{test => it}/resources/gawk/ignrcas3.ok | 0 src/{test => it}/resources/gawk/ignrcas4.awk | 0 src/{test => it}/resources/gawk/ignrcas4.ok | 0 src/{test => it}/resources/gawk/ignrcase.awk | 0 src/{test => it}/resources/gawk/ignrcase.in | 0 src/{test => it}/resources/gawk/ignrcase.ok | 0 src/{test => it}/resources/gawk/incdupe.ok | 0 src/{test => it}/resources/gawk/incdupe2.ok | 0 src/{test => it}/resources/gawk/incdupe3.ok | 0 src/{test => it}/resources/gawk/incdupe4.ok | 0 src/{test => it}/resources/gawk/incdupe5.ok | 0 src/{test => it}/resources/gawk/incdupe6.ok | 0 src/{test => it}/resources/gawk/incdupe7.ok | 0 src/{test => it}/resources/gawk/inchello.awk | 0 src/{test => it}/resources/gawk/inclib.awk | 0 src/{test => it}/resources/gawk/include.awk | 0 src/{test => it}/resources/gawk/include.ok | 0 src/{test => it}/resources/gawk/include2.ok | 0 .../resources/gawk/indirectbuiltin.awk | 0 .../resources/gawk/indirectbuiltin.ok | 0 .../resources/gawk/indirectbuiltin2.awk | 0 .../resources/gawk/indirectbuiltin2.ok | 0 .../resources/gawk/indirectcall.awk | 0 .../resources/gawk/indirectcall.in | 0 .../resources/gawk/indirectcall.ok | 0 .../resources/gawk/indirectcall2.awk | 0 .../resources/gawk/indirectcall2.ok | 0 .../resources/gawk/indirectcall3.awk | 0 .../resources/gawk/indirectcall3.ok} | 0 .../resources/gawk/inf-nan-torture.awk | 0 .../resources/gawk/inf-nan-torture.in | 0 .../resources/gawk/inf-nan-torture.ok | 0 src/{test => it}/resources/gawk/inftest.awk | 0 src/{test => it}/resources/gawk/inftest.ok | 0 src/{test => it}/resources/gawk/inplace.1.in | 0 src/{test => it}/resources/gawk/inplace.2.in | 0 src/{test => it}/resources/gawk/inplace.in | 0 src/{test => it}/resources/gawk/inplace1.1.ok | 0 src/{test => it}/resources/gawk/inplace1.2.ok | 0 src/{test => it}/resources/gawk/inplace1.ok | 0 .../resources/gawk/inplace2.1.bak.ok | 0 src/{test => it}/resources/gawk/inplace2.1.ok | 0 .../resources/gawk/inplace2.2.bak.ok | 0 src/{test => it}/resources/gawk/inplace2.2.ok | 0 src/{test => it}/resources/gawk/inplace2.ok | 0 .../resources/gawk/inplace2bcomp.1.ok | 0 .../resources/gawk/inplace2bcomp.1.orig.ok | 0 .../resources/gawk/inplace2bcomp.2.ok | 0 .../resources/gawk/inplace2bcomp.2.orig.ok | 0 .../resources/gawk/inplace2bcomp.ok | 0 .../resources/gawk/inplace3.1.bak.ok | 0 src/{test => it}/resources/gawk/inplace3.1.ok | 0 .../resources/gawk/inplace3.2.bak.ok | 0 src/{test => it}/resources/gawk/inplace3.2.ok | 0 src/{test => it}/resources/gawk/inplace3.ok | 0 .../resources/gawk/inplace3bcomp.1.ok | 0 .../resources/gawk/inplace3bcomp.1.orig.ok | 0 .../resources/gawk/inplace3bcomp.2.ok | 0 .../resources/gawk/inplace3bcomp.2.orig.ok | 0 .../resources/gawk/inplace3bcomp.ok | 0 src/{test => it}/resources/gawk/inpref.awk | 0 src/{test => it}/resources/gawk/inpref.in | 0 src/{test => it}/resources/gawk/inpref.ok | 0 src/{test => it}/resources/gawk/inputred.awk | 0 src/{test => it}/resources/gawk/inputred.ok | 0 src/{test => it}/resources/gawk/intarray.awk | 0 .../resources/gawk/intarray.ok} | 0 src/{test => it}/resources/gawk/intest.awk | 0 src/{test => it}/resources/gawk/intest.ok | 0 src/{test => it}/resources/gawk/intformat.awk | 0 src/{test => it}/resources/gawk/intformat.ok | 0 src/{test => it}/resources/gawk/intprec.awk | 0 src/{test => it}/resources/gawk/intprec.ok | 0 src/{test => it}/resources/gawk/iobug1.awk | 0 .../mdim5.ok => it/resources/gawk/iobug1.ok} | 0 src/{test => it}/resources/gawk/iolint.awk | 0 src/{test => it}/resources/gawk/iolint.ok | 0 .../resources/gawk/isarrayunset.awk | 0 .../resources/gawk/isarrayunset.ok | 0 src/{test => it}/resources/gawk/jarebug.awk | 0 src/{test => it}/resources/gawk/jarebug.in | 0 src/{test => it}/resources/gawk/jarebug.ok | 0 src/{test => it}/resources/gawk/jarebug.sh | 0 src/{test => it}/resources/gawk/lc_num1.awk | 0 src/{test => it}/resources/gawk/lc_num1.ok | 0 src/{test => it}/resources/gawk/leaddig.awk | 0 src/{test => it}/resources/gawk/leaddig.ok | 0 src/{test => it}/resources/gawk/leadnl.awk | 0 src/{test => it}/resources/gawk/leadnl.in | 0 src/{test => it}/resources/gawk/leadnl.ok | 0 src/it/resources/gawk/lib/awkpath.awk | 1 + src/{test => it}/resources/gawk/lint.awk | 0 src/{test => it}/resources/gawk/lint.ok | 0 src/{test => it}/resources/gawk/lintexp.awk | 0 src/{test => it}/resources/gawk/lintexp.ok | 0 src/{test => it}/resources/gawk/lintindex.awk | 0 src/{test => it}/resources/gawk/lintindex.ok | 0 src/{test => it}/resources/gawk/lintint.awk | 0 src/{test => it}/resources/gawk/lintint.ok | 0 .../resources/gawk/lintlength.awk | 0 src/{test => it}/resources/gawk/lintlength.ok | 0 src/{test => it}/resources/gawk/lintold.awk | 0 src/{test => it}/resources/gawk/lintold.in | 0 src/{test => it}/resources/gawk/lintold.ok | 0 src/{test => it}/resources/gawk/lintplus.awk | 0 src/{test => it}/resources/gawk/lintplus.ok | 0 src/{test => it}/resources/gawk/lintset.awk | 0 src/{test => it}/resources/gawk/lintset.ok | 0 src/{test => it}/resources/gawk/lintwarn.awk | 0 src/{test => it}/resources/gawk/lintwarn.ok | 0 src/{test => it}/resources/gawk/litoct.awk | 0 src/{test => it}/resources/gawk/litoct.in | 0 src/{test => it}/resources/gawk/litoct.ok | 0 src/{test => it}/resources/gawk/localenl.ok | 0 src/{test => it}/resources/gawk/localenl.sh | 0 src/{test => it}/resources/gawk/longsub.awk | 0 src/{test => it}/resources/gawk/longsub.in | 0 src/{test => it}/resources/gawk/longsub.ok | 0 src/{test => it}/resources/gawk/longwrds.awk | 0 src/{test => it}/resources/gawk/longwrds.in | 0 src/{test => it}/resources/gawk/longwrds.ok | 0 src/{test => it}/resources/gawk/makepmafile.c | 0 src/{test => it}/resources/gawk/manglprm.awk | 0 src/{test => it}/resources/gawk/manglprm.in | 0 src/{test => it}/resources/gawk/manglprm.ok | 0 src/it/resources/gawk/manyfiles.awk | 1 + src/{test => it}/resources/gawk/manyfiles.ok | 0 src/{test => it}/resources/gawk/match1.awk | 0 src/{test => it}/resources/gawk/match1.ok | 0 src/{test => it}/resources/gawk/match2.awk | 0 src/{test => it}/resources/gawk/match2.ok | 0 src/{test => it}/resources/gawk/match3.awk | 0 src/{test => it}/resources/gawk/match3.in | 0 src/{test => it}/resources/gawk/match3.ok | 0 src/{test => it}/resources/gawk/math.awk | 0 src/{test => it}/resources/gawk/math.ok | 0 src/{test => it}/resources/gawk/mbfw1.awk | 0 src/{test => it}/resources/gawk/mbfw1.in | 0 src/{test => it}/resources/gawk/mbfw1.ok | 0 src/{test => it}/resources/gawk/mbprintf1.awk | 0 src/{test => it}/resources/gawk/mbprintf1.in | 0 src/{test => it}/resources/gawk/mbprintf1.ok | 0 src/{test => it}/resources/gawk/mbprintf2.awk | 0 src/{test => it}/resources/gawk/mbprintf2.ok | 0 src/{test => it}/resources/gawk/mbprintf3.awk | 0 src/{test => it}/resources/gawk/mbprintf3.in | 0 src/{test => it}/resources/gawk/mbprintf3.ok | 0 src/{test => it}/resources/gawk/mbprintf4.awk | 0 src/{test => it}/resources/gawk/mbprintf4.in | 0 src/{test => it}/resources/gawk/mbprintf4.ok | 0 src/{test => it}/resources/gawk/mbprintf5.awk | 0 src/{test => it}/resources/gawk/mbprintf5.in | 0 src/{test => it}/resources/gawk/mbprintf5.ok | 0 src/{test => it}/resources/gawk/mbstr1.awk | 0 src/{test => it}/resources/gawk/mbstr1.ok | 0 src/{test => it}/resources/gawk/mbstr2.awk | 0 src/{test => it}/resources/gawk/mbstr2.in | 0 src/{test => it}/resources/gawk/mbstr2.ok | 0 src/{test => it}/resources/gawk/mdim1.awk | 0 src/{test => it}/resources/gawk/mdim1.ok | 0 src/{test => it}/resources/gawk/mdim2.awk | 0 src/{test => it}/resources/gawk/mdim2.ok | 0 src/{test => it}/resources/gawk/mdim3.awk | 0 src/{test => it}/resources/gawk/mdim3.ok | 0 src/{test => it}/resources/gawk/mdim4.awk | 0 src/{test => it}/resources/gawk/mdim4.in | 0 src/{test => it}/resources/gawk/mdim4.ok | 0 src/{test => it}/resources/gawk/mdim5.awk | 0 .../mdim7.ok => it/resources/gawk/mdim5.ok} | 0 src/{test => it}/resources/gawk/mdim6.awk | 0 src/{test => it}/resources/gawk/mdim6.ok | 0 src/{test => it}/resources/gawk/mdim7.awk | 0 .../membug1.ok => it/resources/gawk/mdim7.ok} | 0 src/{test => it}/resources/gawk/mdim8.awk | 0 src/{test => it}/resources/gawk/mdim8.in | 0 src/{test => it}/resources/gawk/mdim8.ok | 0 src/{test => it}/resources/gawk/membug1.awk | 0 src/{test => it}/resources/gawk/membug1.in | 0 .../resources/gawk/membug1.ok} | 0 src/{test => it}/resources/gawk/memleak.awk | 0 src/{test => it}/resources/gawk/memleak.ok | 0 src/{test => it}/resources/gawk/messages.awk | 0 src/{test => it}/resources/gawk/minusstr.awk | 0 src/{test => it}/resources/gawk/minusstr.ok | 0 src/{test => it}/resources/gawk/mixed1.ok | 0 src/{test => it}/resources/gawk/mktime.awk | 0 src/{test => it}/resources/gawk/mktime.in | 0 src/{test => it}/resources/gawk/mktime.ok | 0 src/{test => it}/resources/gawk/mmap8k.awk | 0 src/{test => it}/resources/gawk/mmap8k.in | 0 src/{test => it}/resources/gawk/mmap8k.ok | 0 src/{test => it}/resources/gawk/modifiers.ok | 0 src/{test => it}/resources/gawk/modifiers.sh | 0 .../resources/gawk/mpfranswer42.awk | 0 .../resources/gawk/mpfranswer42.ok | 0 .../resources/gawk/mpfrbigint.awk | 0 src/{test => it}/resources/gawk/mpfrbigint.ok | 0 .../resources/gawk/mpfrbigint2.awk | 0 .../resources/gawk/mpfrbigint2.in | 0 .../resources/gawk/mpfrbigint2.ok | 0 src/{test => it}/resources/gawk/mpfrcase.awk | 0 src/{test => it}/resources/gawk/mpfrcase.in | 0 src/{test => it}/resources/gawk/mpfrcase.ok | 0 src/{test => it}/resources/gawk/mpfrcase2.awk | 0 src/{test => it}/resources/gawk/mpfrcase2.in | 0 src/{test => it}/resources/gawk/mpfrcase2.ok | 0 .../resources/gawk/mpfrexprange.awk | 0 .../resources/gawk/mpfrexprange.ok | 0 src/{test => it}/resources/gawk/mpfrfield.awk | 0 src/{test => it}/resources/gawk/mpfrfield.in | 0 src/{test => it}/resources/gawk/mpfrfield.ok | 0 src/{test => it}/resources/gawk/mpfrieee.awk | 0 src/{test => it}/resources/gawk/mpfrieee.ok | 0 .../resources/gawk/mpfrmemok1.awk | 0 src/{test => it}/resources/gawk/mpfrmemok1.ok | 0 .../resources/gawk/mpfrnegzero.awk | 0 .../resources/gawk/mpfrnegzero.ok | 0 .../resources/gawk/mpfrnegzero2.awk | 0 .../resources/gawk/mpfrnegzero2.ok | 0 src/{test => it}/resources/gawk/mpfrnonum.awk | 0 src/{test => it}/resources/gawk/mpfrnonum.in | 0 src/{test => it}/resources/gawk/mpfrnonum.ok | 0 src/{test => it}/resources/gawk/mpfrnr.awk | 0 src/{test => it}/resources/gawk/mpfrnr.in | 0 src/{test => it}/resources/gawk/mpfrnr.ok | 0 src/{test => it}/resources/gawk/mpfrrem.awk | 0 src/{test => it}/resources/gawk/mpfrrem.ok | 0 src/{test => it}/resources/gawk/mpfrrnd.awk | 0 src/{test => it}/resources/gawk/mpfrrnd.ok | 0 .../resources/gawk/mpfrrndeval.awk | 0 .../resources/gawk/mpfrrndeval.ok | 0 src/{test => it}/resources/gawk/mpfrsort.awk | 0 src/{test => it}/resources/gawk/mpfrsort.ok | 0 src/{test => it}/resources/gawk/mpfrsqrt.awk | 0 src/{test => it}/resources/gawk/mpfrsqrt.ok | 0 .../resources/gawk/mpfrstrtonum.awk | 0 .../resources/gawk/mpfrstrtonum.ok | 0 src/{test => it}/resources/gawk/mpfruplus.ok | 0 .../resources/gawk/mpgforcenum.awk | 0 .../resources/gawk/mpgforcenum.ok | 0 src/{test => it}/resources/gawk/mtchi18n.awk | 0 src/{test => it}/resources/gawk/mtchi18n.in | 0 src/{test => it}/resources/gawk/mtchi18n.ok | 0 .../resources/gawk/muldimposix.awk | 0 .../resources/gawk/muldimposix.ok | 0 src/{test => it}/resources/gawk/nasty.awk | 0 src/{test => it}/resources/gawk/nasty.ok | 0 src/{test => it}/resources/gawk/nasty2.awk | 0 src/{test => it}/resources/gawk/nasty2.ok | 0 src/{test => it}/resources/gawk/nastyparm.awk | 0 src/{test => it}/resources/gawk/nastyparm.ok | 0 src/{test => it}/resources/gawk/negexp.awk | 0 src/{test => it}/resources/gawk/negexp.ok | 0 src/{test => it}/resources/gawk/negrange.awk | 0 src/{test => it}/resources/gawk/negrange.ok | 0 src/{test => it}/resources/gawk/negtime.awk | 0 src/{test => it}/resources/gawk/negtime.ok | 0 src/{test => it}/resources/gawk/nested.awk | 0 src/{test => it}/resources/gawk/nested.in | 0 src/{test => it}/resources/gawk/nested.ok | 0 src/{test => it}/resources/gawk/next.ok | 0 src/{test => it}/resources/gawk/next.sh | 0 src/{test => it}/resources/gawk/nfldstr.awk | 0 src/{test => it}/resources/gawk/nfldstr.in | 0 .../resources/gawk/nfldstr.ok} | 0 src/{test => it}/resources/gawk/nfloop.awk | 0 src/{test => it}/resources/gawk/nfloop.ok | 0 src/{test => it}/resources/gawk/nfneg.awk | 0 src/{test => it}/resources/gawk/nfneg.ok | 0 src/{test => it}/resources/gawk/nfset.awk | 0 src/{test => it}/resources/gawk/nfset.in | 0 src/{test => it}/resources/gawk/nfset.ok | 0 src/{test => it}/resources/gawk/nlfldsep.awk | 0 src/{test => it}/resources/gawk/nlfldsep.in | 0 src/{test => it}/resources/gawk/nlfldsep.ok | 0 src/{test => it}/resources/gawk/nlinstr.awk | 0 src/{test => it}/resources/gawk/nlinstr.in | 0 src/{test => it}/resources/gawk/nlinstr.ok | 0 src/{test => it}/resources/gawk/nlstrina.awk | 0 src/{test => it}/resources/gawk/nlstrina.ok | 0 .../resources/gawk/nlstringtest-nogettext.ok | 0 .../resources/gawk/nlstringtest.awk | 0 .../resources/gawk/nlstringtest.ok | 0 .../resources/gawk/nlstringtest.po | 0 src/{test => it}/resources/gawk/noeffect.awk | 0 src/{test => it}/resources/gawk/noeffect.ok | 0 src/{test => it}/resources/gawk/nofile.ok | 0 src/{test => it}/resources/gawk/nofmtch.awk | 0 src/{test => it}/resources/gawk/nofmtch.ok | 0 src/{test => it}/resources/gawk/noloop1.awk | 0 src/{test => it}/resources/gawk/noloop1.in | 0 .../resources/gawk/noloop1.ok} | 0 src/{test => it}/resources/gawk/noloop2.awk | 0 src/{test => it}/resources/gawk/noloop2.in | 0 .../resources/gawk/noloop2.ok} | 0 src/{test => it}/resources/gawk/nondec.awk | 0 src/{test => it}/resources/gawk/nondec.ok | 0 src/{test => it}/resources/gawk/nondec2.awk | 0 src/{test => it}/resources/gawk/nondec2.ok | 0 src/{test => it}/resources/gawk/nonfatal1.awk | 0 src/{test => it}/resources/gawk/nonfatal1.ok | 0 src/{test => it}/resources/gawk/nonfatal2.awk | 0 src/{test => it}/resources/gawk/nonfatal2.ok | 0 src/{test => it}/resources/gawk/nonfatal3.awk | 0 src/{test => it}/resources/gawk/nonfatal3.ok | 0 src/{test => it}/resources/gawk/nonl.awk | 0 src/{test => it}/resources/gawk/nonl.in | 0 src/{test => it}/resources/gawk/nonl.ok | 0 src/{test => it}/resources/gawk/noparms.awk | 0 src/{test => it}/resources/gawk/noparms.ok | 0 src/{test => it}/resources/gawk/nors.in | 0 src/{test => it}/resources/gawk/nors.ok | 0 src/{test => it}/resources/gawk/nsawk1.awk | 0 .../resources/gawk/nsawk1a.ok} | 0 .../resources/gawk/nsawk1b.ok} | 0 .../resources/gawk/nsawk1c.ok} | 0 src/{test => it}/resources/gawk/nsawk2.awk | 0 src/{test => it}/resources/gawk/nsawk2a.ok | 0 src/{test => it}/resources/gawk/nsawk2b.ok | 0 src/{test => it}/resources/gawk/nsbad.awk | 0 src/{test => it}/resources/gawk/nsbad.ok | 0 src/{test => it}/resources/gawk/nsbad2.awk | 0 src/{test => it}/resources/gawk/nsbad2.ok | 0 src/{test => it}/resources/gawk/nsbad3.awk | 0 src/{test => it}/resources/gawk/nsbad3.ok | 0 src/{test => it}/resources/gawk/nsbad_cmd.ok | 0 src/{test => it}/resources/gawk/nsforloop.awk | 0 src/{test => it}/resources/gawk/nsforloop.ok | 0 .../resources/gawk/nsfuncrecurse.awk | 0 .../resources/gawk/nsfuncrecurse.ok | 0 .../resources/gawk/nsidentifier.awk | 0 .../resources/gawk/nsidentifier.ok | 0 .../resources/gawk/nsindirect1.awk | 0 .../resources/gawk/nsindirect1.ok | 0 .../resources/gawk/nsindirect2.awk | 0 .../resources/gawk/nsindirect2.ok | 0 src/{test => it}/resources/gawk/nsprof1.awk | 0 src/{test => it}/resources/gawk/nsprof1.ok | 0 src/{test => it}/resources/gawk/nsprof2.awk | 0 src/{test => it}/resources/gawk/nsprof2.ok | 0 src/{test => it}/resources/gawk/nulinsrc.awk | Bin src/{test => it}/resources/gawk/nulinsrc.ok | 0 src/{test => it}/resources/gawk/nulrsend.awk | 0 src/{test => it}/resources/gawk/nulrsend.in | 0 src/{test => it}/resources/gawk/nulrsend.ok | 0 src/{test => it}/resources/gawk/numindex.awk | 0 src/{test => it}/resources/gawk/numindex.in | 0 src/{test => it}/resources/gawk/numindex.ok | 0 .../resources/gawk/numrange-mpfr.ok | 0 src/{test => it}/resources/gawk/numrange.awk | 0 src/{test => it}/resources/gawk/numrange.ok | 0 src/{test => it}/resources/gawk/numstr1.awk | 0 src/{test => it}/resources/gawk/numstr1.ok | 0 src/{test => it}/resources/gawk/numsubstr.awk | 0 src/{test => it}/resources/gawk/numsubstr.in | 0 src/{test => it}/resources/gawk/numsubstr.ok | 0 src/{test => it}/resources/gawk/octdec.awk | 0 src/{test => it}/resources/gawk/octdec.ok | 0 src/{test => it}/resources/gawk/octsub.awk | 0 src/{test => it}/resources/gawk/octsub.ok | 0 src/{test => it}/resources/gawk/ofmt.awk | 0 src/{test => it}/resources/gawk/ofmt.in | 0 src/{test => it}/resources/gawk/ofmt.ok | 0 src/{test => it}/resources/gawk/ofmta.awk | 0 src/{test => it}/resources/gawk/ofmta.ok | 0 src/{test => it}/resources/gawk/ofmtbig.awk | 0 src/{test => it}/resources/gawk/ofmtbig.in | 0 src/{test => it}/resources/gawk/ofmtbig.ok | 0 src/{test => it}/resources/gawk/ofmtfidl.awk | 0 src/{test => it}/resources/gawk/ofmtfidl.in | 0 src/{test => it}/resources/gawk/ofmtfidl.ok | 0 src/{test => it}/resources/gawk/ofmts.awk | 0 src/{test => it}/resources/gawk/ofmts.in | 0 src/{test => it}/resources/gawk/ofmts.ok | 0 .../resources/gawk/ofmtstrnum.awk | 0 src/{test => it}/resources/gawk/ofmtstrnum.ok | 0 src/{test => it}/resources/gawk/ofs1.awk | 0 src/{test => it}/resources/gawk/ofs1.in | 0 src/{test => it}/resources/gawk/ofs1.ok | 0 src/{test => it}/resources/gawk/onlynl.awk | 0 src/{test => it}/resources/gawk/onlynl.in | 0 .../resources/gawk/onlynl.ok} | 0 src/{test => it}/resources/gawk/opasnidx.awk | 0 src/{test => it}/resources/gawk/opasnidx.ok | 0 src/{test => it}/resources/gawk/opasnslf.awk | 0 src/{test => it}/resources/gawk/opasnslf.ok | 0 src/{test => it}/resources/gawk/ordchr.awk | 0 src/{test => it}/resources/gawk/ordchr.ok | 0 src/{test => it}/resources/gawk/ordchr2.ok | 0 src/{test => it}/resources/gawk/out1.ok | 0 src/{test => it}/resources/gawk/out2.ok | 0 src/{test => it}/resources/gawk/out3.ok | 0 .../resources/gawk/paramasfunc1.awk | 0 .../resources/gawk/paramasfunc1.ok | 0 .../resources/gawk/paramasfunc2.awk | 0 .../resources/gawk/paramasfunc2.ok | 0 src/{test => it}/resources/gawk/paramdup.awk | 0 src/{test => it}/resources/gawk/paramdup.ok | 0 src/{test => it}/resources/gawk/paramres.awk | 0 src/{test => it}/resources/gawk/paramres.ok | 0 src/{test => it}/resources/gawk/paramtyp.awk | 0 src/{test => it}/resources/gawk/paramtyp.ok | 0 .../resources/gawk/paramuninitglobal.awk | 0 .../resources/gawk/paramuninitglobal.ok | 0 src/{test => it}/resources/gawk/parse1.awk | 0 src/{test => it}/resources/gawk/parse1.in | 0 src/{test => it}/resources/gawk/parse1.ok | 0 src/{test => it}/resources/gawk/parsefld.awk | 0 src/{test => it}/resources/gawk/parsefld.in | 0 src/{test => it}/resources/gawk/parsefld.ok | 0 src/{test => it}/resources/gawk/parseme.awk | 0 src/{test => it}/resources/gawk/parseme.ok | 0 src/{test => it}/resources/gawk/patsplit.awk | 0 src/{test => it}/resources/gawk/patsplit.ok | 0 src/{test => it}/resources/gawk/pcntplus.awk | 0 src/{test => it}/resources/gawk/pcntplus.ok | 0 src/{test => it}/resources/gawk/pid.awk | 0 src/{test => it}/resources/gawk/pid.ok | 0 src/{test => it}/resources/gawk/pid.sh | 0 src/{test => it}/resources/gawk/pipeio1.awk | 0 src/{test => it}/resources/gawk/pipeio1.ok | 0 src/{test => it}/resources/gawk/pipeio2.awk | 0 src/{test => it}/resources/gawk/pipeio2.in | 0 src/{test => it}/resources/gawk/pipeio2.ok | 0 src/{test => it}/resources/gawk/pma.ok | 0 src/{test => it}/resources/gawk/posix.awk | 0 src/{test => it}/resources/gawk/posix.in | 0 src/{test => it}/resources/gawk/posix.ok | 0 .../resources/gawk/posix2008sub.awk | 0 .../resources/gawk/posix2008sub.ok | 0 .../resources/gawk/posix_compare.awk | 0 .../resources/gawk/posix_compare.ok | 0 src/it/resources/gawk/poundbang.awk | 2 + src/{test => it}/resources/gawk/prdupval.awk | 0 src/{test => it}/resources/gawk/prdupval.in | 0 src/{test => it}/resources/gawk/prdupval.ok | 0 src/{test => it}/resources/gawk/prec.awk | 0 src/{test => it}/resources/gawk/prec.ok | 0 src/{test => it}/resources/gawk/printf0.awk | 0 src/{test => it}/resources/gawk/printf0.ok | 0 src/{test => it}/resources/gawk/printf1.awk | 0 src/{test => it}/resources/gawk/printf1.ok | 0 .../resources/gawk/printfbad1.awk | 0 src/{test => it}/resources/gawk/printfbad1.ok | 0 .../resources/gawk/printfbad2.awk | 0 src/{test => it}/resources/gawk/printfbad2.in | 0 src/{test => it}/resources/gawk/printfbad2.ok | 0 .../resources/gawk/printfbad3.awk | 0 src/{test => it}/resources/gawk/printfbad3.ok | 0 .../resources/gawk/printfbad4.awk | 0 src/{test => it}/resources/gawk/printfbad4.ok | 0 .../resources/gawk/printfchar.awk | 0 src/{test => it}/resources/gawk/printfchar.ok | 0 .../resources/gawk/printfloat.awk | 0 src/{test => it}/resources/gawk/printhuge.awk | 0 src/{test => it}/resources/gawk/printhuge.ok | 0 src/{test => it}/resources/gawk/printlang.awk | 0 src/{test => it}/resources/gawk/prmarscl.awk | 0 src/{test => it}/resources/gawk/prmarscl.ok | 0 src/{test => it}/resources/gawk/prmreuse.awk | 0 .../resources/gawk/prmreuse.ok} | 0 src/{test => it}/resources/gawk/procinfs.awk | 0 src/{test => it}/resources/gawk/procinfs.ok | 0 src/it/resources/gawk/profile0.awk | 1 + src/it/resources/gawk/profile0.in | 2 + src/it/resources/gawk/profile0.ok | 6 + src/it/resources/gawk/profile10.awk | 42 + src/it/resources/gawk/profile10.ok | 37 + src/it/resources/gawk/profile11.awk | 321 + src/it/resources/gawk/profile11.ok | 362 + src/it/resources/gawk/profile12.awk | 3 + src/it/resources/gawk/profile12.in | 4 + src/it/resources/gawk/profile12.ok | 3 + src/it/resources/gawk/profile13.awk | 4 + src/it/resources/gawk/profile13.ok | 5 + src/it/resources/gawk/profile14.awk | 21 + src/it/resources/gawk/profile14.ok | 38 + src/it/resources/gawk/profile15.awk | 24 + src/it/resources/gawk/profile15.ok | 27 + src/it/resources/gawk/profile16.awk | 16 + src/it/resources/gawk/profile16.ok | 18 + src/it/resources/gawk/profile17.awk | 18 + src/it/resources/gawk/profile17.ok | 19 + src/it/resources/gawk/profile2.ok | 144 + src/it/resources/gawk/profile3.awk | 9 + src/it/resources/gawk/profile3.ok | 14 + src/it/resources/gawk/profile4.awk | 8 + src/it/resources/gawk/profile4.ok | 9 + src/it/resources/gawk/profile5.awk | 5179 +++++++++++ src/it/resources/gawk/profile5.ok | 8176 +++++++++++++++++ src/it/resources/gawk/profile6.awk | 7 + src/it/resources/gawk/profile6.ok | 10 + src/it/resources/gawk/profile7.awk | 14 + src/it/resources/gawk/profile7.ok | 17 + src/it/resources/gawk/profile8.awk | 4 + src/it/resources/gawk/profile8.ok | 21 + src/it/resources/gawk/profile9.awk | 9 + src/it/resources/gawk/profile9.ok | 14 + src/{test => it}/resources/gawk/prt1eval.awk | 0 src/{test => it}/resources/gawk/prt1eval.ok | 0 src/{test => it}/resources/gawk/prtoeval.awk | 0 src/{test => it}/resources/gawk/prtoeval.ok | 0 src/{test => it}/resources/gawk/pty1.awk | 0 src/{test => it}/resources/gawk/pty1.ok | 0 src/{test => it}/resources/gawk/pty2.awk | 0 src/{test => it}/resources/gawk/pty2.ok | 0 src/it/resources/gawk/rand-mpfr.ok | 1 + src/it/resources/gawk/rand-mpfr1.ok | 1 + src/{test => it}/resources/gawk/rand.awk | 0 src/{test => it}/resources/gawk/rand.ok | 0 .../resources/gawk/randtest.ok} | 0 src/it/resources/gawk/randtest.sh | 113 + src/{test => it}/resources/gawk/range1.awk | 0 src/{test => it}/resources/gawk/range1.in | 0 src/{test => it}/resources/gawk/range1.ok | 0 src/{test => it}/resources/gawk/range2.awk | 0 src/{test => it}/resources/gawk/range2.ok | 0 src/{test => it}/resources/gawk/readall.ok | 0 src/{test => it}/resources/gawk/readall1.awk | 0 src/{test => it}/resources/gawk/readall2.awk | 0 src/{test => it}/resources/gawk/readbuf.awk | 0 src/{test => it}/resources/gawk/readbuf.ok | 0 src/it/resources/gawk/readdir.awk | 3 + src/it/resources/gawk/readdir0.awk | 46 + src/it/resources/gawk/readdir_retest.awk | 7 + src/{test => it}/resources/gawk/readfile2.awk | 0 src/{test => it}/resources/gawk/readfile2.ok | 0 .../resources/gawk/rebrackloc.awk | 0 src/{test => it}/resources/gawk/rebrackloc.in | 0 src/{test => it}/resources/gawk/rebrackloc.ok | 0 src/{test => it}/resources/gawk/rebt8b1.awk | 0 src/{test => it}/resources/gawk/rebt8b1.ok | 0 src/{test => it}/resources/gawk/rebt8b2.awk | 0 src/{test => it}/resources/gawk/rebt8b2.ok | 0 src/{test => it}/resources/gawk/rebuf.awk | 0 src/{test => it}/resources/gawk/rebuf.in | 0 src/{test => it}/resources/gawk/rebuf.ok | 0 src/{test => it}/resources/gawk/rebuild.awk | 0 src/{test => it}/resources/gawk/rebuild.in | 0 src/{test => it}/resources/gawk/rebuild.ok | 0 src/{test => it}/resources/gawk/redfilnm.awk | 0 src/{test => it}/resources/gawk/redfilnm.in | 0 src/{test => it}/resources/gawk/redfilnm.ok | 0 src/it/resources/gawk/reg/Obsolete/exp.awk | 1 + src/it/resources/gawk/reg/Obsolete/exp.good | 2 + .../resources/gawk/reg/Obsolete/exp.in} | 0 src/it/resources/gawk/reg/Obsolete/log.awk | 1 + src/it/resources/gawk/reg/Obsolete/log.good | 4 + .../resources/gawk/reg/Obsolete/log.in} | 0 src/it/resources/gawk/reg/exp-eq.awk | 1 + src/it/resources/gawk/reg/exp-eq.good | 3 + src/it/resources/gawk/reg/exp-eq.in | 3 + src/it/resources/gawk/reg/func.awk | 1 + src/it/resources/gawk/reg/func.good | 1 + .../resources/gawk/reg/func.in} | 0 src/it/resources/gawk/reg/func2.awk | 2 + src/it/resources/gawk/reg/func2.good | 2 + .../resources/gawk/reg/func2.in} | 0 src/{test => it}/resources/gawk/regeq.awk | 0 src/{test => it}/resources/gawk/regeq.in | 0 src/{test => it}/resources/gawk/regeq.ok | 0 .../resources/gawk/regex3minus.awk | 0 .../resources/gawk/regex3minus.ok | 0 src/{test => it}/resources/gawk/regexpbad.awk | 0 src/{test => it}/resources/gawk/regexpbad.ok | 0 .../resources/gawk/regexpbrack.awk | 0 .../resources/gawk/regexpbrack.in} | 0 src/it/resources/gawk/regexpbrack.ok | 0 .../resources/gawk/regexpbrack2.awk | 0 .../resources/gawk/regexpbrack2.in | 0 .../resources/gawk/regexpbrack2.ok | 0 .../resources/gawk/regexprange.awk | 0 .../resources/gawk/regexprange.ok | 0 src/{test => it}/resources/gawk/regexsub.awk | 0 src/{test => it}/resources/gawk/regexsub.ok | 0 .../resources/gawk/reginttrad.awk | 0 src/{test => it}/resources/gawk/reginttrad.ok | 0 src/{test => it}/resources/gawk/regnul1.awk | 0 src/{test => it}/resources/gawk/regnul1.ok | 0 src/{test => it}/resources/gawk/regnul2.awk | 0 src/{test => it}/resources/gawk/regnul2.ok | 0 src/{test => it}/resources/gawk/regrange.awk | 0 src/{test => it}/resources/gawk/regrange.ok | 0 src/{test => it}/resources/gawk/regtest.sh | 0 src/{test => it}/resources/gawk/regx8bit.awk | 0 src/{test => it}/resources/gawk/regx8bit.ok | 0 src/{test => it}/resources/gawk/reindops.awk | 0 src/{test => it}/resources/gawk/reindops.in | 0 src/{test => it}/resources/gawk/reindops.ok | 0 src/{test => it}/resources/gawk/reint.awk | 0 src/{test => it}/resources/gawk/reint.in | 0 src/{test => it}/resources/gawk/reint.ok | 0 src/{test => it}/resources/gawk/reint2.awk | 0 src/{test => it}/resources/gawk/reint2.in | 0 src/{test => it}/resources/gawk/reint2.ok | 0 src/{test => it}/resources/gawk/reparse.awk | 0 src/{test => it}/resources/gawk/reparse.in | 0 src/{test => it}/resources/gawk/reparse.ok | 0 src/{test => it}/resources/gawk/resplit.awk | 0 src/{test => it}/resources/gawk/resplit.in | 0 src/{test => it}/resources/gawk/resplit.ok | 0 src/{test => it}/resources/gawk/revout.awk | 0 src/{test => it}/resources/gawk/revout.ok | 0 src/{test => it}/resources/gawk/revtwoway.awk | 0 src/{test => it}/resources/gawk/revtwoway.ok | 0 src/{test => it}/resources/gawk/rri1.awk | 0 src/{test => it}/resources/gawk/rri1.in | 0 src/it/resources/gawk/rri1.ok | 0 src/{test => it}/resources/gawk/rs.awk | 0 src/{test => it}/resources/gawk/rs.in | 0 src/{test => it}/resources/gawk/rs.ok | 0 src/{test => it}/resources/gawk/rscompat.awk | 0 src/{test => it}/resources/gawk/rscompat.in | 0 src/{test => it}/resources/gawk/rscompat.ok | 0 src/{test => it}/resources/gawk/rsgetline.awk | 0 src/{test => it}/resources/gawk/rsgetline.in | 0 src/{test => it}/resources/gawk/rsgetline.ok | 0 src/{test => it}/resources/gawk/rsglstdin.ok | 0 src/{test => it}/resources/gawk/rsnul1nl.awk | 0 src/{test => it}/resources/gawk/rsnul1nl.in | 0 src/{test => it}/resources/gawk/rsnul1nl.ok | 0 src/{test => it}/resources/gawk/rsnulbig.ok | 0 src/{test => it}/resources/gawk/rsnulbig2.ok | 0 src/{test => it}/resources/gawk/rsnullre.awk | 2 +- src/{test => it}/resources/gawk/rsnullre.in | 0 src/{test => it}/resources/gawk/rsnullre.ok | 0 src/{test => it}/resources/gawk/rsnulw.awk | 0 src/{test => it}/resources/gawk/rsnulw.in | 0 src/{test => it}/resources/gawk/rsnulw.ok | 0 src/{test => it}/resources/gawk/rsstart1.awk | 0 src/{test => it}/resources/gawk/rsstart1.in | 0 src/{test => it}/resources/gawk/rsstart1.ok | 0 src/{test => it}/resources/gawk/rsstart2.awk | 0 src/{test => it}/resources/gawk/rsstart2.in | 0 src/{test => it}/resources/gawk/rsstart2.ok | 0 src/{test => it}/resources/gawk/rsstart3.ok | 0 src/{test => it}/resources/gawk/rstest1.awk | 0 src/{test => it}/resources/gawk/rstest1.ok | 0 src/{test => it}/resources/gawk/rstest2.awk | 0 src/{test => it}/resources/gawk/rstest2.ok | 0 src/{test => it}/resources/gawk/rstest3.awk | 0 src/it/resources/gawk/rstest3.ok | 0 src/{test => it}/resources/gawk/rstest4.awk | 0 src/{test => it}/resources/gawk/rstest4.ok | 0 src/{test => it}/resources/gawk/rstest5.awk | 0 src/{test => it}/resources/gawk/rstest5.ok | 0 src/{test => it}/resources/gawk/rstest6.awk | 0 src/{test => it}/resources/gawk/rstest6.in | 0 src/{test => it}/resources/gawk/rstest6.ok | 0 src/{test => it}/resources/gawk/rswhite.awk | 0 src/{test => it}/resources/gawk/rswhite.in | 0 src/{test => it}/resources/gawk/rswhite.ok | 0 src/{test => it}/resources/gawk/rtlen.ok | 0 src/{test => it}/resources/gawk/rtlen.sh | 0 src/{test => it}/resources/gawk/rtlen01.ok | 0 src/{test => it}/resources/gawk/rtlen01.sh | 0 src/{test => it}/resources/gawk/rtlenmb.ok | 0 src/{test => it}/resources/gawk/rwarray.awk | 0 src/{test => it}/resources/gawk/rwarray.in | 0 src/{test => it}/resources/gawk/rwarray.ok | 0 src/{test => it}/resources/gawk/sandbox1.awk | 0 src/{test => it}/resources/gawk/sandbox1.ok | 0 src/{test => it}/resources/gawk/scalar.awk | 0 src/{test => it}/resources/gawk/scalar.ok | 0 src/{test => it}/resources/gawk/sclforin.awk | 0 src/{test => it}/resources/gawk/sclforin.ok | 0 src/{test => it}/resources/gawk/sclifin.awk | 0 src/{test => it}/resources/gawk/sclifin.ok | 0 src/{test => it}/resources/gawk/setrec0.awk | 0 src/{test => it}/resources/gawk/setrec0.in | 0 src/{test => it}/resources/gawk/setrec0.ok | 0 src/{test => it}/resources/gawk/setrec1.awk | 0 src/{test => it}/resources/gawk/setrec1.ok | 0 src/{test => it}/resources/gawk/shadow.awk | 0 src/{test => it}/resources/gawk/shadow.ok | 0 .../resources/gawk/shadowbuiltin.awk | 0 .../resources/gawk/shadowbuiltin.ok | 0 src/{test => it}/resources/gawk/sigpipe1.awk | 0 src/{test => it}/resources/gawk/sigpipe1.ok | 0 src/it/resources/gawk/skips.properties | 71 + src/{test => it}/resources/gawk/sort1.awk | 0 src/{test => it}/resources/gawk/sort1.ok | 0 src/{test => it}/resources/gawk/sortempty.awk | 0 src/{test => it}/resources/gawk/sortempty.ok | 0 src/{test => it}/resources/gawk/sortfor.awk | 0 src/{test => it}/resources/gawk/sortfor.in | 0 src/{test => it}/resources/gawk/sortfor.ok | 0 src/{test => it}/resources/gawk/sortfor2.awk | 0 src/{test => it}/resources/gawk/sortfor2.in | 0 src/{test => it}/resources/gawk/sortfor2.ok | 0 src/{test => it}/resources/gawk/sortglos.awk | 0 src/{test => it}/resources/gawk/sortglos.in | 0 src/{test => it}/resources/gawk/sortglos.ok | 0 src/{test => it}/resources/gawk/sortu.awk | 0 src/{test => it}/resources/gawk/sortu.ok | 0 .../resources/gawk/sourcesplit.ok | 0 src/{test => it}/resources/gawk/space.ok | 0 src/{test => it}/resources/gawk/spacere.awk | 0 src/{test => it}/resources/gawk/spacere.ok | 0 .../resources/gawk/split_after_fpat.awk | 0 .../resources/gawk/split_after_fpat.in | 0 .../resources/gawk/split_after_fpat.ok | 0 src/{test => it}/resources/gawk/splitarg4.awk | 0 src/{test => it}/resources/gawk/splitarg4.in | 0 src/{test => it}/resources/gawk/splitarg4.ok | 0 src/{test => it}/resources/gawk/splitargv.awk | 0 src/{test => it}/resources/gawk/splitargv.in | 0 src/{test => it}/resources/gawk/splitargv.ok | 0 src/{test => it}/resources/gawk/splitarr.awk | 0 src/{test => it}/resources/gawk/splitarr.ok | 0 src/{test => it}/resources/gawk/splitdef.awk | 0 src/{test => it}/resources/gawk/splitdef.ok | 0 src/{test => it}/resources/gawk/splitvar.awk | 0 src/{test => it}/resources/gawk/splitvar.in | 0 src/{test => it}/resources/gawk/splitvar.ok | 0 src/{test => it}/resources/gawk/splitwht.awk | 0 src/{test => it}/resources/gawk/splitwht.ok | 0 src/{test => it}/resources/gawk/sprintfc.awk | 0 src/{test => it}/resources/gawk/sprintfc.in | 0 src/{test => it}/resources/gawk/sprintfc.ok | 0 .../resources/gawk/status-close.awk | 0 .../resources/gawk/status-close.ok | 0 src/{test => it}/resources/gawk/strcat1.awk | 0 src/{test => it}/resources/gawk/strcat1.ok | 0 .../resources/gawk/strfieldnum.awk | 0 .../resources/gawk/strfieldnum.in | 0 .../resources/gawk/strfieldnum.ok | 0 src/{test => it}/resources/gawk/strftfld.awk | 0 src/{test => it}/resources/gawk/strftfld.in | 0 src/{test => it}/resources/gawk/strftfld.ok | 0 src/{test => it}/resources/gawk/strftime.awk | 0 src/{test => it}/resources/gawk/strftlng.awk | 0 src/{test => it}/resources/gawk/strftlng.ok | 0 src/{test => it}/resources/gawk/strnum1.awk | 0 src/{test => it}/resources/gawk/strnum1.ok | 0 src/{test => it}/resources/gawk/strnum2.awk | 0 src/{test => it}/resources/gawk/strnum2.ok | 0 src/{test => it}/resources/gawk/strtod.awk | 0 src/{test => it}/resources/gawk/strtod.in | 0 src/{test => it}/resources/gawk/strtod.ok | 0 src/{test => it}/resources/gawk/strtonum.awk | 0 src/{test => it}/resources/gawk/strtonum.ok | 0 src/{test => it}/resources/gawk/strtonum1.awk | 0 src/{test => it}/resources/gawk/strtonum1.ok | 0 src/{test => it}/resources/gawk/stupid1.awk | 0 src/{test => it}/resources/gawk/stupid1.ok | 0 src/{test => it}/resources/gawk/stupid2.awk | 0 src/it/resources/gawk/stupid2.ok | 0 src/{test => it}/resources/gawk/stupid3.awk | 0 src/{test => it}/resources/gawk/stupid3.ok | 0 src/{test => it}/resources/gawk/stupid4.awk | 0 src/{test => it}/resources/gawk/stupid4.ok | 0 src/{test => it}/resources/gawk/stupid5.awk | 0 src/{test => it}/resources/gawk/stupid5.ok | 0 src/{test => it}/resources/gawk/subamp.awk | 0 src/{test => it}/resources/gawk/subamp.in | 0 src/{test => it}/resources/gawk/subamp.ok | 0 src/{test => it}/resources/gawk/subback.awk | 0 src/{test => it}/resources/gawk/subback.in | 0 src/{test => it}/resources/gawk/subback.ok | 0 src/{test => it}/resources/gawk/subi18n.awk | 0 src/{test => it}/resources/gawk/subi18n.ok | 0 src/{test => it}/resources/gawk/subsepnm.awk | 0 src/{test => it}/resources/gawk/subsepnm.ok | 0 src/{test => it}/resources/gawk/subslash.awk | 0 src/{test => it}/resources/gawk/subslash.ok | 0 src/{test => it}/resources/gawk/substr.awk | 0 src/{test => it}/resources/gawk/substr.ok | 0 src/{test => it}/resources/gawk/swaplns.awk | 0 src/{test => it}/resources/gawk/swaplns.in | 0 src/{test => it}/resources/gawk/swaplns.ok | 0 src/{test => it}/resources/gawk/switch2.awk | 0 src/it/resources/gawk/switch2.ok | 0 src/{test => it}/resources/gawk/symtab1.awk | 0 src/{test => it}/resources/gawk/symtab1.ok | 0 src/{test => it}/resources/gawk/symtab10.awk | 0 src/{test => it}/resources/gawk/symtab10.ok | 0 src/{test => it}/resources/gawk/symtab11.awk | 0 src/{test => it}/resources/gawk/symtab11.ok | 0 src/{test => it}/resources/gawk/symtab12.awk | 0 src/{test => it}/resources/gawk/symtab12.ok | 0 src/{test => it}/resources/gawk/symtab2.awk | 0 src/{test => it}/resources/gawk/symtab2.ok | 0 src/{test => it}/resources/gawk/symtab3.awk | 0 src/{test => it}/resources/gawk/symtab3.ok | 0 src/{test => it}/resources/gawk/symtab4.awk | 0 src/{test => it}/resources/gawk/symtab4.in | 0 src/{test => it}/resources/gawk/symtab4.ok | 0 src/{test => it}/resources/gawk/symtab5.awk | 0 src/{test => it}/resources/gawk/symtab5.in | 0 src/{test => it}/resources/gawk/symtab5.ok | 0 src/{test => it}/resources/gawk/symtab6.awk | 0 src/{test => it}/resources/gawk/symtab6.ok | 0 src/{test => it}/resources/gawk/symtab7.awk | 0 src/{test => it}/resources/gawk/symtab7.in | 0 src/{test => it}/resources/gawk/symtab7.ok | 0 src/{test => it}/resources/gawk/symtab8.awk | 0 src/{test => it}/resources/gawk/symtab8.in | 0 src/{test => it}/resources/gawk/symtab8.ok | 0 src/{test => it}/resources/gawk/symtab9.awk | 0 src/{test => it}/resources/gawk/symtab9.ok | 0 src/{test => it}/resources/gawk/synerr1.awk | 0 src/{test => it}/resources/gawk/synerr1.ok | 0 src/{test => it}/resources/gawk/synerr2.awk | 0 src/{test => it}/resources/gawk/synerr2.ok | 0 src/{test => it}/resources/gawk/synerr3.awk | 0 src/{test => it}/resources/gawk/synerr3.ok | 0 .../resources/gawk/tailrecurse.awk | 0 .../resources/gawk/tailrecurse.ok | 0 .../resources/gawk/testext-mpfr.ok | 0 src/{test => it}/resources/gawk/testext.ok | 0 src/{test => it}/resources/gawk/time.awk | 0 src/{test => it}/resources/gawk/time.ok | 0 src/{test => it}/resources/gawk/timeout.awk | 0 src/{test => it}/resources/gawk/timeout.ok | 0 src/{test => it}/resources/gawk/tradanch.awk | 0 src/{test => it}/resources/gawk/tradanch.in | 0 src/it/resources/gawk/tradanch.ok | 0 src/{test => it}/resources/gawk/trailbs.awk | 0 src/{test => it}/resources/gawk/trailbs.in | 0 src/{test => it}/resources/gawk/trailbs.ok | 0 src/{test => it}/resources/gawk/tweakfld.awk | 2 +- src/{test => it}/resources/gawk/tweakfld.in | 0 src/{test => it}/resources/gawk/tweakfld.ok | 0 .../resources/gawk/typedregex1.awk | 0 .../resources/gawk/typedregex1.ok | 0 .../resources/gawk/typedregex2.awk | 0 .../resources/gawk/typedregex2.ok | 0 .../resources/gawk/typedregex3.awk | 0 .../resources/gawk/typedregex3.ok | 0 .../resources/gawk/typedregex4.awk | 0 .../resources/gawk/typedregex4.ok | 0 .../resources/gawk/typedregex5.awk | 0 .../resources/gawk/typedregex5.in | 0 .../resources/gawk/typedregex5.ok | 0 .../resources/gawk/typedregex6.awk | 0 .../resources/gawk/typedregex6.in | 0 .../resources/gawk/typedregex6.ok | 0 src/{test => it}/resources/gawk/typeof1.awk | 0 src/{test => it}/resources/gawk/typeof1.ok | 0 src/{test => it}/resources/gawk/typeof2.awk | 0 src/{test => it}/resources/gawk/typeof2.ok | 0 src/{test => it}/resources/gawk/typeof3.awk | 0 src/{test => it}/resources/gawk/typeof3.ok | 0 src/{test => it}/resources/gawk/typeof4.awk | 0 src/{test => it}/resources/gawk/typeof4.ok | 0 src/{test => it}/resources/gawk/typeof5.awk | 0 src/{test => it}/resources/gawk/typeof5.in | 0 src/{test => it}/resources/gawk/typeof5.ok | 0 src/{test => it}/resources/gawk/typeof6.awk | 0 src/{test => it}/resources/gawk/typeof6.ok | 0 src/{test => it}/resources/gawk/unicode1.awk | 0 src/{test => it}/resources/gawk/unicode1.ok | 0 src/{test => it}/resources/gawk/uninit2.awk | 0 src/{test => it}/resources/gawk/uninit2.ok | 0 src/{test => it}/resources/gawk/uninit3.awk | 0 src/{test => it}/resources/gawk/uninit3.ok | 0 src/{test => it}/resources/gawk/uninit4.awk | 0 src/{test => it}/resources/gawk/uninit4.ok | 0 src/{test => it}/resources/gawk/uninit5.awk | 0 src/{test => it}/resources/gawk/uninit5.ok | 0 .../resources/gawk/uninitialized.awk | 0 .../resources/gawk/uninitialized.ok | 0 src/it/resources/gawk/unterm.awk | 1 + src/it/resources/gawk/unterm.ok | 3 + src/{test => it}/resources/gawk/uparrfs.awk | 0 src/{test => it}/resources/gawk/uparrfs.in | 0 src/{test => it}/resources/gawk/uparrfs.ok | 0 src/{test => it}/resources/gawk/uplus.awk | 0 src/{test => it}/resources/gawk/uplus.ok | 0 src/it/resources/gawk/valgrind.awk | 43 + .../resources/gawk/watchpoint1.awk | 0 .../resources/gawk/watchpoint1.in | 0 .../resources/gawk/watchpoint1.ok | 0 .../resources/gawk/watchpoint1.script | 0 src/{test => it}/resources/gawk/wideidx.awk | 0 src/{test => it}/resources/gawk/wideidx.in | 0 src/{test => it}/resources/gawk/wideidx.ok | 0 src/{test => it}/resources/gawk/wideidx2.awk | 0 src/{test => it}/resources/gawk/wideidx2.ok | 0 src/{test => it}/resources/gawk/widesub.awk | 0 src/{test => it}/resources/gawk/widesub.ok | 0 src/{test => it}/resources/gawk/widesub2.awk | 0 src/{test => it}/resources/gawk/widesub2.ok | 0 src/{test => it}/resources/gawk/widesub3.awk | 0 src/{test => it}/resources/gawk/widesub3.in | 0 src/{test => it}/resources/gawk/widesub3.ok | 0 src/{test => it}/resources/gawk/widesub4.awk | 0 src/{test => it}/resources/gawk/widesub4.ok | 0 src/{test => it}/resources/gawk/wjposer1.awk | 0 src/{test => it}/resources/gawk/wjposer1.in | 0 src/{test => it}/resources/gawk/wjposer1.ok | 0 src/it/resources/gawk/xref.awk | 141 + src/it/resources/gawk/xref.original | 313 + src/{test => it}/resources/gawk/zero2.awk | 0 src/{test => it}/resources/gawk/zero2.ok | 0 src/{test => it}/resources/gawk/zeroe0.awk | 0 src/{test => it}/resources/gawk/zeroe0.ok | 0 src/{test => it}/resources/gawk/zeroflag.awk | 0 src/{test => it}/resources/gawk/zeroflag.ok | 0 src/site/markdown/compatibility.md | 19 +- src/test/java/io/jawk/AwkTestSupport.java | 175 +- src/test/java/io/jawk/CliOptionTest.java | 9 + .../java/io/jawk/GawkMaketestsParserTest.java | 166 + src/test/java/io/jawk/GawkTest.java | 133 - src/test/resources/gawk/dtdgport.in | 476 - src/test/resources/gawk/dtdgport.ok | 96 - src/test/resources/gawk/getline2.in1 | 1 - src/test/resources/gawk/getline2.in2 | 1 - src/test/resources/gawk/getline2.ok | 2 - src/test/resources/gawk/gtlnbufv.in | 1708 ---- src/test/resources/gawk/manyfiles.awk | 2 - src/test/resources/gawk/manyfiles.in | 1030 --- src/test/resources/gawk/unterm.awk | 1 - src/test/resources/gawk/unterm.ok | 3 - 1939 files changed, 16668 insertions(+), 3581 deletions(-) rename src/{test/java/io/jawk/BwkMiscTest.java => it/java/io/jawk/BwkMiscIT.java} (73%) rename src/{test/java/io/jawk/BwkPTest.java => it/java/io/jawk/BwkPIT.java} (72%) rename src/{test/java/io/jawk/BwkTTest.java => it/java/io/jawk/BwkTIT.java} (75%) create mode 100644 src/it/java/io/jawk/GawkCompatibilityIT.java create mode 100644 src/it/java/io/jawk/GawkMaketestsParser.java rename src/{test => it}/resources/bwk/misc/inputs/funstack.in (100%) rename src/{test => it}/resources/bwk/misc/results/funstack.ok (100%) rename src/{test => it}/resources/bwk/misc/scripts/funstack.awk (100%) rename src/{test => it}/resources/bwk/p/inputs/test.countries (100%) rename src/{test => it}/resources/bwk/p/results/p.1.ok (100%) rename src/{test => it}/resources/bwk/p/results/p.10.ok (100%) rename src/{test => it}/resources/bwk/p/results/p.11.ok (100%) rename src/{test => it}/resources/bwk/p/results/p.12.ok (100%) rename src/{test => it}/resources/bwk/p/results/p.13.ok (100%) rename src/{test => it}/resources/bwk/p/results/p.14.ok (100%) rename src/{test => it}/resources/bwk/p/results/p.15.ok (100%) rename src/{test => it}/resources/bwk/p/results/p.16.ok (100%) rename src/{test => it}/resources/bwk/p/results/p.17.ok (100%) rename src/{test => it}/resources/bwk/p/results/p.18.ok (100%) rename src/{test => it}/resources/bwk/p/results/p.19.ok (100%) rename src/{test => it}/resources/bwk/p/results/p.2.ok (100%) rename src/{test => it}/resources/bwk/p/results/p.20.ok (100%) rename src/{test => it}/resources/bwk/p/results/p.21.ok (100%) rename src/{test => it}/resources/bwk/p/results/p.21a.ok (100%) rename src/{test => it}/resources/bwk/p/results/p.22.ok (100%) rename src/{test => it}/resources/bwk/p/results/p.23.ok (100%) rename src/{test => it}/resources/bwk/p/results/p.24.ok (100%) rename src/{test => it}/resources/bwk/p/results/p.25.ok (100%) rename src/{test => it}/resources/bwk/p/results/p.26.ok (100%) rename src/{test => it}/resources/bwk/p/results/p.26a.ok (100%) rename src/{test => it}/resources/bwk/p/results/p.27.ok (100%) rename src/{test => it}/resources/bwk/p/results/p.28.ok (100%) rename src/{test => it}/resources/bwk/p/results/p.29.ok (100%) rename src/{test => it}/resources/bwk/p/results/p.3.ok (100%) rename src/{test => it}/resources/bwk/p/results/p.30.ok (100%) rename src/{test => it}/resources/bwk/p/results/p.31.ok (100%) rename src/{test => it}/resources/bwk/p/results/p.32.ok (100%) rename src/{test => it}/resources/bwk/p/results/p.33.ok (100%) rename src/{test => it}/resources/bwk/p/results/p.34.ok (100%) rename src/{test => it}/resources/bwk/p/results/p.35.ok (100%) rename src/{test => it}/resources/bwk/p/results/p.36.ok (100%) rename src/{test => it}/resources/bwk/p/results/p.37.ok (100%) rename src/{test => it}/resources/bwk/p/results/p.38.ok (100%) rename src/{test => it}/resources/bwk/p/results/p.39.ok (100%) rename src/{test => it}/resources/bwk/p/results/p.4.ok (100%) rename src/{test => it}/resources/bwk/p/results/p.40.ok (100%) rename src/{test => it}/resources/bwk/p/results/p.41.ok (100%) rename src/{test => it}/resources/bwk/p/results/p.42.ok (100%) rename src/{test => it}/resources/bwk/p/results/p.43.ok (100%) rename src/{test => it}/resources/bwk/p/results/p.44.ok (100%) rename src/{test => it}/resources/bwk/p/results/p.45.ok (100%) rename src/{test => it}/resources/bwk/p/results/p.46.ok (100%) rename src/{test => it}/resources/bwk/p/results/p.47.ok (100%) rename src/{test => it}/resources/bwk/p/results/p.48.ok (100%) rename src/{test => it}/resources/bwk/p/results/p.48a.ok (100%) rename src/{test => it}/resources/bwk/p/results/p.49.ok (100%) rename src/{test => it}/resources/bwk/p/results/p.5.ok (100%) rename src/{test => it}/resources/bwk/p/results/p.50.ok (100%) rename src/{test => it}/resources/bwk/p/results/p.51.ok (100%) rename src/{test => it}/resources/bwk/p/results/p.52.ok (100%) rename src/{test => it}/resources/bwk/p/results/p.5a.ok (100%) rename src/{test => it}/resources/bwk/p/results/p.6.ok (100%) rename src/{test => it}/resources/bwk/p/results/p.7.ok (100%) rename src/{test => it}/resources/bwk/p/results/p.8.ok (100%) rename src/{test => it}/resources/bwk/p/results/p.9.ok (100%) rename src/{test => it}/resources/bwk/p/results/p.table.ok (100%) rename src/{test => it}/resources/bwk/p/scripts/p.1 (100%) rename src/{test => it}/resources/bwk/p/scripts/p.10 (100%) rename src/{test => it}/resources/bwk/p/scripts/p.11 (100%) rename src/{test => it}/resources/bwk/p/scripts/p.12 (100%) rename src/{test => it}/resources/bwk/p/scripts/p.13 (100%) rename src/{test => it}/resources/bwk/p/scripts/p.14 (100%) rename src/{test => it}/resources/bwk/p/scripts/p.15 (100%) rename src/{test => it}/resources/bwk/p/scripts/p.16 (100%) rename src/{test => it}/resources/bwk/p/scripts/p.17 (100%) rename src/{test => it}/resources/bwk/p/scripts/p.18 (100%) rename src/{test => it}/resources/bwk/p/scripts/p.19 (100%) rename src/{test => it}/resources/bwk/p/scripts/p.2 (100%) rename src/{test => it}/resources/bwk/p/scripts/p.20 (100%) rename src/{test => it}/resources/bwk/p/scripts/p.21 (100%) rename src/{test => it}/resources/bwk/p/scripts/p.21a (100%) rename src/{test => it}/resources/bwk/p/scripts/p.22 (100%) rename src/{test => it}/resources/bwk/p/scripts/p.23 (100%) rename src/{test => it}/resources/bwk/p/scripts/p.24 (100%) rename src/{test => it}/resources/bwk/p/scripts/p.25 (100%) rename src/{test => it}/resources/bwk/p/scripts/p.26 (100%) rename src/{test => it}/resources/bwk/p/scripts/p.26a (100%) rename src/{test => it}/resources/bwk/p/scripts/p.27 (100%) rename src/{test => it}/resources/bwk/p/scripts/p.28 (100%) rename src/{test => it}/resources/bwk/p/scripts/p.29 (100%) rename src/{test => it}/resources/bwk/p/scripts/p.3 (100%) rename src/{test => it}/resources/bwk/p/scripts/p.30 (100%) rename src/{test => it}/resources/bwk/p/scripts/p.31 (100%) rename src/{test => it}/resources/bwk/p/scripts/p.32 (100%) rename src/{test => it}/resources/bwk/p/scripts/p.33 (100%) rename src/{test => it}/resources/bwk/p/scripts/p.34 (100%) rename src/{test => it}/resources/bwk/p/scripts/p.35 (100%) rename src/{test => it}/resources/bwk/p/scripts/p.36 (100%) rename src/{test => it}/resources/bwk/p/scripts/p.37 (100%) rename src/{test => it}/resources/bwk/p/scripts/p.38 (100%) rename src/{test => it}/resources/bwk/p/scripts/p.39 (100%) rename src/{test => it}/resources/bwk/p/scripts/p.4 (100%) rename src/{test => it}/resources/bwk/p/scripts/p.40 (100%) rename src/{test => it}/resources/bwk/p/scripts/p.41 (100%) rename src/{test => it}/resources/bwk/p/scripts/p.42 (100%) rename src/{test => it}/resources/bwk/p/scripts/p.43 (100%) rename src/{test => it}/resources/bwk/p/scripts/p.44 (100%) rename src/{test => it}/resources/bwk/p/scripts/p.45 (100%) rename src/{test => it}/resources/bwk/p/scripts/p.46 (100%) rename src/{test => it}/resources/bwk/p/scripts/p.47 (100%) rename src/{test => it}/resources/bwk/p/scripts/p.48 (100%) rename src/{test => it}/resources/bwk/p/scripts/p.48a (100%) rename src/{test => it}/resources/bwk/p/scripts/p.49 (100%) rename src/{test => it}/resources/bwk/p/scripts/p.5 (100%) rename src/{test => it}/resources/bwk/p/scripts/p.50 (100%) rename src/{test => it}/resources/bwk/p/scripts/p.51 (100%) rename src/{test => it}/resources/bwk/p/scripts/p.52 (100%) rename src/{test => it}/resources/bwk/p/scripts/p.5a (100%) rename src/{test => it}/resources/bwk/p/scripts/p.6 (100%) rename src/{test => it}/resources/bwk/p/scripts/p.7 (100%) rename src/{test => it}/resources/bwk/p/scripts/p.8 (100%) rename src/{test => it}/resources/bwk/p/scripts/p.9 (100%) rename src/{test => it}/resources/bwk/p/scripts/p.table (100%) rename src/{test => it}/resources/bwk/t/inputs/test.data (100%) rename src/{test => it}/resources/bwk/t/results/t.0.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.0a.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.1.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.1.x.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.2.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.2.x.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.3.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.3.x.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.4.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.4.x.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.5.x.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.6.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.6.x.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.6a.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.6b.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.8.x.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.8.y.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.NF.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.a.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.addops.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.aeiou.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.aeiouy.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.arith.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.array.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.array1.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.array2.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.assert.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.avg.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.b.x.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.be.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.beginexit.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.beginnext.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.break.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.break1.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.break2.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.break3.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.bug1.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.builtins.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.cat.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.cat1.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.cat2.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.cmp.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.coerce.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.coerce2.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.comment.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.comment1.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.concat.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.cond.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.contin.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.count.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.crlf.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.cum.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.d.x.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.delete0.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.delete1.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.delete2.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.delete3.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.do.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.e.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.else.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.exit.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.exit1.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.f.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.f.x.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.f0.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.f1.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.f2.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.f3.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.f4.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.for.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.for1.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.for2.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.for3.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.format4.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.fun.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.fun0.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.fun1.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.fun2.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.fun3.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.fun4.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.fun5.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.getline1.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.getval.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.gsub.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.gsub1.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.gsub3.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.gsub4.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.i.x.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.if.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.in.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.in1.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.in2.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.in3.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.incr.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.incr2.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.incr3.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.index.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.intest.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.intest2.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.j.x.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.longstr.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.makef.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.match.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.match1.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.max.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.mod.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.monotone.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.nameval.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.next.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.not.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.null0.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.ofmt.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.ofs.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.ors.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.pat.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.pipe.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.pp.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.pp1.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.pp2.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.printf.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.printf2.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.quote.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.randk.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.re1.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.re1a.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.re2.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.re3.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.re4.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.re5.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.re7.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.reFS.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.rec.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.redir1.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.reg.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.roff.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.sep.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.seqno.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.set0.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.set0a.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.set0b.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.set1.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.set2.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.set3.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.split1.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.split2.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.split2a.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.split3.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.split4.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.split8.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.split9.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.split9a.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.stately.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.strcmp.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.strcmp1.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.strnum.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.sub0.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.sub1.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.sub2.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.sub3.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.substr.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.substr1.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.time.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.vf.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.vf1.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.vf2.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.vf3.ok (100%) rename src/{test => it}/resources/bwk/t/results/t.x.ok (100%) rename src/{test => it}/resources/bwk/t/scripts/t.0 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.0a (100%) rename src/{test => it}/resources/bwk/t/scripts/t.1 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.1.x (100%) rename src/{test => it}/resources/bwk/t/scripts/t.2 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.2.x (100%) rename src/{test => it}/resources/bwk/t/scripts/t.3 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.3.x (100%) rename src/{test => it}/resources/bwk/t/scripts/t.4 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.4.x (100%) rename src/{test => it}/resources/bwk/t/scripts/t.5.x (100%) rename src/{test => it}/resources/bwk/t/scripts/t.6 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.6.x (100%) rename src/{test => it}/resources/bwk/t/scripts/t.6a (100%) rename src/{test => it}/resources/bwk/t/scripts/t.6b (100%) rename src/{test => it}/resources/bwk/t/scripts/t.8.x (100%) rename src/{test => it}/resources/bwk/t/scripts/t.8.y (100%) rename src/{test => it}/resources/bwk/t/scripts/t.NF (100%) rename src/{test => it}/resources/bwk/t/scripts/t.a (100%) rename src/{test => it}/resources/bwk/t/scripts/t.addops (100%) rename src/{test => it}/resources/bwk/t/scripts/t.aeiou (100%) rename src/{test => it}/resources/bwk/t/scripts/t.aeiouy (100%) rename src/{test => it}/resources/bwk/t/scripts/t.arith (100%) rename src/{test => it}/resources/bwk/t/scripts/t.array (100%) rename src/{test => it}/resources/bwk/t/scripts/t.array1 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.array2 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.assert (100%) rename src/{test => it}/resources/bwk/t/scripts/t.avg (100%) rename src/{test => it}/resources/bwk/t/scripts/t.b.x (100%) rename src/{test => it}/resources/bwk/t/scripts/t.be (100%) rename src/{test => it}/resources/bwk/t/scripts/t.beginexit (100%) rename src/{test => it}/resources/bwk/t/scripts/t.beginnext (100%) rename src/{test => it}/resources/bwk/t/scripts/t.break (100%) rename src/{test => it}/resources/bwk/t/scripts/t.break1 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.break2 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.break3 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.bug1 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.builtins (100%) rename src/{test => it}/resources/bwk/t/scripts/t.cat (100%) rename src/{test => it}/resources/bwk/t/scripts/t.cat1 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.cat2 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.cmp (100%) rename src/{test => it}/resources/bwk/t/scripts/t.coerce (100%) rename src/{test => it}/resources/bwk/t/scripts/t.coerce2 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.comment (100%) rename src/{test => it}/resources/bwk/t/scripts/t.comment1 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.concat (100%) rename src/{test => it}/resources/bwk/t/scripts/t.cond (100%) rename src/{test => it}/resources/bwk/t/scripts/t.contin (100%) rename src/{test => it}/resources/bwk/t/scripts/t.count (100%) rename src/{test => it}/resources/bwk/t/scripts/t.crlf (100%) rename src/{test => it}/resources/bwk/t/scripts/t.cum (100%) rename src/{test => it}/resources/bwk/t/scripts/t.d.x (100%) rename src/{test => it}/resources/bwk/t/scripts/t.delete0 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.delete1 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.delete2 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.delete3 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.do (100%) rename src/{test => it}/resources/bwk/t/scripts/t.e (100%) rename src/{test => it}/resources/bwk/t/scripts/t.else (100%) rename src/{test => it}/resources/bwk/t/scripts/t.exit (100%) rename src/{test => it}/resources/bwk/t/scripts/t.exit1 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.f (100%) rename src/{test => it}/resources/bwk/t/scripts/t.f.x (100%) rename src/{test => it}/resources/bwk/t/scripts/t.f0 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.f1 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.f2 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.f3 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.f4 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.for (100%) rename src/{test => it}/resources/bwk/t/scripts/t.for1 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.for2 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.for3 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.format4 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.fun (100%) rename src/{test => it}/resources/bwk/t/scripts/t.fun0 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.fun1 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.fun2 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.fun3 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.fun4 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.fun5 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.getline1 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.getval (100%) rename src/{test => it}/resources/bwk/t/scripts/t.gsub (100%) rename src/{test => it}/resources/bwk/t/scripts/t.gsub1 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.gsub3 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.gsub4 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.i.x (100%) rename src/{test => it}/resources/bwk/t/scripts/t.if (100%) rename src/{test => it}/resources/bwk/t/scripts/t.in (100%) rename src/{test => it}/resources/bwk/t/scripts/t.in1 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.in2 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.in3 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.incr (100%) rename src/{test => it}/resources/bwk/t/scripts/t.incr2 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.incr3 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.index (100%) rename src/{test => it}/resources/bwk/t/scripts/t.intest (100%) rename src/{test => it}/resources/bwk/t/scripts/t.intest2 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.j.x (100%) rename src/{test => it}/resources/bwk/t/scripts/t.longstr (100%) rename src/{test => it}/resources/bwk/t/scripts/t.makef (100%) rename src/{test => it}/resources/bwk/t/scripts/t.match (100%) rename src/{test => it}/resources/bwk/t/scripts/t.match1 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.max (100%) rename src/{test => it}/resources/bwk/t/scripts/t.mod (100%) rename src/{test => it}/resources/bwk/t/scripts/t.monotone (100%) rename src/{test => it}/resources/bwk/t/scripts/t.nameval (100%) rename src/{test => it}/resources/bwk/t/scripts/t.next (100%) rename src/{test => it}/resources/bwk/t/scripts/t.not (100%) rename src/{test => it}/resources/bwk/t/scripts/t.null0 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.ofmt (100%) rename src/{test => it}/resources/bwk/t/scripts/t.ofs (100%) rename src/{test => it}/resources/bwk/t/scripts/t.ors (100%) rename src/{test => it}/resources/bwk/t/scripts/t.pat (100%) rename src/{test => it}/resources/bwk/t/scripts/t.pipe (100%) rename src/{test => it}/resources/bwk/t/scripts/t.pp (100%) rename src/{test => it}/resources/bwk/t/scripts/t.pp1 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.pp2 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.printf (100%) rename src/{test => it}/resources/bwk/t/scripts/t.printf2 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.quote (100%) rename src/{test => it}/resources/bwk/t/scripts/t.randk (100%) rename src/{test => it}/resources/bwk/t/scripts/t.re1 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.re1a (100%) rename src/{test => it}/resources/bwk/t/scripts/t.re2 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.re3 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.re4 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.re5 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.re7 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.reFS (100%) rename src/{test => it}/resources/bwk/t/scripts/t.rec (100%) rename src/{test => it}/resources/bwk/t/scripts/t.redir1 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.reg (100%) rename src/{test => it}/resources/bwk/t/scripts/t.roff (100%) rename src/{test => it}/resources/bwk/t/scripts/t.sep (100%) rename src/{test => it}/resources/bwk/t/scripts/t.seqno (100%) rename src/{test => it}/resources/bwk/t/scripts/t.set0 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.set0a (100%) rename src/{test => it}/resources/bwk/t/scripts/t.set0b (100%) rename src/{test => it}/resources/bwk/t/scripts/t.set1 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.set2 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.set3 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.split1 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.split2 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.split2a (100%) rename src/{test => it}/resources/bwk/t/scripts/t.split3 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.split4 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.split8 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.split9 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.split9a (100%) rename src/{test => it}/resources/bwk/t/scripts/t.stately (100%) rename src/{test => it}/resources/bwk/t/scripts/t.strcmp (100%) rename src/{test => it}/resources/bwk/t/scripts/t.strcmp1 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.strnum (100%) rename src/{test => it}/resources/bwk/t/scripts/t.sub0 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.sub1 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.sub2 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.sub3 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.substr (100%) rename src/{test => it}/resources/bwk/t/scripts/t.substr1 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.time (100%) rename src/{test => it}/resources/bwk/t/scripts/t.vf (100%) rename src/{test => it}/resources/bwk/t/scripts/t.vf1 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.vf2 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.vf3 (100%) rename src/{test => it}/resources/bwk/t/scripts/t.x (100%) rename src/{test => it}/resources/gawk/ChangeLog (100%) rename src/{test => it}/resources/gawk/ChangeLog.0 (100%) rename src/{test => it}/resources/gawk/ChangeLog.1 (100%) rename src/{test => it}/resources/gawk/Gentests (100%) rename src/{test => it}/resources/gawk/Makefile.am (100%) rename src/{test => it}/resources/gawk/Makefile.in (100%) rename src/{test => it}/resources/gawk/Maketests (100%) create mode 100644 src/it/resources/gawk/README rename src/{test => it}/resources/gawk/aadelete1.awk (100%) rename src/{test => it}/resources/gawk/aadelete1.ok (100%) rename src/{test => it}/resources/gawk/aadelete2.awk (100%) rename src/{test => it}/resources/gawk/aadelete2.ok (100%) rename src/{test => it}/resources/gawk/aarray1.awk (100%) rename src/{test => it}/resources/gawk/aarray1.ok (100%) rename src/{test => it}/resources/gawk/aasort.awk (100%) rename src/{test => it}/resources/gawk/aasort.ok (100%) rename src/{test => it}/resources/gawk/aasorti.awk (100%) rename src/{test => it}/resources/gawk/aasorti.ok (100%) rename src/{test => it}/resources/gawk/addcomma.awk (100%) rename src/{test => it}/resources/gawk/addcomma.in (100%) rename src/{test => it}/resources/gawk/addcomma.ok (100%) rename src/{test => it}/resources/gawk/anchgsub.awk (100%) rename src/{test => it}/resources/gawk/anchgsub.in (100%) rename src/{test => it}/resources/gawk/anchgsub.ok (100%) rename src/{test => it}/resources/gawk/anchor.awk (100%) rename src/{test => it}/resources/gawk/anchor.in (100%) rename src/{test => it}/resources/gawk/anchor.ok (100%) rename src/{test => it}/resources/gawk/apiterm.awk (100%) rename src/{test => it}/resources/gawk/apiterm.in (100%) rename src/{test => it}/resources/gawk/apiterm.ok (100%) rename src/{test => it}/resources/gawk/argarray.awk (100%) rename src/{test => it}/resources/gawk/argarray.in (100%) rename src/{test => it}/resources/gawk/argarray.ok (100%) rename src/{test => it}/resources/gawk/argcasfile.awk (100%) rename src/{test => it}/resources/gawk/argcasfile.in (100%) rename src/{test => it}/resources/gawk/argcasfile.ok (100%) rename src/{test => it}/resources/gawk/argtest.awk (100%) rename src/{test => it}/resources/gawk/argtest.ok (100%) rename src/{test => it}/resources/gawk/arrayind1.awk (100%) rename src/{test => it}/resources/gawk/arrayind1.in (100%) rename src/{test => it}/resources/gawk/arrayind1.ok (100%) rename src/{test => it}/resources/gawk/arrayind2.awk (100%) rename src/{test => it}/resources/gawk/arrayind2.ok (100%) rename src/{test => it}/resources/gawk/arrayind3.awk (100%) rename src/{test => it}/resources/gawk/arrayind3.ok (100%) rename src/{test => it}/resources/gawk/arrayparm.awk (100%) rename src/{test => it}/resources/gawk/arrayparm.ok (100%) rename src/{test => it}/resources/gawk/arrayprm2.awk (100%) rename src/{test => it}/resources/gawk/arrayprm2.ok (100%) rename src/{test => it}/resources/gawk/arrayprm3.awk (100%) rename src/{test => it}/resources/gawk/arrayprm3.ok (100%) rename src/{test => it}/resources/gawk/arrayref.awk (100%) rename src/{test => it}/resources/gawk/arrayref.ok (100%) rename src/{test => it}/resources/gawk/arraysort.awk (100%) rename src/{test => it}/resources/gawk/arraysort.ok (100%) rename src/{test => it}/resources/gawk/arraysort2.awk (100%) rename src/{test => it}/resources/gawk/arraysort2.ok (100%) rename src/{test => it}/resources/gawk/arraytype-mpfr.ok (100%) rename src/{test => it}/resources/gawk/arraytype.awk (100%) rename src/{test => it}/resources/gawk/arraytype.ok (100%) rename src/{test => it}/resources/gawk/arrdbg.awk (100%) rename src/{test => it}/resources/gawk/arrymem1.awk (100%) rename src/{test => it}/resources/gawk/arrymem1.ok (100%) rename src/{test => it}/resources/gawk/arryref2.awk (100%) rename src/{test => it}/resources/gawk/arryref2.ok (100%) rename src/{test => it}/resources/gawk/arryref3.awk (100%) rename src/{test => it}/resources/gawk/arryref3.ok (100%) rename src/{test => it}/resources/gawk/arryref4.awk (100%) rename src/{test => it}/resources/gawk/arryref4.ok (100%) rename src/{test => it}/resources/gawk/arryref5.awk (100%) rename src/{test => it}/resources/gawk/arryref5.ok (100%) rename src/{test => it}/resources/gawk/arynasty.awk (100%) rename src/{test => it}/resources/gawk/arynasty.ok (100%) rename src/{test => it}/resources/gawk/arynocls.awk (96%) rename src/{test => it}/resources/gawk/arynocls.in (100%) rename src/{test => it}/resources/gawk/arynocls.ok (100%) rename src/{test => it}/resources/gawk/aryprm1.awk (100%) rename src/{test => it}/resources/gawk/aryprm1.ok (100%) rename src/{test => it}/resources/gawk/aryprm2.awk (100%) rename src/{test => it}/resources/gawk/aryprm2.ok (100%) rename src/{test => it}/resources/gawk/aryprm3.awk (100%) rename src/{test => it}/resources/gawk/aryprm3.ok (100%) rename src/{test => it}/resources/gawk/aryprm4.awk (100%) rename src/{test => it}/resources/gawk/aryprm4.ok (100%) rename src/{test => it}/resources/gawk/aryprm5.awk (100%) rename src/{test => it}/resources/gawk/aryprm5.ok (100%) rename src/{test => it}/resources/gawk/aryprm6.awk (100%) rename src/{test => it}/resources/gawk/aryprm6.ok (100%) rename src/{test => it}/resources/gawk/aryprm7.awk (100%) rename src/{test => it}/resources/gawk/aryprm7.ok (100%) rename src/{test => it}/resources/gawk/aryprm8.awk (100%) rename src/{test => it}/resources/gawk/aryprm8.ok (100%) rename src/{test => it}/resources/gawk/aryprm9.awk (100%) rename src/{test => it}/resources/gawk/aryprm9.ok (100%) rename src/{test => it}/resources/gawk/arysubnm.awk (100%) rename src/{test => it}/resources/gawk/arysubnm.ok (100%) rename src/{test => it}/resources/gawk/aryunasgn.awk (100%) rename src/{test => it}/resources/gawk/aryunasgn.ok (100%) rename src/{test => it}/resources/gawk/asgext.awk (100%) rename src/{test => it}/resources/gawk/asgext.in (100%) rename src/{test => it}/resources/gawk/asgext.ok (100%) rename src/{test => it}/resources/gawk/asort.awk (100%) rename src/{test => it}/resources/gawk/asort.ok (100%) rename src/{test => it}/resources/gawk/asortbool.awk (100%) rename src/{test => it}/resources/gawk/asortbool.ok (100%) rename src/{test => it}/resources/gawk/asorti.awk (100%) rename src/{test => it}/resources/gawk/asorti.ok (100%) rename src/{test => it}/resources/gawk/asortsymtab.awk (100%) rename src/{test => it}/resources/gawk/asortsymtab.ok (100%) rename src/{test => it}/resources/gawk/assignnumfield.awk (100%) rename src/{test => it}/resources/gawk/assignnumfield.in (100%) rename src/{test => it}/resources/gawk/assignnumfield.ok (100%) rename src/{test => it}/resources/gawk/assignnumfield2.awk (100%) rename src/{test => it}/resources/gawk/assignnumfield2.ok (100%) rename src/{test => it}/resources/gawk/awkpath.ok (100%) rename src/{test => it}/resources/gawk/back89.awk (100%) rename src/{test => it}/resources/gawk/back89.in (100%) rename src/{test => it}/resources/gawk/back89.ok (100%) rename src/{test => it}/resources/gawk/backbigs1.awk (100%) rename src/{test => it}/resources/gawk/backbigs1.in (100%) rename src/{test => it}/resources/gawk/backbigs1.ok (100%) rename src/{test => it}/resources/gawk/backgsub.awk (100%) rename src/{test => it}/resources/gawk/backgsub.in (100%) rename src/{test => it}/resources/gawk/backgsub.ok (100%) rename src/{test => it}/resources/gawk/backsmalls1.awk (100%) rename src/{test => it}/resources/gawk/backsmalls1.in (100%) rename src/{test => it}/resources/gawk/backsmalls1.ok (100%) rename src/{test => it}/resources/gawk/backsmalls2.awk (100%) rename src/{test => it}/resources/gawk/backsmalls2.ok (100%) rename src/{test => it}/resources/gawk/backw.awk (100%) rename src/{test => it}/resources/gawk/backw.in (100%) rename src/{test => it}/resources/gawk/backw.ok (100%) rename src/{test => it}/resources/gawk/badargs.ok (100%) rename src/{test => it}/resources/gawk/badassign1.awk (100%) rename src/{test => it}/resources/gawk/badassign1.ok (100%) rename src/{test => it}/resources/gawk/badbuild.awk (100%) rename src/{test => it}/resources/gawk/badbuild.in (100%) rename src/{test => it}/resources/gawk/badbuild.ok (100%) rename src/{test => it}/resources/gawk/beginfile1.awk (100%) rename src/{test => it}/resources/gawk/beginfile1.ok (100%) rename src/{test => it}/resources/gawk/beginfile2.in (100%) rename src/{test => it}/resources/gawk/beginfile2.ok (100%) rename src/{test => it}/resources/gawk/beginfile2.sh (100%) rename src/{test => it}/resources/gawk/binmode1.ok (100%) rename src/{test => it}/resources/gawk/callparam.awk (100%) rename src/{test => it}/resources/gawk/callparam.ok (100%) rename src/{test => it}/resources/gawk/charasbytes.awk (100%) rename src/{test => it}/resources/gawk/charasbytes.in (100%) rename src/{test => it}/resources/gawk/charasbytes.ok (100%) create mode 100644 src/it/resources/gawk/check_retest.awk create mode 100644 src/it/resources/gawk/checknegtime.awk rename src/{test => it}/resources/gawk/childin.awk (100%) rename src/{test => it}/resources/gawk/childin.in (100%) rename src/{test => it}/resources/gawk/childin.ok (100%) create mode 100644 src/it/resources/gawk/clobber.awk create mode 100644 src/it/resources/gawk/clobber.ok rename src/{test => it}/resources/gawk/clos1way.awk (100%) rename src/{test => it}/resources/gawk/clos1way.ok (100%) rename src/{test => it}/resources/gawk/clos1way2.awk (100%) rename src/{test => it}/resources/gawk/clos1way2.in (100%) rename src/{test => it}/resources/gawk/clos1way2.ok (100%) rename src/{test => it}/resources/gawk/clos1way3.awk (100%) rename src/{test => it}/resources/gawk/clos1way3.ok (100%) rename src/{test => it}/resources/gawk/clos1way4.awk (100%) rename src/{test => it}/resources/gawk/clos1way4.ok (100%) rename src/{test => it}/resources/gawk/clos1way5.awk (100%) rename src/{test => it}/resources/gawk/clos1way5.ok (100%) rename src/{test => it}/resources/gawk/clos1way6.awk (100%) rename src/{test => it}/resources/gawk/clos1way6.ok (100%) rename src/{test => it}/resources/gawk/close_status.awk (100%) rename src/{test => it}/resources/gawk/close_status.ok (100%) rename src/{test => it}/resources/gawk/closebad.awk (100%) rename src/{test => it}/resources/gawk/closebad.ok (100%) rename src/{test => it}/resources/gawk/clsflnam.awk (100%) rename src/{test => it}/resources/gawk/clsflnam.in (100%) rename src/{test => it}/resources/gawk/clsflnam.ok (100%) rename src/{test => it}/resources/gawk/cmdlinefsbacknl.ok (100%) rename src/{test => it}/resources/gawk/cmdlinefsbacknl.sh (100%) rename src/{test => it}/resources/gawk/colonwarn.awk (100%) rename src/{test => it}/resources/gawk/colonwarn.in (100%) rename src/{test => it}/resources/gawk/colonwarn.ok (100%) rename src/{test => it}/resources/gawk/commas.awk (100%) rename src/{test => it}/resources/gawk/commas.ok (100%) rename src/{test => it}/resources/gawk/compare.awk (100%) rename src/{test => it}/resources/gawk/compare.in (100%) rename src/{test => it}/resources/gawk/compare.ok (100%) rename src/{test => it}/resources/gawk/compare2.awk (100%) rename src/{test => it}/resources/gawk/compare2.ok (100%) rename src/{test => it}/resources/gawk/concat1.awk (100%) rename src/{test => it}/resources/gawk/concat1.in (100%) rename src/{test => it}/resources/gawk/concat1.ok (100%) rename src/{test => it}/resources/gawk/concat2.awk (100%) rename src/{test => it}/resources/gawk/concat2.ok (100%) rename src/{test => it}/resources/gawk/concat3.awk (100%) rename src/{test => it}/resources/gawk/concat3.ok (100%) rename src/{test => it}/resources/gawk/concat4.awk (100%) rename src/{test => it}/resources/gawk/concat4.in (100%) rename src/{test => it}/resources/gawk/concat4.ok (100%) rename src/{test => it}/resources/gawk/concat5.awk (100%) rename src/{test => it}/resources/gawk/concat5.ok (100%) rename src/{test => it}/resources/gawk/convfmt.awk (100%) rename src/{test => it}/resources/gawk/convfmt.ok (100%) rename src/{test => it}/resources/gawk/crlf.awk (100%) rename src/{test => it}/resources/gawk/crlf.ok (100%) rename src/{test => it}/resources/gawk/csv1.awk (100%) rename src/{test => it}/resources/gawk/csv1.in (100%) rename src/{test => it}/resources/gawk/csv1.ok (100%) rename src/{test => it}/resources/gawk/csv2.awk (100%) rename src/{test => it}/resources/gawk/csv2.ok (100%) rename src/{test => it}/resources/gawk/csv3.awk (100%) rename src/{test => it}/resources/gawk/csv3.in (100%) rename src/{test => it}/resources/gawk/csv3.ok (100%) rename src/{test => it}/resources/gawk/csvodd.awk (100%) rename src/{test => it}/resources/gawk/csvodd.in (100%) rename src/{test => it}/resources/gawk/csvodd.ok (100%) rename src/{test => it}/resources/gawk/datanonl.awk (100%) rename src/{test => it}/resources/gawk/datanonl.in (100%) rename src/{test => it}/resources/gawk/datanonl.ok (100%) create mode 100644 src/it/resources/gawk/dbugeval.in create mode 100644 src/it/resources/gawk/dbugeval.ok create mode 100644 src/it/resources/gawk/dbugeval2.awk create mode 100644 src/it/resources/gawk/dbugeval2.in create mode 100644 src/it/resources/gawk/dbugeval2.ok create mode 100644 src/it/resources/gawk/dbugeval3.awk create mode 100644 src/it/resources/gawk/dbugeval3.in create mode 100644 src/it/resources/gawk/dbugeval3.ok rename src/{test/resources/gawk/delarprm.ok => it/resources/gawk/dbugeval4.awk} (100%) create mode 100644 src/it/resources/gawk/dbugeval4.in create mode 100644 src/it/resources/gawk/dbugeval4.ok create mode 100644 src/it/resources/gawk/dbugtypedre1.awk create mode 100644 src/it/resources/gawk/dbugtypedre1.in create mode 100644 src/it/resources/gawk/dbugtypedre1.ok create mode 100644 src/it/resources/gawk/dbugtypedre2.awk create mode 100644 src/it/resources/gawk/dbugtypedre2.in create mode 100644 src/it/resources/gawk/dbugtypedre2.ok rename src/{test => it}/resources/gawk/defref.awk (100%) rename src/{test => it}/resources/gawk/defref.ok (100%) rename src/{test => it}/resources/gawk/delargv.awk (100%) rename src/{test => it}/resources/gawk/delargv.ok (100%) rename src/{test => it}/resources/gawk/delarpm2.awk (100%) rename src/{test => it}/resources/gawk/delarpm2.ok (100%) rename src/{test => it}/resources/gawk/delarprm.awk (100%) rename src/{test/resources/gawk/elemnew1.ok => it/resources/gawk/delarprm.ok} (100%) rename src/{test => it}/resources/gawk/delfunc.awk (100%) rename src/{test => it}/resources/gawk/delfunc.ok (100%) rename src/{test => it}/resources/gawk/delsub.awk (100%) rename src/{test => it}/resources/gawk/delsub.ok (100%) rename src/{test => it}/resources/gawk/devfd.in1 (100%) rename src/{test => it}/resources/gawk/devfd.in2 (100%) rename src/{test => it}/resources/gawk/devfd.in4 (100%) rename src/{test => it}/resources/gawk/devfd.in5 (100%) rename src/{test => it}/resources/gawk/devfd.ok (100%) rename src/{test => it}/resources/gawk/devfd1.awk (100%) rename src/{test => it}/resources/gawk/devfd1.ok (100%) rename src/{test => it}/resources/gawk/devfd2.ok (100%) rename src/{test => it}/resources/gawk/dfacheck1.awk (100%) rename src/{test => it}/resources/gawk/dfacheck1.in (100%) rename src/{test => it}/resources/gawk/dfacheck1.ok (100%) rename src/{test => it}/resources/gawk/dfacheck2.awk (100%) rename src/{test => it}/resources/gawk/dfacheck2.in (100%) rename src/{test => it}/resources/gawk/dfacheck2.ok (100%) rename src/{test => it}/resources/gawk/dfamb1.awk (100%) rename src/{test => it}/resources/gawk/dfamb1.in (100%) rename src/{test => it}/resources/gawk/dfamb1.ok (100%) rename src/{test => it}/resources/gawk/dfastress.awk (100%) rename src/{test => it}/resources/gawk/dfastress.ok (100%) rename src/{test => it}/resources/gawk/divzero.awk (100%) rename src/{test => it}/resources/gawk/divzero.ok (100%) rename src/{test => it}/resources/gawk/divzero2.awk (100%) rename src/{test => it}/resources/gawk/divzero2.ok (100%) rename src/{test => it}/resources/gawk/double1.awk (100%) rename src/{test => it}/resources/gawk/double1.ok (100%) rename src/{test => it}/resources/gawk/double2.awk (100%) rename src/{test => it}/resources/gawk/double2.ok (100%) rename src/{test => it}/resources/gawk/dtdgport.awk (100%) rename src/{test => it}/resources/gawk/dumpvars.in (100%) rename src/{test => it}/resources/gawk/dumpvars.ok (100%) rename src/{test => it}/resources/gawk/dynlj.awk (100%) rename src/{test => it}/resources/gawk/dynlj.ok (100%) rename src/{test => it}/resources/gawk/elemnew1.awk (100%) rename src/{test/resources/gawk/eofsplit.ok => it/resources/gawk/elemnew1.ok} (100%) rename src/{test => it}/resources/gawk/elemnew2.awk (100%) rename src/{test => it}/resources/gawk/elemnew2.ok (100%) rename src/{test => it}/resources/gawk/elemnew3.awk (100%) rename src/{test => it}/resources/gawk/elemnew3.ok (100%) rename src/{test => it}/resources/gawk/eofsplit.awk (100%) rename src/{test/resources/gawk/exit2.ok => it/resources/gawk/eofsplit.ok} (100%) rename src/{test => it}/resources/gawk/eofsrc1.ok (100%) rename src/{test => it}/resources/gawk/eofsrc1a.awk (100%) rename src/{test => it}/resources/gawk/eofsrc1b.awk (100%) rename src/{test => it}/resources/gawk/errno.awk (100%) rename src/{test => it}/resources/gawk/errno.in (100%) rename src/{test => it}/resources/gawk/errno.ok (100%) rename src/{test => it}/resources/gawk/escapebrace.awk (100%) rename src/{test => it}/resources/gawk/escapebrace.in (100%) rename src/{test => it}/resources/gawk/escapebrace.ok (100%) rename src/{test => it}/resources/gawk/exit.ok (100%) rename src/{test => it}/resources/gawk/exit.sh (100%) rename src/{test => it}/resources/gawk/exit2.awk (100%) rename src/{test/resources/gawk/filefuncs.ok => it/resources/gawk/exit2.ok} (100%) rename src/{test => it}/resources/gawk/exitval1.awk (100%) rename src/{test => it}/resources/gawk/exitval1.ok (100%) rename src/{test => it}/resources/gawk/exitval2.awk (100%) rename src/{test => it}/resources/gawk/exitval2.ok (100%) rename src/{test => it}/resources/gawk/exitval2.w32 (100%) rename src/{test => it}/resources/gawk/exitval3.awk (100%) rename src/{test => it}/resources/gawk/exitval3.ok (100%) rename src/{test => it}/resources/gawk/fcall_exit.awk (100%) rename src/{test => it}/resources/gawk/fcall_exit.ok (100%) rename src/{test => it}/resources/gawk/fcall_exit2.awk (100%) rename src/{test => it}/resources/gawk/fcall_exit2.in (100%) rename src/{test => it}/resources/gawk/fcall_exit2.ok (100%) rename src/{test => it}/resources/gawk/fflush.ok (100%) rename src/{test => it}/resources/gawk/fflush.sh (100%) rename src/{test => it}/resources/gawk/fieldassign.awk (100%) rename src/{test => it}/resources/gawk/fieldassign.in (100%) rename src/{test => it}/resources/gawk/fieldassign.ok (100%) rename src/{test => it}/resources/gawk/fieldwdth.awk (100%) rename src/{test => it}/resources/gawk/fieldwdth.in (100%) rename src/{test => it}/resources/gawk/fieldwdth.ok (100%) rename src/{test => it}/resources/gawk/filefuncs.awk (100%) rename src/{test/resources/gawk/fmtspcl-mpfr.ok => it/resources/gawk/filefuncs.ok} (100%) create mode 100644 src/it/resources/gawk/fix-fmtspcl.awk rename src/{test => it}/resources/gawk/fldchg.awk (100%) rename src/{test => it}/resources/gawk/fldchg.in (100%) rename src/{test => it}/resources/gawk/fldchg.ok (100%) rename src/{test => it}/resources/gawk/fldchgnf.awk (100%) rename src/{test => it}/resources/gawk/fldchgnf.in (100%) rename src/{test => it}/resources/gawk/fldchgnf.ok (100%) rename src/{test => it}/resources/gawk/fldterm.awk (100%) rename src/{test => it}/resources/gawk/fldterm.in (100%) rename src/{test => it}/resources/gawk/fldterm.ok (100%) rename src/{test/resources/gawk/fordel.ok => it/resources/gawk/fmtspcl-mpfr.ok} (100%) rename src/{test => it}/resources/gawk/fmtspcl.awk (100%) rename src/{test => it}/resources/gawk/fmtspcl.tok (100%) rename src/{test => it}/resources/gawk/fmttest.awk (100%) rename src/{test => it}/resources/gawk/fmttest.ok (100%) rename src/{test => it}/resources/gawk/fnamedat.awk (100%) rename src/{test => it}/resources/gawk/fnamedat.in (100%) rename src/{test => it}/resources/gawk/fnamedat.ok (100%) rename src/{test => it}/resources/gawk/fnarray.awk (100%) rename src/{test => it}/resources/gawk/fnarray.ok (100%) rename src/{test => it}/resources/gawk/fnarray2.awk (100%) rename src/{test => it}/resources/gawk/fnarray2.in (100%) rename src/{test => it}/resources/gawk/fnarray2.ok (100%) rename src/{test => it}/resources/gawk/fnarydel-mpfr.ok (100%) rename src/{test => it}/resources/gawk/fnarydel.awk (100%) rename src/{test => it}/resources/gawk/fnarydel.ok (100%) rename src/{test => it}/resources/gawk/fnaryscl.awk (100%) rename src/{test => it}/resources/gawk/fnaryscl.ok (100%) rename src/{test => it}/resources/gawk/fnasgnm.awk (100%) rename src/{test => it}/resources/gawk/fnasgnm.in (100%) rename src/{test => it}/resources/gawk/fnasgnm.ok (100%) rename src/{test => it}/resources/gawk/fnmatch.awk (100%) rename src/{test => it}/resources/gawk/fnmatch.ok (100%) rename src/{test => it}/resources/gawk/fnmisc.awk (100%) rename src/{test => it}/resources/gawk/fnmisc.ok (100%) rename src/{test => it}/resources/gawk/fnparydl-mpfr.ok (100%) rename src/{test => it}/resources/gawk/fnparydl.awk (100%) rename src/{test => it}/resources/gawk/fnparydl.ok (100%) rename src/{test => it}/resources/gawk/forcenum.awk (100%) rename src/{test => it}/resources/gawk/forcenum.ok (100%) rename src/{test => it}/resources/gawk/fordel.awk (100%) rename src/{test/resources/gawk/fork.ok => it/resources/gawk/fordel.ok} (100%) rename src/{test => it}/resources/gawk/fork.awk (100%) rename src/{test/resources/gawk/fork2.ok => it/resources/gawk/fork.ok} (100%) rename src/{test => it}/resources/gawk/fork2.awk (100%) rename src/{test/resources/gawk/indirectcall3.ok => it/resources/gawk/fork2.ok} (100%) rename src/{test => it}/resources/gawk/forref.awk (100%) rename src/{test => it}/resources/gawk/forref.ok (100%) rename src/{test => it}/resources/gawk/forsimp.awk (100%) rename src/{test => it}/resources/gawk/forsimp.ok (100%) rename src/{test => it}/resources/gawk/fpat1.awk (100%) rename src/{test => it}/resources/gawk/fpat1.in (100%) rename src/{test => it}/resources/gawk/fpat1.ok (100%) rename src/{test => it}/resources/gawk/fpat2.awk (100%) rename src/{test => it}/resources/gawk/fpat2.ok (100%) rename src/{test => it}/resources/gawk/fpat3.awk (100%) rename src/{test => it}/resources/gawk/fpat3.in (100%) rename src/{test => it}/resources/gawk/fpat3.ok (100%) rename src/{test => it}/resources/gawk/fpat4.awk (100%) rename src/{test => it}/resources/gawk/fpat4.ok (100%) rename src/{test => it}/resources/gawk/fpat5.awk (100%) rename src/{test => it}/resources/gawk/fpat5.in (100%) rename src/{test => it}/resources/gawk/fpat5.ok (100%) rename src/{test => it}/resources/gawk/fpat6.awk (100%) rename src/{test => it}/resources/gawk/fpat6.in (100%) rename src/{test => it}/resources/gawk/fpat6.ok (100%) rename src/{test => it}/resources/gawk/fpat7.awk (100%) rename src/{test => it}/resources/gawk/fpat7.in (100%) rename src/{test => it}/resources/gawk/fpat7.ok (100%) rename src/{test => it}/resources/gawk/fpat8.awk (100%) rename src/{test => it}/resources/gawk/fpat8.in (100%) rename src/{test => it}/resources/gawk/fpat8.ok (100%) rename src/{test => it}/resources/gawk/fpat9.awk (100%) rename src/{test => it}/resources/gawk/fpat9.in (100%) rename src/{test => it}/resources/gawk/fpat9.ok (100%) rename src/{test => it}/resources/gawk/fpatnull.awk (100%) rename src/{test => it}/resources/gawk/fpatnull.in (100%) rename src/{test => it}/resources/gawk/fpatnull.ok (100%) create mode 100644 src/it/resources/gawk/fr/LC_MESSAGES/nlstringtest.mo rename src/{test => it}/resources/gawk/fsbs.awk (100%) rename src/{test => it}/resources/gawk/fsbs.in (100%) rename src/{test => it}/resources/gawk/fsbs.ok (100%) rename src/{test => it}/resources/gawk/fscaret.awk (100%) rename src/{test => it}/resources/gawk/fscaret.in (100%) rename src/{test => it}/resources/gawk/fscaret.ok (100%) rename src/{test => it}/resources/gawk/fsfwfs.awk (100%) rename src/{test => it}/resources/gawk/fsfwfs.in (100%) rename src/{test => it}/resources/gawk/fsfwfs.ok (100%) rename src/{test => it}/resources/gawk/fsnul1.awk (100%) rename src/{test => it}/resources/gawk/fsnul1.in (100%) rename src/{test => it}/resources/gawk/fsnul1.ok (100%) rename src/{test => it}/resources/gawk/fsrs.awk (100%) rename src/{test => it}/resources/gawk/fsrs.in (100%) rename src/{test => it}/resources/gawk/fsrs.ok (100%) rename src/{test => it}/resources/gawk/fsspcoln.awk (100%) rename src/{test => it}/resources/gawk/fsspcoln.in (100%) rename src/{test => it}/resources/gawk/fsspcoln.ok (100%) rename src/{test => it}/resources/gawk/fstabplus.awk (100%) rename src/{test => it}/resources/gawk/fstabplus.in (100%) rename src/{test => it}/resources/gawk/fstabplus.ok (100%) rename src/{test => it}/resources/gawk/fts.awk (100%) rename src/{test => it}/resources/gawk/functab1.awk (100%) rename src/{test => it}/resources/gawk/functab1.ok (100%) rename src/{test => it}/resources/gawk/functab2.awk (100%) rename src/{test => it}/resources/gawk/functab2.ok (100%) rename src/{test => it}/resources/gawk/functab3.awk (100%) rename src/{test => it}/resources/gawk/functab3.ok (100%) rename src/{test => it}/resources/gawk/functab4.awk (100%) rename src/{test => it}/resources/gawk/functab4.ok (100%) rename src/{test => it}/resources/gawk/functab5.awk (100%) rename src/{test => it}/resources/gawk/functab5.ok (100%) rename src/{test => it}/resources/gawk/functab6.awk (100%) rename src/{test => it}/resources/gawk/functab6.ok (100%) rename src/{test => it}/resources/gawk/funlen.awk (100%) rename src/{test => it}/resources/gawk/funlen.in (100%) rename src/{test => it}/resources/gawk/funlen.ok (100%) rename src/{test => it}/resources/gawk/funsemnl.awk (100%) rename src/{test => it}/resources/gawk/funsemnl.ok (100%) rename src/{test => it}/resources/gawk/funsmnam.awk (100%) rename src/{test => it}/resources/gawk/funsmnam.ok (100%) rename src/{test => it}/resources/gawk/funstack.awk (100%) rename src/{test => it}/resources/gawk/funstack.in (100%) rename src/{test => it}/resources/gawk/funstack.ok (100%) rename src/{test => it}/resources/gawk/fwtest.awk (100%) rename src/{test => it}/resources/gawk/fwtest.in (100%) rename src/{test => it}/resources/gawk/fwtest.ok (100%) rename src/{test => it}/resources/gawk/fwtest2.awk (100%) rename src/{test => it}/resources/gawk/fwtest2.in (100%) rename src/{test => it}/resources/gawk/fwtest2.ok (100%) rename src/{test => it}/resources/gawk/fwtest3.awk (100%) rename src/{test => it}/resources/gawk/fwtest3.in (100%) rename src/{test => it}/resources/gawk/fwtest3.ok (100%) rename src/{test => it}/resources/gawk/fwtest4.awk (100%) rename src/{test => it}/resources/gawk/fwtest4.in (100%) rename src/{test => it}/resources/gawk/fwtest4.ok (100%) rename src/{test => it}/resources/gawk/fwtest5.awk (100%) rename src/{test => it}/resources/gawk/fwtest5.in (100%) rename src/{test => it}/resources/gawk/fwtest5.ok (100%) rename src/{test => it}/resources/gawk/fwtest6.awk (100%) rename src/{test => it}/resources/gawk/fwtest6.in (100%) rename src/{test => it}/resources/gawk/fwtest6.ok (100%) rename src/{test => it}/resources/gawk/fwtest7.awk (100%) rename src/{test => it}/resources/gawk/fwtest7.in (100%) rename src/{test => it}/resources/gawk/fwtest7.ok (100%) rename src/{test => it}/resources/gawk/fwtest8.awk (100%) rename src/{test => it}/resources/gawk/fwtest8.in (100%) rename src/{test => it}/resources/gawk/fwtest8.ok (100%) create mode 100644 src/it/resources/gawk/genpot.awk create mode 100644 src/it/resources/gawk/genpot.ok rename src/{test => it}/resources/gawk/gensub.awk (100%) rename src/{test => it}/resources/gawk/gensub.in (100%) rename src/{test => it}/resources/gawk/gensub.ok (100%) rename src/{test => it}/resources/gawk/gensub2.awk (100%) rename src/{test => it}/resources/gawk/gensub2.ok (100%) rename src/{test => it}/resources/gawk/gensub3.awk (100%) rename src/{test => it}/resources/gawk/gensub3.in (100%) rename src/{test => it}/resources/gawk/gensub3.ok (100%) rename src/{test => it}/resources/gawk/gensub4.awk (100%) rename src/{test => it}/resources/gawk/gensub4.ok (100%) rename src/{test => it}/resources/gawk/getfile.awk (100%) rename src/{test => it}/resources/gawk/getfile.ok (100%) rename src/{test => it}/resources/gawk/getline.awk (100%) rename src/{test => it}/resources/gawk/getline.in (100%) rename src/{test => it}/resources/gawk/getline.ok (100%) rename src/{test => it}/resources/gawk/getline2.awk (100%) create mode 100644 src/it/resources/gawk/getline2.ok rename src/{test => it}/resources/gawk/getline3.awk (100%) rename src/{test => it}/resources/gawk/getline3.ok (100%) rename src/{test => it}/resources/gawk/getline4.awk (100%) rename src/{test => it}/resources/gawk/getline4.in (100%) rename src/{test => it}/resources/gawk/getline4.ok (100%) rename src/{test => it}/resources/gawk/getline5.awk (100%) rename src/{test => it}/resources/gawk/getline5.ok (100%) rename src/{test => it}/resources/gawk/getlnbuf.awk (100%) rename src/{test => it}/resources/gawk/getlnbuf.in (100%) rename src/{test => it}/resources/gawk/getlnbuf.ok (100%) rename src/{test => it}/resources/gawk/getlndir.awk (100%) rename src/{test => it}/resources/gawk/getlndir.ok (100%) rename src/{test => it}/resources/gawk/getlnfa.awk (100%) rename src/{test => it}/resources/gawk/getlnfa.ok (100%) rename src/{test => it}/resources/gawk/getlnhd.awk (100%) rename src/{test => it}/resources/gawk/getlnhd.ok (100%) rename src/{test => it}/resources/gawk/getnr2tb.awk (100%) rename src/{test => it}/resources/gawk/getnr2tb.in (100%) rename src/{test => it}/resources/gawk/getnr2tb.ok (100%) rename src/{test => it}/resources/gawk/getnr2tm.awk (100%) rename src/{test => it}/resources/gawk/getnr2tm.in (100%) rename src/{test => it}/resources/gawk/getnr2tm.ok (100%) rename src/{test => it}/resources/gawk/gnuops2.awk (100%) rename src/{test => it}/resources/gawk/gnuops2.ok (100%) rename src/{test => it}/resources/gawk/gnuops3.awk (100%) rename src/{test => it}/resources/gawk/gnuops3.ok (100%) rename src/{test => it}/resources/gawk/gnureops.awk (100%) rename src/{test => it}/resources/gawk/gnureops.ok (100%) rename src/{test => it}/resources/gawk/gsubasgn.awk (100%) rename src/{test => it}/resources/gawk/gsubasgn.ok (100%) rename src/{test => it}/resources/gawk/gsubind.awk (100%) rename src/{test => it}/resources/gawk/gsubind.ok (100%) rename src/{test => it}/resources/gawk/gsubtest.awk (100%) rename src/{test => it}/resources/gawk/gsubtest.ok (100%) rename src/{test => it}/resources/gawk/gsubtst2.awk (100%) rename src/{test => it}/resources/gawk/gsubtst2.ok (100%) rename src/{test => it}/resources/gawk/gsubtst3.awk (100%) rename src/{test => it}/resources/gawk/gsubtst3.in (100%) rename src/{test => it}/resources/gawk/gsubtst3.ok (100%) rename src/{test => it}/resources/gawk/gsubtst4.awk (100%) rename src/{test => it}/resources/gawk/gsubtst4.ok (100%) rename src/{test => it}/resources/gawk/gsubtst5.awk (100%) rename src/{test => it}/resources/gawk/gsubtst5.in (100%) rename src/{test => it}/resources/gawk/gsubtst5.ok (100%) rename src/{test => it}/resources/gawk/gsubtst6.awk (100%) rename src/{test => it}/resources/gawk/gsubtst6.ok (100%) rename src/{test => it}/resources/gawk/gsubtst7.awk (100%) rename src/{test => it}/resources/gawk/gsubtst7.in (100%) rename src/{test => it}/resources/gawk/gsubtst7.ok (100%) rename src/{test => it}/resources/gawk/gsubtst8.awk (100%) rename src/{test => it}/resources/gawk/gsubtst8.in (100%) rename src/{test => it}/resources/gawk/gsubtst8.ok (100%) rename src/{test => it}/resources/gawk/gtlnbufv.awk (100%) rename src/{test => it}/resources/gawk/hello.awk (100%) rename src/{test => it}/resources/gawk/hex.awk (100%) rename src/{test => it}/resources/gawk/hex.ok (100%) rename src/{test => it}/resources/gawk/hex2.awk (100%) rename src/{test => it}/resources/gawk/hex2.in (100%) rename src/{test => it}/resources/gawk/hex2.ok (100%) rename src/{test => it}/resources/gawk/hsprint.awk (100%) rename src/{test => it}/resources/gawk/hsprint.ok (100%) rename src/{test => it}/resources/gawk/icasefs.awk (100%) rename src/{test => it}/resources/gawk/icasefs.ok (100%) rename src/{test => it}/resources/gawk/icasers.awk (100%) rename src/{test => it}/resources/gawk/icasers.in (100%) rename src/{test => it}/resources/gawk/icasers.ok (100%) rename src/{test => it}/resources/gawk/id.awk (100%) rename src/{test => it}/resources/gawk/id.ok (100%) rename src/{test => it}/resources/gawk/igncdym.awk (100%) rename src/{test => it}/resources/gawk/igncdym.in (100%) rename src/{test => it}/resources/gawk/igncdym.ok (100%) rename src/{test => it}/resources/gawk/igncfs.awk (100%) rename src/{test => it}/resources/gawk/igncfs.in (100%) rename src/{test => it}/resources/gawk/igncfs.ok (100%) rename src/{test => it}/resources/gawk/ignrcas2.awk (100%) rename src/{test => it}/resources/gawk/ignrcas2.ok (100%) rename src/{test => it}/resources/gawk/ignrcas3.awk (100%) rename src/{test => it}/resources/gawk/ignrcas3.ok (100%) rename src/{test => it}/resources/gawk/ignrcas4.awk (100%) rename src/{test => it}/resources/gawk/ignrcas4.ok (100%) rename src/{test => it}/resources/gawk/ignrcase.awk (100%) rename src/{test => it}/resources/gawk/ignrcase.in (100%) rename src/{test => it}/resources/gawk/ignrcase.ok (100%) rename src/{test => it}/resources/gawk/incdupe.ok (100%) rename src/{test => it}/resources/gawk/incdupe2.ok (100%) rename src/{test => it}/resources/gawk/incdupe3.ok (100%) rename src/{test => it}/resources/gawk/incdupe4.ok (100%) rename src/{test => it}/resources/gawk/incdupe5.ok (100%) rename src/{test => it}/resources/gawk/incdupe6.ok (100%) rename src/{test => it}/resources/gawk/incdupe7.ok (100%) rename src/{test => it}/resources/gawk/inchello.awk (100%) rename src/{test => it}/resources/gawk/inclib.awk (100%) rename src/{test => it}/resources/gawk/include.awk (100%) rename src/{test => it}/resources/gawk/include.ok (100%) rename src/{test => it}/resources/gawk/include2.ok (100%) rename src/{test => it}/resources/gawk/indirectbuiltin.awk (100%) rename src/{test => it}/resources/gawk/indirectbuiltin.ok (100%) rename src/{test => it}/resources/gawk/indirectbuiltin2.awk (100%) rename src/{test => it}/resources/gawk/indirectbuiltin2.ok (100%) rename src/{test => it}/resources/gawk/indirectcall.awk (100%) rename src/{test => it}/resources/gawk/indirectcall.in (100%) rename src/{test => it}/resources/gawk/indirectcall.ok (100%) rename src/{test => it}/resources/gawk/indirectcall2.awk (100%) rename src/{test => it}/resources/gawk/indirectcall2.ok (100%) rename src/{test => it}/resources/gawk/indirectcall3.awk (100%) rename src/{test/resources/gawk/intarray.ok => it/resources/gawk/indirectcall3.ok} (100%) rename src/{test => it}/resources/gawk/inf-nan-torture.awk (100%) rename src/{test => it}/resources/gawk/inf-nan-torture.in (100%) rename src/{test => it}/resources/gawk/inf-nan-torture.ok (100%) rename src/{test => it}/resources/gawk/inftest.awk (100%) rename src/{test => it}/resources/gawk/inftest.ok (100%) rename src/{test => it}/resources/gawk/inplace.1.in (100%) rename src/{test => it}/resources/gawk/inplace.2.in (100%) rename src/{test => it}/resources/gawk/inplace.in (100%) rename src/{test => it}/resources/gawk/inplace1.1.ok (100%) rename src/{test => it}/resources/gawk/inplace1.2.ok (100%) rename src/{test => it}/resources/gawk/inplace1.ok (100%) rename src/{test => it}/resources/gawk/inplace2.1.bak.ok (100%) rename src/{test => it}/resources/gawk/inplace2.1.ok (100%) rename src/{test => it}/resources/gawk/inplace2.2.bak.ok (100%) rename src/{test => it}/resources/gawk/inplace2.2.ok (100%) rename src/{test => it}/resources/gawk/inplace2.ok (100%) rename src/{test => it}/resources/gawk/inplace2bcomp.1.ok (100%) rename src/{test => it}/resources/gawk/inplace2bcomp.1.orig.ok (100%) rename src/{test => it}/resources/gawk/inplace2bcomp.2.ok (100%) rename src/{test => it}/resources/gawk/inplace2bcomp.2.orig.ok (100%) rename src/{test => it}/resources/gawk/inplace2bcomp.ok (100%) rename src/{test => it}/resources/gawk/inplace3.1.bak.ok (100%) rename src/{test => it}/resources/gawk/inplace3.1.ok (100%) rename src/{test => it}/resources/gawk/inplace3.2.bak.ok (100%) rename src/{test => it}/resources/gawk/inplace3.2.ok (100%) rename src/{test => it}/resources/gawk/inplace3.ok (100%) rename src/{test => it}/resources/gawk/inplace3bcomp.1.ok (100%) rename src/{test => it}/resources/gawk/inplace3bcomp.1.orig.ok (100%) rename src/{test => it}/resources/gawk/inplace3bcomp.2.ok (100%) rename src/{test => it}/resources/gawk/inplace3bcomp.2.orig.ok (100%) rename src/{test => it}/resources/gawk/inplace3bcomp.ok (100%) rename src/{test => it}/resources/gawk/inpref.awk (100%) rename src/{test => it}/resources/gawk/inpref.in (100%) rename src/{test => it}/resources/gawk/inpref.ok (100%) rename src/{test => it}/resources/gawk/inputred.awk (100%) rename src/{test => it}/resources/gawk/inputred.ok (100%) rename src/{test => it}/resources/gawk/intarray.awk (100%) rename src/{test/resources/gawk/iobug1.ok => it/resources/gawk/intarray.ok} (100%) rename src/{test => it}/resources/gawk/intest.awk (100%) rename src/{test => it}/resources/gawk/intest.ok (100%) rename src/{test => it}/resources/gawk/intformat.awk (100%) rename src/{test => it}/resources/gawk/intformat.ok (100%) rename src/{test => it}/resources/gawk/intprec.awk (100%) rename src/{test => it}/resources/gawk/intprec.ok (100%) rename src/{test => it}/resources/gawk/iobug1.awk (100%) rename src/{test/resources/gawk/mdim5.ok => it/resources/gawk/iobug1.ok} (100%) rename src/{test => it}/resources/gawk/iolint.awk (100%) rename src/{test => it}/resources/gawk/iolint.ok (100%) rename src/{test => it}/resources/gawk/isarrayunset.awk (100%) rename src/{test => it}/resources/gawk/isarrayunset.ok (100%) rename src/{test => it}/resources/gawk/jarebug.awk (100%) rename src/{test => it}/resources/gawk/jarebug.in (100%) rename src/{test => it}/resources/gawk/jarebug.ok (100%) rename src/{test => it}/resources/gawk/jarebug.sh (100%) rename src/{test => it}/resources/gawk/lc_num1.awk (100%) rename src/{test => it}/resources/gawk/lc_num1.ok (100%) rename src/{test => it}/resources/gawk/leaddig.awk (100%) rename src/{test => it}/resources/gawk/leaddig.ok (100%) rename src/{test => it}/resources/gawk/leadnl.awk (100%) rename src/{test => it}/resources/gawk/leadnl.in (100%) rename src/{test => it}/resources/gawk/leadnl.ok (100%) create mode 100644 src/it/resources/gawk/lib/awkpath.awk rename src/{test => it}/resources/gawk/lint.awk (100%) rename src/{test => it}/resources/gawk/lint.ok (100%) rename src/{test => it}/resources/gawk/lintexp.awk (100%) rename src/{test => it}/resources/gawk/lintexp.ok (100%) rename src/{test => it}/resources/gawk/lintindex.awk (100%) rename src/{test => it}/resources/gawk/lintindex.ok (100%) rename src/{test => it}/resources/gawk/lintint.awk (100%) rename src/{test => it}/resources/gawk/lintint.ok (100%) rename src/{test => it}/resources/gawk/lintlength.awk (100%) rename src/{test => it}/resources/gawk/lintlength.ok (100%) rename src/{test => it}/resources/gawk/lintold.awk (100%) rename src/{test => it}/resources/gawk/lintold.in (100%) rename src/{test => it}/resources/gawk/lintold.ok (100%) rename src/{test => it}/resources/gawk/lintplus.awk (100%) rename src/{test => it}/resources/gawk/lintplus.ok (100%) rename src/{test => it}/resources/gawk/lintset.awk (100%) rename src/{test => it}/resources/gawk/lintset.ok (100%) rename src/{test => it}/resources/gawk/lintwarn.awk (100%) rename src/{test => it}/resources/gawk/lintwarn.ok (100%) rename src/{test => it}/resources/gawk/litoct.awk (100%) rename src/{test => it}/resources/gawk/litoct.in (100%) rename src/{test => it}/resources/gawk/litoct.ok (100%) rename src/{test => it}/resources/gawk/localenl.ok (100%) rename src/{test => it}/resources/gawk/localenl.sh (100%) rename src/{test => it}/resources/gawk/longsub.awk (100%) rename src/{test => it}/resources/gawk/longsub.in (100%) rename src/{test => it}/resources/gawk/longsub.ok (100%) rename src/{test => it}/resources/gawk/longwrds.awk (100%) rename src/{test => it}/resources/gawk/longwrds.in (100%) rename src/{test => it}/resources/gawk/longwrds.ok (100%) rename src/{test => it}/resources/gawk/makepmafile.c (100%) rename src/{test => it}/resources/gawk/manglprm.awk (100%) rename src/{test => it}/resources/gawk/manglprm.in (100%) rename src/{test => it}/resources/gawk/manglprm.ok (100%) create mode 100644 src/it/resources/gawk/manyfiles.awk rename src/{test => it}/resources/gawk/manyfiles.ok (100%) rename src/{test => it}/resources/gawk/match1.awk (100%) rename src/{test => it}/resources/gawk/match1.ok (100%) rename src/{test => it}/resources/gawk/match2.awk (100%) rename src/{test => it}/resources/gawk/match2.ok (100%) rename src/{test => it}/resources/gawk/match3.awk (100%) rename src/{test => it}/resources/gawk/match3.in (100%) rename src/{test => it}/resources/gawk/match3.ok (100%) rename src/{test => it}/resources/gawk/math.awk (100%) rename src/{test => it}/resources/gawk/math.ok (100%) rename src/{test => it}/resources/gawk/mbfw1.awk (100%) rename src/{test => it}/resources/gawk/mbfw1.in (100%) rename src/{test => it}/resources/gawk/mbfw1.ok (100%) rename src/{test => it}/resources/gawk/mbprintf1.awk (100%) rename src/{test => it}/resources/gawk/mbprintf1.in (100%) rename src/{test => it}/resources/gawk/mbprintf1.ok (100%) rename src/{test => it}/resources/gawk/mbprintf2.awk (100%) rename src/{test => it}/resources/gawk/mbprintf2.ok (100%) rename src/{test => it}/resources/gawk/mbprintf3.awk (100%) rename src/{test => it}/resources/gawk/mbprintf3.in (100%) rename src/{test => it}/resources/gawk/mbprintf3.ok (100%) rename src/{test => it}/resources/gawk/mbprintf4.awk (100%) rename src/{test => it}/resources/gawk/mbprintf4.in (100%) rename src/{test => it}/resources/gawk/mbprintf4.ok (100%) rename src/{test => it}/resources/gawk/mbprintf5.awk (100%) rename src/{test => it}/resources/gawk/mbprintf5.in (100%) rename src/{test => it}/resources/gawk/mbprintf5.ok (100%) rename src/{test => it}/resources/gawk/mbstr1.awk (100%) rename src/{test => it}/resources/gawk/mbstr1.ok (100%) rename src/{test => it}/resources/gawk/mbstr2.awk (100%) rename src/{test => it}/resources/gawk/mbstr2.in (100%) rename src/{test => it}/resources/gawk/mbstr2.ok (100%) rename src/{test => it}/resources/gawk/mdim1.awk (100%) rename src/{test => it}/resources/gawk/mdim1.ok (100%) rename src/{test => it}/resources/gawk/mdim2.awk (100%) rename src/{test => it}/resources/gawk/mdim2.ok (100%) rename src/{test => it}/resources/gawk/mdim3.awk (100%) rename src/{test => it}/resources/gawk/mdim3.ok (100%) rename src/{test => it}/resources/gawk/mdim4.awk (100%) rename src/{test => it}/resources/gawk/mdim4.in (100%) rename src/{test => it}/resources/gawk/mdim4.ok (100%) rename src/{test => it}/resources/gawk/mdim5.awk (100%) rename src/{test/resources/gawk/mdim7.ok => it/resources/gawk/mdim5.ok} (100%) rename src/{test => it}/resources/gawk/mdim6.awk (100%) rename src/{test => it}/resources/gawk/mdim6.ok (100%) rename src/{test => it}/resources/gawk/mdim7.awk (100%) rename src/{test/resources/gawk/membug1.ok => it/resources/gawk/mdim7.ok} (100%) rename src/{test => it}/resources/gawk/mdim8.awk (100%) rename src/{test => it}/resources/gawk/mdim8.in (100%) rename src/{test => it}/resources/gawk/mdim8.ok (100%) rename src/{test => it}/resources/gawk/membug1.awk (100%) rename src/{test => it}/resources/gawk/membug1.in (100%) rename src/{test/resources/gawk/nfldstr.ok => it/resources/gawk/membug1.ok} (100%) rename src/{test => it}/resources/gawk/memleak.awk (100%) rename src/{test => it}/resources/gawk/memleak.ok (100%) rename src/{test => it}/resources/gawk/messages.awk (100%) rename src/{test => it}/resources/gawk/minusstr.awk (100%) rename src/{test => it}/resources/gawk/minusstr.ok (100%) rename src/{test => it}/resources/gawk/mixed1.ok (100%) rename src/{test => it}/resources/gawk/mktime.awk (100%) rename src/{test => it}/resources/gawk/mktime.in (100%) rename src/{test => it}/resources/gawk/mktime.ok (100%) rename src/{test => it}/resources/gawk/mmap8k.awk (100%) rename src/{test => it}/resources/gawk/mmap8k.in (100%) rename src/{test => it}/resources/gawk/mmap8k.ok (100%) rename src/{test => it}/resources/gawk/modifiers.ok (100%) rename src/{test => it}/resources/gawk/modifiers.sh (100%) rename src/{test => it}/resources/gawk/mpfranswer42.awk (100%) rename src/{test => it}/resources/gawk/mpfranswer42.ok (100%) rename src/{test => it}/resources/gawk/mpfrbigint.awk (100%) rename src/{test => it}/resources/gawk/mpfrbigint.ok (100%) rename src/{test => it}/resources/gawk/mpfrbigint2.awk (100%) rename src/{test => it}/resources/gawk/mpfrbigint2.in (100%) rename src/{test => it}/resources/gawk/mpfrbigint2.ok (100%) rename src/{test => it}/resources/gawk/mpfrcase.awk (100%) rename src/{test => it}/resources/gawk/mpfrcase.in (100%) rename src/{test => it}/resources/gawk/mpfrcase.ok (100%) rename src/{test => it}/resources/gawk/mpfrcase2.awk (100%) rename src/{test => it}/resources/gawk/mpfrcase2.in (100%) rename src/{test => it}/resources/gawk/mpfrcase2.ok (100%) rename src/{test => it}/resources/gawk/mpfrexprange.awk (100%) rename src/{test => it}/resources/gawk/mpfrexprange.ok (100%) rename src/{test => it}/resources/gawk/mpfrfield.awk (100%) rename src/{test => it}/resources/gawk/mpfrfield.in (100%) rename src/{test => it}/resources/gawk/mpfrfield.ok (100%) rename src/{test => it}/resources/gawk/mpfrieee.awk (100%) rename src/{test => it}/resources/gawk/mpfrieee.ok (100%) rename src/{test => it}/resources/gawk/mpfrmemok1.awk (100%) rename src/{test => it}/resources/gawk/mpfrmemok1.ok (100%) rename src/{test => it}/resources/gawk/mpfrnegzero.awk (100%) rename src/{test => it}/resources/gawk/mpfrnegzero.ok (100%) rename src/{test => it}/resources/gawk/mpfrnegzero2.awk (100%) rename src/{test => it}/resources/gawk/mpfrnegzero2.ok (100%) rename src/{test => it}/resources/gawk/mpfrnonum.awk (100%) rename src/{test => it}/resources/gawk/mpfrnonum.in (100%) rename src/{test => it}/resources/gawk/mpfrnonum.ok (100%) rename src/{test => it}/resources/gawk/mpfrnr.awk (100%) rename src/{test => it}/resources/gawk/mpfrnr.in (100%) rename src/{test => it}/resources/gawk/mpfrnr.ok (100%) rename src/{test => it}/resources/gawk/mpfrrem.awk (100%) rename src/{test => it}/resources/gawk/mpfrrem.ok (100%) rename src/{test => it}/resources/gawk/mpfrrnd.awk (100%) rename src/{test => it}/resources/gawk/mpfrrnd.ok (100%) rename src/{test => it}/resources/gawk/mpfrrndeval.awk (100%) rename src/{test => it}/resources/gawk/mpfrrndeval.ok (100%) rename src/{test => it}/resources/gawk/mpfrsort.awk (100%) rename src/{test => it}/resources/gawk/mpfrsort.ok (100%) rename src/{test => it}/resources/gawk/mpfrsqrt.awk (100%) rename src/{test => it}/resources/gawk/mpfrsqrt.ok (100%) rename src/{test => it}/resources/gawk/mpfrstrtonum.awk (100%) rename src/{test => it}/resources/gawk/mpfrstrtonum.ok (100%) rename src/{test => it}/resources/gawk/mpfruplus.ok (100%) rename src/{test => it}/resources/gawk/mpgforcenum.awk (100%) rename src/{test => it}/resources/gawk/mpgforcenum.ok (100%) rename src/{test => it}/resources/gawk/mtchi18n.awk (100%) rename src/{test => it}/resources/gawk/mtchi18n.in (100%) rename src/{test => it}/resources/gawk/mtchi18n.ok (100%) rename src/{test => it}/resources/gawk/muldimposix.awk (100%) rename src/{test => it}/resources/gawk/muldimposix.ok (100%) rename src/{test => it}/resources/gawk/nasty.awk (100%) rename src/{test => it}/resources/gawk/nasty.ok (100%) rename src/{test => it}/resources/gawk/nasty2.awk (100%) rename src/{test => it}/resources/gawk/nasty2.ok (100%) rename src/{test => it}/resources/gawk/nastyparm.awk (100%) rename src/{test => it}/resources/gawk/nastyparm.ok (100%) rename src/{test => it}/resources/gawk/negexp.awk (100%) rename src/{test => it}/resources/gawk/negexp.ok (100%) rename src/{test => it}/resources/gawk/negrange.awk (100%) rename src/{test => it}/resources/gawk/negrange.ok (100%) rename src/{test => it}/resources/gawk/negtime.awk (100%) rename src/{test => it}/resources/gawk/negtime.ok (100%) rename src/{test => it}/resources/gawk/nested.awk (100%) rename src/{test => it}/resources/gawk/nested.in (100%) rename src/{test => it}/resources/gawk/nested.ok (100%) rename src/{test => it}/resources/gawk/next.ok (100%) rename src/{test => it}/resources/gawk/next.sh (100%) rename src/{test => it}/resources/gawk/nfldstr.awk (100%) rename src/{test => it}/resources/gawk/nfldstr.in (100%) rename src/{test/resources/gawk/noloop1.ok => it/resources/gawk/nfldstr.ok} (100%) rename src/{test => it}/resources/gawk/nfloop.awk (100%) rename src/{test => it}/resources/gawk/nfloop.ok (100%) rename src/{test => it}/resources/gawk/nfneg.awk (100%) rename src/{test => it}/resources/gawk/nfneg.ok (100%) rename src/{test => it}/resources/gawk/nfset.awk (100%) rename src/{test => it}/resources/gawk/nfset.in (100%) rename src/{test => it}/resources/gawk/nfset.ok (100%) rename src/{test => it}/resources/gawk/nlfldsep.awk (100%) rename src/{test => it}/resources/gawk/nlfldsep.in (100%) rename src/{test => it}/resources/gawk/nlfldsep.ok (100%) rename src/{test => it}/resources/gawk/nlinstr.awk (100%) rename src/{test => it}/resources/gawk/nlinstr.in (100%) rename src/{test => it}/resources/gawk/nlinstr.ok (100%) rename src/{test => it}/resources/gawk/nlstrina.awk (100%) rename src/{test => it}/resources/gawk/nlstrina.ok (100%) rename src/{test => it}/resources/gawk/nlstringtest-nogettext.ok (100%) rename src/{test => it}/resources/gawk/nlstringtest.awk (100%) rename src/{test => it}/resources/gawk/nlstringtest.ok (100%) rename src/{test => it}/resources/gawk/nlstringtest.po (100%) rename src/{test => it}/resources/gawk/noeffect.awk (100%) rename src/{test => it}/resources/gawk/noeffect.ok (100%) rename src/{test => it}/resources/gawk/nofile.ok (100%) rename src/{test => it}/resources/gawk/nofmtch.awk (100%) rename src/{test => it}/resources/gawk/nofmtch.ok (100%) rename src/{test => it}/resources/gawk/noloop1.awk (100%) rename src/{test => it}/resources/gawk/noloop1.in (100%) rename src/{test/resources/gawk/noloop2.ok => it/resources/gawk/noloop1.ok} (100%) rename src/{test => it}/resources/gawk/noloop2.awk (100%) rename src/{test => it}/resources/gawk/noloop2.in (100%) rename src/{test/resources/gawk/nsawk1a.ok => it/resources/gawk/noloop2.ok} (100%) rename src/{test => it}/resources/gawk/nondec.awk (100%) rename src/{test => it}/resources/gawk/nondec.ok (100%) rename src/{test => it}/resources/gawk/nondec2.awk (100%) rename src/{test => it}/resources/gawk/nondec2.ok (100%) rename src/{test => it}/resources/gawk/nonfatal1.awk (100%) rename src/{test => it}/resources/gawk/nonfatal1.ok (100%) rename src/{test => it}/resources/gawk/nonfatal2.awk (100%) rename src/{test => it}/resources/gawk/nonfatal2.ok (100%) rename src/{test => it}/resources/gawk/nonfatal3.awk (100%) rename src/{test => it}/resources/gawk/nonfatal3.ok (100%) rename src/{test => it}/resources/gawk/nonl.awk (100%) rename src/{test => it}/resources/gawk/nonl.in (100%) rename src/{test => it}/resources/gawk/nonl.ok (100%) rename src/{test => it}/resources/gawk/noparms.awk (100%) rename src/{test => it}/resources/gawk/noparms.ok (100%) rename src/{test => it}/resources/gawk/nors.in (100%) rename src/{test => it}/resources/gawk/nors.ok (100%) rename src/{test => it}/resources/gawk/nsawk1.awk (100%) rename src/{test/resources/gawk/nsawk1b.ok => it/resources/gawk/nsawk1a.ok} (100%) rename src/{test/resources/gawk/nsawk1c.ok => it/resources/gawk/nsawk1b.ok} (100%) rename src/{test/resources/gawk/onlynl.ok => it/resources/gawk/nsawk1c.ok} (100%) rename src/{test => it}/resources/gawk/nsawk2.awk (100%) rename src/{test => it}/resources/gawk/nsawk2a.ok (100%) rename src/{test => it}/resources/gawk/nsawk2b.ok (100%) rename src/{test => it}/resources/gawk/nsbad.awk (100%) rename src/{test => it}/resources/gawk/nsbad.ok (100%) rename src/{test => it}/resources/gawk/nsbad2.awk (100%) rename src/{test => it}/resources/gawk/nsbad2.ok (100%) rename src/{test => it}/resources/gawk/nsbad3.awk (100%) rename src/{test => it}/resources/gawk/nsbad3.ok (100%) rename src/{test => it}/resources/gawk/nsbad_cmd.ok (100%) rename src/{test => it}/resources/gawk/nsforloop.awk (100%) rename src/{test => it}/resources/gawk/nsforloop.ok (100%) rename src/{test => it}/resources/gawk/nsfuncrecurse.awk (100%) rename src/{test => it}/resources/gawk/nsfuncrecurse.ok (100%) rename src/{test => it}/resources/gawk/nsidentifier.awk (100%) rename src/{test => it}/resources/gawk/nsidentifier.ok (100%) rename src/{test => it}/resources/gawk/nsindirect1.awk (100%) rename src/{test => it}/resources/gawk/nsindirect1.ok (100%) rename src/{test => it}/resources/gawk/nsindirect2.awk (100%) rename src/{test => it}/resources/gawk/nsindirect2.ok (100%) rename src/{test => it}/resources/gawk/nsprof1.awk (100%) rename src/{test => it}/resources/gawk/nsprof1.ok (100%) rename src/{test => it}/resources/gawk/nsprof2.awk (100%) rename src/{test => it}/resources/gawk/nsprof2.ok (100%) rename src/{test => it}/resources/gawk/nulinsrc.awk (100%) rename src/{test => it}/resources/gawk/nulinsrc.ok (100%) rename src/{test => it}/resources/gawk/nulrsend.awk (100%) rename src/{test => it}/resources/gawk/nulrsend.in (100%) rename src/{test => it}/resources/gawk/nulrsend.ok (100%) rename src/{test => it}/resources/gawk/numindex.awk (100%) rename src/{test => it}/resources/gawk/numindex.in (100%) rename src/{test => it}/resources/gawk/numindex.ok (100%) rename src/{test => it}/resources/gawk/numrange-mpfr.ok (100%) rename src/{test => it}/resources/gawk/numrange.awk (100%) rename src/{test => it}/resources/gawk/numrange.ok (100%) rename src/{test => it}/resources/gawk/numstr1.awk (100%) rename src/{test => it}/resources/gawk/numstr1.ok (100%) rename src/{test => it}/resources/gawk/numsubstr.awk (100%) rename src/{test => it}/resources/gawk/numsubstr.in (100%) rename src/{test => it}/resources/gawk/numsubstr.ok (100%) rename src/{test => it}/resources/gawk/octdec.awk (100%) rename src/{test => it}/resources/gawk/octdec.ok (100%) rename src/{test => it}/resources/gawk/octsub.awk (100%) rename src/{test => it}/resources/gawk/octsub.ok (100%) rename src/{test => it}/resources/gawk/ofmt.awk (100%) rename src/{test => it}/resources/gawk/ofmt.in (100%) rename src/{test => it}/resources/gawk/ofmt.ok (100%) rename src/{test => it}/resources/gawk/ofmta.awk (100%) rename src/{test => it}/resources/gawk/ofmta.ok (100%) rename src/{test => it}/resources/gawk/ofmtbig.awk (100%) rename src/{test => it}/resources/gawk/ofmtbig.in (100%) rename src/{test => it}/resources/gawk/ofmtbig.ok (100%) rename src/{test => it}/resources/gawk/ofmtfidl.awk (100%) rename src/{test => it}/resources/gawk/ofmtfidl.in (100%) rename src/{test => it}/resources/gawk/ofmtfidl.ok (100%) rename src/{test => it}/resources/gawk/ofmts.awk (100%) rename src/{test => it}/resources/gawk/ofmts.in (100%) rename src/{test => it}/resources/gawk/ofmts.ok (100%) rename src/{test => it}/resources/gawk/ofmtstrnum.awk (100%) rename src/{test => it}/resources/gawk/ofmtstrnum.ok (100%) rename src/{test => it}/resources/gawk/ofs1.awk (100%) rename src/{test => it}/resources/gawk/ofs1.in (100%) rename src/{test => it}/resources/gawk/ofs1.ok (100%) rename src/{test => it}/resources/gawk/onlynl.awk (100%) rename src/{test => it}/resources/gawk/onlynl.in (100%) rename src/{test/resources/gawk/prmreuse.ok => it/resources/gawk/onlynl.ok} (100%) rename src/{test => it}/resources/gawk/opasnidx.awk (100%) rename src/{test => it}/resources/gawk/opasnidx.ok (100%) rename src/{test => it}/resources/gawk/opasnslf.awk (100%) rename src/{test => it}/resources/gawk/opasnslf.ok (100%) rename src/{test => it}/resources/gawk/ordchr.awk (100%) rename src/{test => it}/resources/gawk/ordchr.ok (100%) rename src/{test => it}/resources/gawk/ordchr2.ok (100%) rename src/{test => it}/resources/gawk/out1.ok (100%) rename src/{test => it}/resources/gawk/out2.ok (100%) rename src/{test => it}/resources/gawk/out3.ok (100%) rename src/{test => it}/resources/gawk/paramasfunc1.awk (100%) rename src/{test => it}/resources/gawk/paramasfunc1.ok (100%) rename src/{test => it}/resources/gawk/paramasfunc2.awk (100%) rename src/{test => it}/resources/gawk/paramasfunc2.ok (100%) rename src/{test => it}/resources/gawk/paramdup.awk (100%) rename src/{test => it}/resources/gawk/paramdup.ok (100%) rename src/{test => it}/resources/gawk/paramres.awk (100%) rename src/{test => it}/resources/gawk/paramres.ok (100%) rename src/{test => it}/resources/gawk/paramtyp.awk (100%) rename src/{test => it}/resources/gawk/paramtyp.ok (100%) rename src/{test => it}/resources/gawk/paramuninitglobal.awk (100%) rename src/{test => it}/resources/gawk/paramuninitglobal.ok (100%) rename src/{test => it}/resources/gawk/parse1.awk (100%) rename src/{test => it}/resources/gawk/parse1.in (100%) rename src/{test => it}/resources/gawk/parse1.ok (100%) rename src/{test => it}/resources/gawk/parsefld.awk (100%) rename src/{test => it}/resources/gawk/parsefld.in (100%) rename src/{test => it}/resources/gawk/parsefld.ok (100%) rename src/{test => it}/resources/gawk/parseme.awk (100%) rename src/{test => it}/resources/gawk/parseme.ok (100%) rename src/{test => it}/resources/gawk/patsplit.awk (100%) rename src/{test => it}/resources/gawk/patsplit.ok (100%) rename src/{test => it}/resources/gawk/pcntplus.awk (100%) rename src/{test => it}/resources/gawk/pcntplus.ok (100%) rename src/{test => it}/resources/gawk/pid.awk (100%) rename src/{test => it}/resources/gawk/pid.ok (100%) rename src/{test => it}/resources/gawk/pid.sh (100%) rename src/{test => it}/resources/gawk/pipeio1.awk (100%) rename src/{test => it}/resources/gawk/pipeio1.ok (100%) rename src/{test => it}/resources/gawk/pipeio2.awk (100%) rename src/{test => it}/resources/gawk/pipeio2.in (100%) rename src/{test => it}/resources/gawk/pipeio2.ok (100%) rename src/{test => it}/resources/gawk/pma.ok (100%) rename src/{test => it}/resources/gawk/posix.awk (100%) rename src/{test => it}/resources/gawk/posix.in (100%) rename src/{test => it}/resources/gawk/posix.ok (100%) rename src/{test => it}/resources/gawk/posix2008sub.awk (100%) rename src/{test => it}/resources/gawk/posix2008sub.ok (100%) rename src/{test => it}/resources/gawk/posix_compare.awk (100%) rename src/{test => it}/resources/gawk/posix_compare.ok (100%) create mode 100644 src/it/resources/gawk/poundbang.awk rename src/{test => it}/resources/gawk/prdupval.awk (100%) rename src/{test => it}/resources/gawk/prdupval.in (100%) rename src/{test => it}/resources/gawk/prdupval.ok (100%) rename src/{test => it}/resources/gawk/prec.awk (100%) rename src/{test => it}/resources/gawk/prec.ok (100%) rename src/{test => it}/resources/gawk/printf0.awk (100%) rename src/{test => it}/resources/gawk/printf0.ok (100%) rename src/{test => it}/resources/gawk/printf1.awk (100%) rename src/{test => it}/resources/gawk/printf1.ok (100%) rename src/{test => it}/resources/gawk/printfbad1.awk (100%) rename src/{test => it}/resources/gawk/printfbad1.ok (100%) rename src/{test => it}/resources/gawk/printfbad2.awk (100%) rename src/{test => it}/resources/gawk/printfbad2.in (100%) rename src/{test => it}/resources/gawk/printfbad2.ok (100%) rename src/{test => it}/resources/gawk/printfbad3.awk (100%) rename src/{test => it}/resources/gawk/printfbad3.ok (100%) rename src/{test => it}/resources/gawk/printfbad4.awk (100%) rename src/{test => it}/resources/gawk/printfbad4.ok (100%) rename src/{test => it}/resources/gawk/printfchar.awk (100%) rename src/{test => it}/resources/gawk/printfchar.ok (100%) rename src/{test => it}/resources/gawk/printfloat.awk (100%) rename src/{test => it}/resources/gawk/printhuge.awk (100%) rename src/{test => it}/resources/gawk/printhuge.ok (100%) rename src/{test => it}/resources/gawk/printlang.awk (100%) rename src/{test => it}/resources/gawk/prmarscl.awk (100%) rename src/{test => it}/resources/gawk/prmarscl.ok (100%) rename src/{test => it}/resources/gawk/prmreuse.awk (100%) rename src/{test/resources/gawk/regexpbrack.in => it/resources/gawk/prmreuse.ok} (100%) rename src/{test => it}/resources/gawk/procinfs.awk (100%) rename src/{test => it}/resources/gawk/procinfs.ok (100%) create mode 100644 src/it/resources/gawk/profile0.awk create mode 100644 src/it/resources/gawk/profile0.in create mode 100644 src/it/resources/gawk/profile0.ok create mode 100644 src/it/resources/gawk/profile10.awk create mode 100644 src/it/resources/gawk/profile10.ok create mode 100644 src/it/resources/gawk/profile11.awk create mode 100644 src/it/resources/gawk/profile11.ok create mode 100644 src/it/resources/gawk/profile12.awk create mode 100644 src/it/resources/gawk/profile12.in create mode 100644 src/it/resources/gawk/profile12.ok create mode 100644 src/it/resources/gawk/profile13.awk create mode 100644 src/it/resources/gawk/profile13.ok create mode 100644 src/it/resources/gawk/profile14.awk create mode 100644 src/it/resources/gawk/profile14.ok create mode 100644 src/it/resources/gawk/profile15.awk create mode 100644 src/it/resources/gawk/profile15.ok create mode 100644 src/it/resources/gawk/profile16.awk create mode 100644 src/it/resources/gawk/profile16.ok create mode 100644 src/it/resources/gawk/profile17.awk create mode 100644 src/it/resources/gawk/profile17.ok create mode 100644 src/it/resources/gawk/profile2.ok create mode 100644 src/it/resources/gawk/profile3.awk create mode 100644 src/it/resources/gawk/profile3.ok create mode 100644 src/it/resources/gawk/profile4.awk create mode 100644 src/it/resources/gawk/profile4.ok create mode 100644 src/it/resources/gawk/profile5.awk create mode 100644 src/it/resources/gawk/profile5.ok create mode 100644 src/it/resources/gawk/profile6.awk create mode 100644 src/it/resources/gawk/profile6.ok create mode 100644 src/it/resources/gawk/profile7.awk create mode 100644 src/it/resources/gawk/profile7.ok create mode 100644 src/it/resources/gawk/profile8.awk create mode 100644 src/it/resources/gawk/profile8.ok create mode 100644 src/it/resources/gawk/profile9.awk create mode 100644 src/it/resources/gawk/profile9.ok rename src/{test => it}/resources/gawk/prt1eval.awk (100%) rename src/{test => it}/resources/gawk/prt1eval.ok (100%) rename src/{test => it}/resources/gawk/prtoeval.awk (100%) rename src/{test => it}/resources/gawk/prtoeval.ok (100%) rename src/{test => it}/resources/gawk/pty1.awk (100%) rename src/{test => it}/resources/gawk/pty1.ok (100%) rename src/{test => it}/resources/gawk/pty2.awk (100%) rename src/{test => it}/resources/gawk/pty2.ok (100%) create mode 100644 src/it/resources/gawk/rand-mpfr.ok create mode 100644 src/it/resources/gawk/rand-mpfr1.ok rename src/{test => it}/resources/gawk/rand.awk (100%) rename src/{test => it}/resources/gawk/rand.ok (100%) rename src/{test/resources/gawk/regexpbrack.ok => it/resources/gawk/randtest.ok} (100%) create mode 100644 src/it/resources/gawk/randtest.sh rename src/{test => it}/resources/gawk/range1.awk (100%) rename src/{test => it}/resources/gawk/range1.in (100%) rename src/{test => it}/resources/gawk/range1.ok (100%) rename src/{test => it}/resources/gawk/range2.awk (100%) rename src/{test => it}/resources/gawk/range2.ok (100%) rename src/{test => it}/resources/gawk/readall.ok (100%) rename src/{test => it}/resources/gawk/readall1.awk (100%) rename src/{test => it}/resources/gawk/readall2.awk (100%) rename src/{test => it}/resources/gawk/readbuf.awk (100%) rename src/{test => it}/resources/gawk/readbuf.ok (100%) create mode 100644 src/it/resources/gawk/readdir.awk create mode 100644 src/it/resources/gawk/readdir0.awk create mode 100644 src/it/resources/gawk/readdir_retest.awk rename src/{test => it}/resources/gawk/readfile2.awk (100%) rename src/{test => it}/resources/gawk/readfile2.ok (100%) rename src/{test => it}/resources/gawk/rebrackloc.awk (100%) rename src/{test => it}/resources/gawk/rebrackloc.in (100%) rename src/{test => it}/resources/gawk/rebrackloc.ok (100%) rename src/{test => it}/resources/gawk/rebt8b1.awk (100%) rename src/{test => it}/resources/gawk/rebt8b1.ok (100%) rename src/{test => it}/resources/gawk/rebt8b2.awk (100%) rename src/{test => it}/resources/gawk/rebt8b2.ok (100%) rename src/{test => it}/resources/gawk/rebuf.awk (100%) rename src/{test => it}/resources/gawk/rebuf.in (100%) rename src/{test => it}/resources/gawk/rebuf.ok (100%) rename src/{test => it}/resources/gawk/rebuild.awk (100%) rename src/{test => it}/resources/gawk/rebuild.in (100%) rename src/{test => it}/resources/gawk/rebuild.ok (100%) rename src/{test => it}/resources/gawk/redfilnm.awk (100%) rename src/{test => it}/resources/gawk/redfilnm.in (100%) rename src/{test => it}/resources/gawk/redfilnm.ok (100%) create mode 100644 src/it/resources/gawk/reg/Obsolete/exp.awk create mode 100644 src/it/resources/gawk/reg/Obsolete/exp.good rename src/{test/resources/gawk/rri1.ok => it/resources/gawk/reg/Obsolete/exp.in} (100%) create mode 100644 src/it/resources/gawk/reg/Obsolete/log.awk create mode 100644 src/it/resources/gawk/reg/Obsolete/log.good rename src/{test/resources/gawk/rstest3.ok => it/resources/gawk/reg/Obsolete/log.in} (100%) create mode 100644 src/it/resources/gawk/reg/exp-eq.awk create mode 100644 src/it/resources/gawk/reg/exp-eq.good create mode 100644 src/it/resources/gawk/reg/exp-eq.in create mode 100644 src/it/resources/gawk/reg/func.awk create mode 100644 src/it/resources/gawk/reg/func.good rename src/{test/resources/gawk/stupid2.ok => it/resources/gawk/reg/func.in} (100%) create mode 100644 src/it/resources/gawk/reg/func2.awk create mode 100644 src/it/resources/gawk/reg/func2.good rename src/{test/resources/gawk/switch2.ok => it/resources/gawk/reg/func2.in} (100%) rename src/{test => it}/resources/gawk/regeq.awk (100%) rename src/{test => it}/resources/gawk/regeq.in (100%) rename src/{test => it}/resources/gawk/regeq.ok (100%) rename src/{test => it}/resources/gawk/regex3minus.awk (100%) rename src/{test => it}/resources/gawk/regex3minus.ok (100%) rename src/{test => it}/resources/gawk/regexpbad.awk (100%) rename src/{test => it}/resources/gawk/regexpbad.ok (100%) rename src/{test => it}/resources/gawk/regexpbrack.awk (100%) rename src/{test/resources/gawk/tradanch.ok => it/resources/gawk/regexpbrack.in} (100%) create mode 100644 src/it/resources/gawk/regexpbrack.ok rename src/{test => it}/resources/gawk/regexpbrack2.awk (100%) rename src/{test => it}/resources/gawk/regexpbrack2.in (100%) rename src/{test => it}/resources/gawk/regexpbrack2.ok (100%) rename src/{test => it}/resources/gawk/regexprange.awk (100%) rename src/{test => it}/resources/gawk/regexprange.ok (100%) rename src/{test => it}/resources/gawk/regexsub.awk (100%) rename src/{test => it}/resources/gawk/regexsub.ok (100%) rename src/{test => it}/resources/gawk/reginttrad.awk (100%) rename src/{test => it}/resources/gawk/reginttrad.ok (100%) rename src/{test => it}/resources/gawk/regnul1.awk (100%) rename src/{test => it}/resources/gawk/regnul1.ok (100%) rename src/{test => it}/resources/gawk/regnul2.awk (100%) rename src/{test => it}/resources/gawk/regnul2.ok (100%) rename src/{test => it}/resources/gawk/regrange.awk (100%) rename src/{test => it}/resources/gawk/regrange.ok (100%) rename src/{test => it}/resources/gawk/regtest.sh (100%) rename src/{test => it}/resources/gawk/regx8bit.awk (100%) rename src/{test => it}/resources/gawk/regx8bit.ok (100%) rename src/{test => it}/resources/gawk/reindops.awk (100%) rename src/{test => it}/resources/gawk/reindops.in (100%) rename src/{test => it}/resources/gawk/reindops.ok (100%) rename src/{test => it}/resources/gawk/reint.awk (100%) rename src/{test => it}/resources/gawk/reint.in (100%) rename src/{test => it}/resources/gawk/reint.ok (100%) rename src/{test => it}/resources/gawk/reint2.awk (100%) rename src/{test => it}/resources/gawk/reint2.in (100%) rename src/{test => it}/resources/gawk/reint2.ok (100%) rename src/{test => it}/resources/gawk/reparse.awk (100%) rename src/{test => it}/resources/gawk/reparse.in (100%) rename src/{test => it}/resources/gawk/reparse.ok (100%) rename src/{test => it}/resources/gawk/resplit.awk (100%) rename src/{test => it}/resources/gawk/resplit.in (100%) rename src/{test => it}/resources/gawk/resplit.ok (100%) rename src/{test => it}/resources/gawk/revout.awk (100%) rename src/{test => it}/resources/gawk/revout.ok (100%) rename src/{test => it}/resources/gawk/revtwoway.awk (100%) rename src/{test => it}/resources/gawk/revtwoway.ok (100%) rename src/{test => it}/resources/gawk/rri1.awk (100%) rename src/{test => it}/resources/gawk/rri1.in (100%) create mode 100644 src/it/resources/gawk/rri1.ok rename src/{test => it}/resources/gawk/rs.awk (100%) rename src/{test => it}/resources/gawk/rs.in (100%) rename src/{test => it}/resources/gawk/rs.ok (100%) rename src/{test => it}/resources/gawk/rscompat.awk (100%) rename src/{test => it}/resources/gawk/rscompat.in (100%) rename src/{test => it}/resources/gawk/rscompat.ok (100%) rename src/{test => it}/resources/gawk/rsgetline.awk (100%) rename src/{test => it}/resources/gawk/rsgetline.in (100%) rename src/{test => it}/resources/gawk/rsgetline.ok (100%) rename src/{test => it}/resources/gawk/rsglstdin.ok (100%) rename src/{test => it}/resources/gawk/rsnul1nl.awk (100%) rename src/{test => it}/resources/gawk/rsnul1nl.in (100%) rename src/{test => it}/resources/gawk/rsnul1nl.ok (100%) rename src/{test => it}/resources/gawk/rsnulbig.ok (100%) rename src/{test => it}/resources/gawk/rsnulbig2.ok (100%) rename src/{test => it}/resources/gawk/rsnullre.awk (74%) rename src/{test => it}/resources/gawk/rsnullre.in (100%) rename src/{test => it}/resources/gawk/rsnullre.ok (100%) rename src/{test => it}/resources/gawk/rsnulw.awk (100%) rename src/{test => it}/resources/gawk/rsnulw.in (100%) rename src/{test => it}/resources/gawk/rsnulw.ok (100%) rename src/{test => it}/resources/gawk/rsstart1.awk (100%) rename src/{test => it}/resources/gawk/rsstart1.in (100%) rename src/{test => it}/resources/gawk/rsstart1.ok (100%) rename src/{test => it}/resources/gawk/rsstart2.awk (100%) rename src/{test => it}/resources/gawk/rsstart2.in (100%) rename src/{test => it}/resources/gawk/rsstart2.ok (100%) rename src/{test => it}/resources/gawk/rsstart3.ok (100%) rename src/{test => it}/resources/gawk/rstest1.awk (100%) rename src/{test => it}/resources/gawk/rstest1.ok (100%) rename src/{test => it}/resources/gawk/rstest2.awk (100%) rename src/{test => it}/resources/gawk/rstest2.ok (100%) rename src/{test => it}/resources/gawk/rstest3.awk (100%) create mode 100644 src/it/resources/gawk/rstest3.ok rename src/{test => it}/resources/gawk/rstest4.awk (100%) rename src/{test => it}/resources/gawk/rstest4.ok (100%) rename src/{test => it}/resources/gawk/rstest5.awk (100%) rename src/{test => it}/resources/gawk/rstest5.ok (100%) rename src/{test => it}/resources/gawk/rstest6.awk (100%) rename src/{test => it}/resources/gawk/rstest6.in (100%) rename src/{test => it}/resources/gawk/rstest6.ok (100%) rename src/{test => it}/resources/gawk/rswhite.awk (100%) rename src/{test => it}/resources/gawk/rswhite.in (100%) rename src/{test => it}/resources/gawk/rswhite.ok (100%) rename src/{test => it}/resources/gawk/rtlen.ok (100%) rename src/{test => it}/resources/gawk/rtlen.sh (100%) rename src/{test => it}/resources/gawk/rtlen01.ok (100%) rename src/{test => it}/resources/gawk/rtlen01.sh (100%) rename src/{test => it}/resources/gawk/rtlenmb.ok (100%) rename src/{test => it}/resources/gawk/rwarray.awk (100%) rename src/{test => it}/resources/gawk/rwarray.in (100%) rename src/{test => it}/resources/gawk/rwarray.ok (100%) rename src/{test => it}/resources/gawk/sandbox1.awk (100%) rename src/{test => it}/resources/gawk/sandbox1.ok (100%) rename src/{test => it}/resources/gawk/scalar.awk (100%) rename src/{test => it}/resources/gawk/scalar.ok (100%) rename src/{test => it}/resources/gawk/sclforin.awk (100%) rename src/{test => it}/resources/gawk/sclforin.ok (100%) rename src/{test => it}/resources/gawk/sclifin.awk (100%) rename src/{test => it}/resources/gawk/sclifin.ok (100%) rename src/{test => it}/resources/gawk/setrec0.awk (100%) rename src/{test => it}/resources/gawk/setrec0.in (100%) rename src/{test => it}/resources/gawk/setrec0.ok (100%) rename src/{test => it}/resources/gawk/setrec1.awk (100%) rename src/{test => it}/resources/gawk/setrec1.ok (100%) rename src/{test => it}/resources/gawk/shadow.awk (100%) rename src/{test => it}/resources/gawk/shadow.ok (100%) rename src/{test => it}/resources/gawk/shadowbuiltin.awk (100%) rename src/{test => it}/resources/gawk/shadowbuiltin.ok (100%) rename src/{test => it}/resources/gawk/sigpipe1.awk (100%) rename src/{test => it}/resources/gawk/sigpipe1.ok (100%) create mode 100644 src/it/resources/gawk/skips.properties rename src/{test => it}/resources/gawk/sort1.awk (100%) rename src/{test => it}/resources/gawk/sort1.ok (100%) rename src/{test => it}/resources/gawk/sortempty.awk (100%) rename src/{test => it}/resources/gawk/sortempty.ok (100%) rename src/{test => it}/resources/gawk/sortfor.awk (100%) rename src/{test => it}/resources/gawk/sortfor.in (100%) rename src/{test => it}/resources/gawk/sortfor.ok (100%) rename src/{test => it}/resources/gawk/sortfor2.awk (100%) rename src/{test => it}/resources/gawk/sortfor2.in (100%) rename src/{test => it}/resources/gawk/sortfor2.ok (100%) rename src/{test => it}/resources/gawk/sortglos.awk (100%) rename src/{test => it}/resources/gawk/sortglos.in (100%) rename src/{test => it}/resources/gawk/sortglos.ok (100%) rename src/{test => it}/resources/gawk/sortu.awk (100%) rename src/{test => it}/resources/gawk/sortu.ok (100%) rename src/{test => it}/resources/gawk/sourcesplit.ok (100%) rename src/{test => it}/resources/gawk/space.ok (100%) rename src/{test => it}/resources/gawk/spacere.awk (100%) rename src/{test => it}/resources/gawk/spacere.ok (100%) rename src/{test => it}/resources/gawk/split_after_fpat.awk (100%) rename src/{test => it}/resources/gawk/split_after_fpat.in (100%) rename src/{test => it}/resources/gawk/split_after_fpat.ok (100%) rename src/{test => it}/resources/gawk/splitarg4.awk (100%) rename src/{test => it}/resources/gawk/splitarg4.in (100%) rename src/{test => it}/resources/gawk/splitarg4.ok (100%) rename src/{test => it}/resources/gawk/splitargv.awk (100%) rename src/{test => it}/resources/gawk/splitargv.in (100%) rename src/{test => it}/resources/gawk/splitargv.ok (100%) rename src/{test => it}/resources/gawk/splitarr.awk (100%) rename src/{test => it}/resources/gawk/splitarr.ok (100%) rename src/{test => it}/resources/gawk/splitdef.awk (100%) rename src/{test => it}/resources/gawk/splitdef.ok (100%) rename src/{test => it}/resources/gawk/splitvar.awk (100%) rename src/{test => it}/resources/gawk/splitvar.in (100%) rename src/{test => it}/resources/gawk/splitvar.ok (100%) rename src/{test => it}/resources/gawk/splitwht.awk (100%) rename src/{test => it}/resources/gawk/splitwht.ok (100%) rename src/{test => it}/resources/gawk/sprintfc.awk (100%) rename src/{test => it}/resources/gawk/sprintfc.in (100%) rename src/{test => it}/resources/gawk/sprintfc.ok (100%) rename src/{test => it}/resources/gawk/status-close.awk (100%) rename src/{test => it}/resources/gawk/status-close.ok (100%) rename src/{test => it}/resources/gawk/strcat1.awk (100%) rename src/{test => it}/resources/gawk/strcat1.ok (100%) rename src/{test => it}/resources/gawk/strfieldnum.awk (100%) rename src/{test => it}/resources/gawk/strfieldnum.in (100%) rename src/{test => it}/resources/gawk/strfieldnum.ok (100%) rename src/{test => it}/resources/gawk/strftfld.awk (100%) rename src/{test => it}/resources/gawk/strftfld.in (100%) rename src/{test => it}/resources/gawk/strftfld.ok (100%) rename src/{test => it}/resources/gawk/strftime.awk (100%) rename src/{test => it}/resources/gawk/strftlng.awk (100%) rename src/{test => it}/resources/gawk/strftlng.ok (100%) rename src/{test => it}/resources/gawk/strnum1.awk (100%) rename src/{test => it}/resources/gawk/strnum1.ok (100%) rename src/{test => it}/resources/gawk/strnum2.awk (100%) rename src/{test => it}/resources/gawk/strnum2.ok (100%) rename src/{test => it}/resources/gawk/strtod.awk (100%) rename src/{test => it}/resources/gawk/strtod.in (100%) rename src/{test => it}/resources/gawk/strtod.ok (100%) rename src/{test => it}/resources/gawk/strtonum.awk (100%) rename src/{test => it}/resources/gawk/strtonum.ok (100%) rename src/{test => it}/resources/gawk/strtonum1.awk (100%) rename src/{test => it}/resources/gawk/strtonum1.ok (100%) rename src/{test => it}/resources/gawk/stupid1.awk (100%) rename src/{test => it}/resources/gawk/stupid1.ok (100%) rename src/{test => it}/resources/gawk/stupid2.awk (100%) create mode 100644 src/it/resources/gawk/stupid2.ok rename src/{test => it}/resources/gawk/stupid3.awk (100%) rename src/{test => it}/resources/gawk/stupid3.ok (100%) rename src/{test => it}/resources/gawk/stupid4.awk (100%) rename src/{test => it}/resources/gawk/stupid4.ok (100%) rename src/{test => it}/resources/gawk/stupid5.awk (100%) rename src/{test => it}/resources/gawk/stupid5.ok (100%) rename src/{test => it}/resources/gawk/subamp.awk (100%) rename src/{test => it}/resources/gawk/subamp.in (100%) rename src/{test => it}/resources/gawk/subamp.ok (100%) rename src/{test => it}/resources/gawk/subback.awk (100%) rename src/{test => it}/resources/gawk/subback.in (100%) rename src/{test => it}/resources/gawk/subback.ok (100%) rename src/{test => it}/resources/gawk/subi18n.awk (100%) rename src/{test => it}/resources/gawk/subi18n.ok (100%) rename src/{test => it}/resources/gawk/subsepnm.awk (100%) rename src/{test => it}/resources/gawk/subsepnm.ok (100%) rename src/{test => it}/resources/gawk/subslash.awk (100%) rename src/{test => it}/resources/gawk/subslash.ok (100%) rename src/{test => it}/resources/gawk/substr.awk (100%) rename src/{test => it}/resources/gawk/substr.ok (100%) rename src/{test => it}/resources/gawk/swaplns.awk (100%) rename src/{test => it}/resources/gawk/swaplns.in (100%) rename src/{test => it}/resources/gawk/swaplns.ok (100%) rename src/{test => it}/resources/gawk/switch2.awk (100%) create mode 100644 src/it/resources/gawk/switch2.ok rename src/{test => it}/resources/gawk/symtab1.awk (100%) rename src/{test => it}/resources/gawk/symtab1.ok (100%) rename src/{test => it}/resources/gawk/symtab10.awk (100%) rename src/{test => it}/resources/gawk/symtab10.ok (100%) rename src/{test => it}/resources/gawk/symtab11.awk (100%) rename src/{test => it}/resources/gawk/symtab11.ok (100%) rename src/{test => it}/resources/gawk/symtab12.awk (100%) rename src/{test => it}/resources/gawk/symtab12.ok (100%) rename src/{test => it}/resources/gawk/symtab2.awk (100%) rename src/{test => it}/resources/gawk/symtab2.ok (100%) rename src/{test => it}/resources/gawk/symtab3.awk (100%) rename src/{test => it}/resources/gawk/symtab3.ok (100%) rename src/{test => it}/resources/gawk/symtab4.awk (100%) rename src/{test => it}/resources/gawk/symtab4.in (100%) rename src/{test => it}/resources/gawk/symtab4.ok (100%) rename src/{test => it}/resources/gawk/symtab5.awk (100%) rename src/{test => it}/resources/gawk/symtab5.in (100%) rename src/{test => it}/resources/gawk/symtab5.ok (100%) rename src/{test => it}/resources/gawk/symtab6.awk (100%) rename src/{test => it}/resources/gawk/symtab6.ok (100%) rename src/{test => it}/resources/gawk/symtab7.awk (100%) rename src/{test => it}/resources/gawk/symtab7.in (100%) rename src/{test => it}/resources/gawk/symtab7.ok (100%) rename src/{test => it}/resources/gawk/symtab8.awk (100%) rename src/{test => it}/resources/gawk/symtab8.in (100%) rename src/{test => it}/resources/gawk/symtab8.ok (100%) rename src/{test => it}/resources/gawk/symtab9.awk (100%) rename src/{test => it}/resources/gawk/symtab9.ok (100%) rename src/{test => it}/resources/gawk/synerr1.awk (100%) rename src/{test => it}/resources/gawk/synerr1.ok (100%) rename src/{test => it}/resources/gawk/synerr2.awk (100%) rename src/{test => it}/resources/gawk/synerr2.ok (100%) rename src/{test => it}/resources/gawk/synerr3.awk (100%) rename src/{test => it}/resources/gawk/synerr3.ok (100%) rename src/{test => it}/resources/gawk/tailrecurse.awk (100%) rename src/{test => it}/resources/gawk/tailrecurse.ok (100%) rename src/{test => it}/resources/gawk/testext-mpfr.ok (100%) rename src/{test => it}/resources/gawk/testext.ok (100%) rename src/{test => it}/resources/gawk/time.awk (100%) rename src/{test => it}/resources/gawk/time.ok (100%) rename src/{test => it}/resources/gawk/timeout.awk (100%) rename src/{test => it}/resources/gawk/timeout.ok (100%) rename src/{test => it}/resources/gawk/tradanch.awk (100%) rename src/{test => it}/resources/gawk/tradanch.in (100%) create mode 100644 src/it/resources/gawk/tradanch.ok rename src/{test => it}/resources/gawk/trailbs.awk (100%) rename src/{test => it}/resources/gawk/trailbs.in (100%) rename src/{test => it}/resources/gawk/trailbs.ok (100%) rename src/{test => it}/resources/gawk/tweakfld.awk (99%) rename src/{test => it}/resources/gawk/tweakfld.in (100%) rename src/{test => it}/resources/gawk/tweakfld.ok (100%) rename src/{test => it}/resources/gawk/typedregex1.awk (100%) rename src/{test => it}/resources/gawk/typedregex1.ok (100%) rename src/{test => it}/resources/gawk/typedregex2.awk (100%) rename src/{test => it}/resources/gawk/typedregex2.ok (100%) rename src/{test => it}/resources/gawk/typedregex3.awk (100%) rename src/{test => it}/resources/gawk/typedregex3.ok (100%) rename src/{test => it}/resources/gawk/typedregex4.awk (100%) rename src/{test => it}/resources/gawk/typedregex4.ok (100%) rename src/{test => it}/resources/gawk/typedregex5.awk (100%) rename src/{test => it}/resources/gawk/typedregex5.in (100%) rename src/{test => it}/resources/gawk/typedregex5.ok (100%) rename src/{test => it}/resources/gawk/typedregex6.awk (100%) rename src/{test => it}/resources/gawk/typedregex6.in (100%) rename src/{test => it}/resources/gawk/typedregex6.ok (100%) rename src/{test => it}/resources/gawk/typeof1.awk (100%) rename src/{test => it}/resources/gawk/typeof1.ok (100%) rename src/{test => it}/resources/gawk/typeof2.awk (100%) rename src/{test => it}/resources/gawk/typeof2.ok (100%) rename src/{test => it}/resources/gawk/typeof3.awk (100%) rename src/{test => it}/resources/gawk/typeof3.ok (100%) rename src/{test => it}/resources/gawk/typeof4.awk (100%) rename src/{test => it}/resources/gawk/typeof4.ok (100%) rename src/{test => it}/resources/gawk/typeof5.awk (100%) rename src/{test => it}/resources/gawk/typeof5.in (100%) rename src/{test => it}/resources/gawk/typeof5.ok (100%) rename src/{test => it}/resources/gawk/typeof6.awk (100%) rename src/{test => it}/resources/gawk/typeof6.ok (100%) rename src/{test => it}/resources/gawk/unicode1.awk (100%) rename src/{test => it}/resources/gawk/unicode1.ok (100%) rename src/{test => it}/resources/gawk/uninit2.awk (100%) rename src/{test => it}/resources/gawk/uninit2.ok (100%) rename src/{test => it}/resources/gawk/uninit3.awk (100%) rename src/{test => it}/resources/gawk/uninit3.ok (100%) rename src/{test => it}/resources/gawk/uninit4.awk (100%) rename src/{test => it}/resources/gawk/uninit4.ok (100%) rename src/{test => it}/resources/gawk/uninit5.awk (100%) rename src/{test => it}/resources/gawk/uninit5.ok (100%) rename src/{test => it}/resources/gawk/uninitialized.awk (100%) rename src/{test => it}/resources/gawk/uninitialized.ok (100%) create mode 100644 src/it/resources/gawk/unterm.awk create mode 100644 src/it/resources/gawk/unterm.ok rename src/{test => it}/resources/gawk/uparrfs.awk (100%) rename src/{test => it}/resources/gawk/uparrfs.in (100%) rename src/{test => it}/resources/gawk/uparrfs.ok (100%) rename src/{test => it}/resources/gawk/uplus.awk (100%) rename src/{test => it}/resources/gawk/uplus.ok (100%) create mode 100644 src/it/resources/gawk/valgrind.awk rename src/{test => it}/resources/gawk/watchpoint1.awk (100%) rename src/{test => it}/resources/gawk/watchpoint1.in (100%) rename src/{test => it}/resources/gawk/watchpoint1.ok (100%) rename src/{test => it}/resources/gawk/watchpoint1.script (100%) rename src/{test => it}/resources/gawk/wideidx.awk (100%) rename src/{test => it}/resources/gawk/wideidx.in (100%) rename src/{test => it}/resources/gawk/wideidx.ok (100%) rename src/{test => it}/resources/gawk/wideidx2.awk (100%) rename src/{test => it}/resources/gawk/wideidx2.ok (100%) rename src/{test => it}/resources/gawk/widesub.awk (100%) rename src/{test => it}/resources/gawk/widesub.ok (100%) rename src/{test => it}/resources/gawk/widesub2.awk (100%) rename src/{test => it}/resources/gawk/widesub2.ok (100%) rename src/{test => it}/resources/gawk/widesub3.awk (100%) rename src/{test => it}/resources/gawk/widesub3.in (100%) rename src/{test => it}/resources/gawk/widesub3.ok (100%) rename src/{test => it}/resources/gawk/widesub4.awk (100%) rename src/{test => it}/resources/gawk/widesub4.ok (100%) rename src/{test => it}/resources/gawk/wjposer1.awk (100%) rename src/{test => it}/resources/gawk/wjposer1.in (100%) rename src/{test => it}/resources/gawk/wjposer1.ok (100%) create mode 100644 src/it/resources/gawk/xref.awk create mode 100644 src/it/resources/gawk/xref.original rename src/{test => it}/resources/gawk/zero2.awk (100%) rename src/{test => it}/resources/gawk/zero2.ok (100%) rename src/{test => it}/resources/gawk/zeroe0.awk (100%) rename src/{test => it}/resources/gawk/zeroe0.ok (100%) rename src/{test => it}/resources/gawk/zeroflag.awk (100%) rename src/{test => it}/resources/gawk/zeroflag.ok (100%) create mode 100644 src/test/java/io/jawk/GawkMaketestsParserTest.java delete mode 100644 src/test/java/io/jawk/GawkTest.java delete mode 100644 src/test/resources/gawk/dtdgport.in delete mode 100644 src/test/resources/gawk/dtdgport.ok delete mode 100644 src/test/resources/gawk/getline2.in1 delete mode 100644 src/test/resources/gawk/getline2.in2 delete mode 100644 src/test/resources/gawk/getline2.ok delete mode 100644 src/test/resources/gawk/gtlnbufv.in delete mode 100644 src/test/resources/gawk/manyfiles.awk delete mode 100644 src/test/resources/gawk/manyfiles.in delete mode 100644 src/test/resources/gawk/unterm.awk delete mode 100644 src/test/resources/gawk/unterm.ok diff --git a/pom.xml b/pom.xml index 241455c3..8c4cefb2 100644 --- a/pom.xml +++ b/pom.xml @@ -110,6 +110,40 @@ + + org.codehaus.mojo + build-helper-maven-plugin + 3.6.0 + + + add-compatibility-test-source + generate-test-sources + + add-test-source + + + + ${project.basedir}/src/it/java + + + + + add-compatibility-test-resources + generate-test-resources + + add-test-resource + + + + + ${project.basedir}/src/it/resources + + + + + + + net.revelc.code.formatter @@ -127,6 +161,7 @@ ${project.build.sourceDirectory} ${project.build.testSourceDirectory} + ${project.basedir}/src/it/java **/*.java @@ -144,6 +179,7 @@ main/java/**/*.java test/java/**/*.java + it/java/**/*.java @@ -167,32 +203,26 @@ maven-surefire-plugin - - - **/*GawkTest.java - **/BwkPTest.java - **/BwkTTest.java - **/BwkMiscTest.java - - ${project.build.directory}/surefire-workingdir - + + ${project.build.directory}/surefire-workingdir + maven-failsafe-plugin - - **/BwkPTest.java - **/BwkTTest.java - **/BwkMiscTest.java - **/GawkTest.java - + + **/*IT.java + true ${project.build.directory}/failsafe-workingdir + + true + integration-test verify diff --git a/src/test/java/io/jawk/BwkMiscTest.java b/src/it/java/io/jawk/BwkMiscIT.java similarity index 73% rename from src/test/java/io/jawk/BwkMiscTest.java rename to src/it/java/io/jawk/BwkMiscIT.java index 21b50d85..a3fbbc88 100644 --- a/src/test/java/io/jawk/BwkMiscTest.java +++ b/src/it/java/io/jawk/BwkMiscIT.java @@ -22,13 +22,9 @@ * ╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱ */ -import static org.junit.Assert.*; - import java.io.File; import java.io.IOException; import java.net.URL; -import java.nio.charset.StandardCharsets; -import java.nio.file.Files; import java.util.Arrays; import java.util.stream.Collectors; import org.junit.AfterClass; @@ -40,40 +36,41 @@ import org.junit.runners.Parameterized.Parameters; /** - * Test Suite based on unit and non-regression tests from bwk. Each AWK script - * in the src/test/resources/bwk.t/t.scripts directory will be executed against - * the corresponding *.in input, and its output will be compared to the - * corresponding *.ok file. + * Integration suite based on BWK miscellaneous compatibility tests. Each AWK + * script in the BWK compatibility resources executes against its corresponding + * input file and its output is compared with the recorded result. * * @see One True Awk */ @RunWith(Parameterized.class) -public class BwkMiscTest { +public class BwkMiscIT { private static final String BWK_MISC_PATH = "/bwk/misc"; private static File bwkMiscDirectory; private static File scriptsDirectory; /** - * Initialization of the tests + * Initializes the BWK miscellaneous integration suite. * - * @throws Exception + * @throws Exception when resource discovery fails */ @BeforeClass public static void beforeAll() throws Exception {} /** - * @return the list of awk scripts in /src/test/resources/gawk - * @throws Exception + * Returns the BWK miscellaneous script names discovered from the + * integration-test resources. + * + * @return the parameter values for this suite + * @throws Exception when resource discovery fails */ @Parameters(name = "BWK.misc {0}") public static Iterable awkList() throws Exception { - // Get the /bwk resource directory - URL bwkTUrl = BwkTTest.class.getResource(BWK_MISC_PATH); - if (bwkTUrl == null) { + URL bwkMiscUrl = BwkMiscIT.class.getResource(BWK_MISC_PATH); + if (bwkMiscUrl == null) { throw new IOException("Couldn't find resource " + BWK_MISC_PATH); } - bwkMiscDirectory = new File(bwkTUrl.toURI()); + bwkMiscDirectory = new File(bwkMiscUrl.toURI()); if (!bwkMiscDirectory.isDirectory()) { throw new IOException(BWK_MISC_PATH + " is not a directory"); } @@ -84,30 +81,26 @@ public static Iterable awkList() throws Exception { return Arrays .stream(scriptsDirectory.listFiles()) - .filter(sf -> sf.getName().endsWith(".awk")) + .filter(scriptFile -> scriptFile.getName().endsWith(".awk")) .map(File::getName) .collect(Collectors.toList()); } - /** Path to the AWK test script to execute */ + /** Path to the AWK test script to execute. */ @Parameter public String awkName; /** - * Execute the AWK script stored in {@link #awkName} + * Executes one BWK miscellaneous script and compares its output with the + * expected result. * - * @throws Exception + * @throws Exception when the test setup or execution fails unexpectedly */ @Test public void test() throws Exception { - // Get the AWK script file File awkFile = new File(scriptsDirectory, awkName); String shortName = awkName.substring(0, awkName.length() - 4); - - // Get the input file (always the same) File inputFile = new File(bwkMiscDirectory, "inputs/" + shortName + ".in"); - - // Get the file with the expected result File okFile = new File(bwkMiscDirectory, "results/" + shortName + ".ok"); AwkTestSupport @@ -120,10 +113,9 @@ public void test() throws Exception { } /** - * Initialization of the tests (create a temporary directory for some of the - * scripts) + * Finalizes the BWK miscellaneous integration suite. * - * @throws Exception + * @throws Exception unused hook retained for suite symmetry */ @AfterClass public static void afterAll() throws Exception {} diff --git a/src/test/java/io/jawk/BwkPTest.java b/src/it/java/io/jawk/BwkPIT.java similarity index 72% rename from src/test/java/io/jawk/BwkPTest.java rename to src/it/java/io/jawk/BwkPIT.java index c6560b6b..6d35fb4a 100644 --- a/src/test/java/io/jawk/BwkPTest.java +++ b/src/it/java/io/jawk/BwkPIT.java @@ -38,41 +38,42 @@ import org.junit.runners.Parameterized.Parameters; /** - * Test Suite based on unit and non-regression tests from bwk. Each AWK script - * in the src/test/resources/bwk.t/t.scripts directory will be executed against - * the corresponding *.in input, and its output will be compared to the - * corresponding *.ok file. + * Integration suite based on BWK pattern tests. Each AWK script in the BWK + * compatibility resources executes against the shared BWK input file and its + * output is compared with the recorded result. * * @see One True Awk */ @RunWith(Parameterized.class) -public class BwkPTest { +public class BwkPIT { private static final String BWK_P_PATH = "/bwk/p"; private static Path bwkPDirectory; private static Path scriptsDirectory; /** - * Initialization of the tests + * Initializes the BWK.p integration suite. * - * @throws Exception + * @throws Exception when resource discovery fails */ @BeforeClass public static void beforeAll() throws Exception {} /** - * @return the list of awk scripts in /src/test/resources/gawk - * @throws Exception + * Returns the BWK.p script names discovered from the integration-test + * resources. + * + * @return the parameter values for this suite + * @throws Exception when resource discovery fails */ @Parameters(name = "BWK.p {0}") public static Iterable awkList() throws Exception { - // Get the /bwk resource directory - URL bwkTUrl = BwkTTest.class.getResource(BWK_P_PATH); - if (bwkTUrl == null) { + URL bwkPUrl = BwkPIT.class.getResource(BWK_P_PATH); + if (bwkPUrl == null) { throw new IOException("Couldn't find resource " + BWK_P_PATH); } - Path bwkTPath = Paths.get(bwkTUrl.toURI()); - bwkPDirectory = new File(".").getAbsoluteFile().toPath().relativize(bwkTPath); + Path bwkPPath = Paths.get(bwkPUrl.toURI()); + bwkPDirectory = new File(".").getAbsoluteFile().toPath().relativize(bwkPPath); if (!bwkPDirectory.toFile().isDirectory()) { throw new IOException(BWK_P_PATH + " is not a directory"); } @@ -83,47 +84,40 @@ public static Iterable awkList() throws Exception { return Arrays .stream(scriptsDirectory.toFile().listFiles()) - .filter(sf -> sf.getName().startsWith("p.")) + .filter(scriptFile -> scriptFile.getName().startsWith("p.")) .map(File::getName) .collect(Collectors.toList()); } - /** Path to the AWK test script to execute */ + /** Path to the AWK test script to execute. */ @Parameter public String awkName; /** - * Execute the AWK script stored in {@link #awkName} + * Executes one BWK.p script and compares its output with the expected result. * - * @throws Exception + * @throws Exception when the test setup or execution fails unexpectedly */ @Test public void test() throws Exception { - // Get the AWK script file Path awkScriptPath = scriptsDirectory.resolve(awkName); - - // Get the file with the expected result Path okFilePath = bwkPDirectory.resolve("results/" + awkName + ".ok"); - - // Get the input file (always the same) Path inputFilePath = bwkPDirectory.resolve("inputs/test.countries"); AwkTestSupport .cliTest("BWK.p " + awkName) .argument("-f", awkScriptPath.toString()) .operand(inputFilePath.toString()) - .postProcessWith(s -> s.replace(inputFilePath.toString(), inputFilePath.getFileName().toString())) + .postProcessWith(output -> output.replace(inputFilePath.toString(), inputFilePath.getFileName().toString())) .expectLines(okFilePath) .build() .runAndAssert(); - } /** - * Initialization of the tests (create a temporary directory for some of the - * scripts) + * Finalizes the BWK.p integration suite. * - * @throws Exception + * @throws Exception unused hook retained for suite symmetry */ @AfterClass public static void afterAll() throws Exception {} diff --git a/src/test/java/io/jawk/BwkTTest.java b/src/it/java/io/jawk/BwkTIT.java similarity index 75% rename from src/test/java/io/jawk/BwkTTest.java rename to src/it/java/io/jawk/BwkTIT.java index 1b4ba2ad..64a64fb7 100644 --- a/src/test/java/io/jawk/BwkTTest.java +++ b/src/it/java/io/jawk/BwkTIT.java @@ -40,36 +40,37 @@ import org.junit.runners.Parameterized.Parameters; /** - * Test Suite based on unit and non-regression tests from bwk. Each AWK script - * in the src/test/resources/bwk.t/t.scripts directory will be executed against - * the corresponding *.in input, and its output will be compared to the - * corresponding *.ok file. + * Integration suite based on BWK text-processing tests. Each AWK script in the + * BWK compatibility resources executes against the shared BWK input file and + * its output is compared with the recorded result. * * @see One True Awk */ @RunWith(Parameterized.class) -public class BwkTTest { +public class BwkTIT { private static final String BWK_T_PATH = "/bwk/t"; private static Path bwkTDirectory; private static Path scriptsDirectory; /** - * Initialization of the tests + * Initializes the BWK.t integration suite. * - * @throws Exception + * @throws Exception when resource discovery fails */ @BeforeClass public static void beforeAll() throws Exception {} /** - * @return the list of awk scripts in /src/test/resources/gawk - * @throws Exception + * Returns the BWK.t script names discovered from the integration-test + * resources. + * + * @return the parameter values for this suite + * @throws Exception when resource discovery fails */ @Parameters(name = "BWK.t {0}") public static Iterable awkList() throws Exception { - // Get the /bwk resource directory - URL bwkTUrl = BwkTTest.class.getResource(BWK_T_PATH); + URL bwkTUrl = BwkTIT.class.getResource(BWK_T_PATH); if (bwkTUrl == null) { throw new IOException("Couldn't find resource " + BWK_T_PATH); } @@ -84,32 +85,26 @@ public static Iterable awkList() throws Exception { return Arrays .stream(scriptsDirectory.toFile().listFiles()) - .filter(sf -> sf.getName().startsWith("t.")) + .filter(scriptFile -> scriptFile.getName().startsWith("t.")) .map(File::getName) .collect(Collectors.toList()); } - /** Path to the AWK test script to execute */ + /** Path to the AWK test script to execute. */ @Parameter public String awkName; /** - * Execute the AWK script stored in {@link #awkName} + * Executes one BWK.t script and compares its output with the expected result. * - * @throws Exception + * @throws Exception when the test setup or execution fails unexpectedly */ @Test public void test() throws Exception { - // Get the AWK script file Path awkPath = scriptsDirectory.resolve(awkName); - - // Get the file with the expected result Path okPath = bwkTDirectory.resolve("results/" + awkName + ".ok"); - - // Get the input file (always the same) Path inputPath = bwkTDirectory.resolve("inputs/test.data"); - // Expected exit code? int expectedCode = 0; if ("t.exit".equals(awkName)) { expectedCode = 1; @@ -117,10 +112,7 @@ public void test() throws Exception { expectedCode = 2; } - // Special case: certain tests loop through a map, which cannot be expected to be sorted - // the same way between C and Java. So we sort the result artificially if ("t.in2".equals(awkName) || "t.intest2".equals(awkName)) { - String expectedResult = Files .readAllLines(okPath, StandardCharsets.UTF_8) .stream() @@ -137,8 +129,6 @@ public void test() throws Exception { .build() .runAndAssert(); } else { - - // General case AwkTestSupport .awkTest("BWK.t " + awkName) .script(Files.newInputStream(awkPath)) @@ -147,18 +137,13 @@ public void test() throws Exception { .expectExit(expectedCode) .build() .runAndAssert(); - } - - // Output must now equal the expected result -// assertEquals(expectedResult, output); } /** - * Initialization of the tests (create a temporary directory for some of the - * scripts) + * Finalizes the BWK.t integration suite. * - * @throws Exception + * @throws Exception unused hook retained for suite symmetry */ @AfterClass public static void afterAll() throws Exception {} diff --git a/src/it/java/io/jawk/GawkCompatibilityIT.java b/src/it/java/io/jawk/GawkCompatibilityIT.java new file mode 100644 index 00000000..1697b8e4 --- /dev/null +++ b/src/it/java/io/jawk/GawkCompatibilityIT.java @@ -0,0 +1,350 @@ +package io.jawk; + +/*- + * ╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲ + * Jawk + * ჻჻჻჻჻჻ + * Copyright (C) 2006 - 2026 MetricsHub + * ჻჻჻჻჻჻ + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * . + * ╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱ + */ + +import static org.junit.Assert.fail; + +import java.io.IOException; +import java.io.Reader; +import java.net.URL; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.nio.file.StandardCopyOption; +import java.util.ArrayList; +import java.util.Collections; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.Properties; +import java.util.TreeSet; +import java.util.stream.Stream; +import org.junit.Assume; +import org.junit.BeforeClass; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +/** + * Integration suite derived from gawk's generated {@code Maketests} metadata. + * The suite stages the vendored gawk snapshot into the Failsafe working + * directory, parses the portable rules from {@code Maketests}, and executes + * those rules through {@link AwkTestSupport#cliTest(String)}. + */ +@RunWith(Parameterized.class) +public class GawkCompatibilityIT { + + private static final String GAWK_RESOURCE_PATH = "/gawk"; + private static final String MAKETESTS_FILE = "Maketests"; + private static final String SKIP_MANIFEST_FILE = "skips.properties"; + private static final String EXIT_CODE_PREFIX = "EXIT CODE: "; + private static final String ACTUAL_OUTPUT_DIRECTORY = "gawk-actual"; + private static final int MAX_CAPTURED_OUTPUT_BYTES = 1024 * 1024; + private static final int DIFF_CONTEXT_RADIUS = 80; + private static final boolean LOG_PROGRESS = Boolean.getBoolean("jawk.gawk.progress"); + + private static SuiteState suiteState; + + /** + * Ensures that the vendored gawk resources are staged and parsed before the + * parameterised suite begins execution. + * + * @throws Exception when loading the suite metadata fails + */ + @BeforeClass + public static void beforeAll() throws Exception { + loadSuiteState(); + } + + /** + * Returns every gawk compatibility case discovered from the vendored + * {@code Maketests} snapshot. + * + * @return parameter values for the suite + * @throws Exception when loading or validating the Maketests metadata fails + */ + @Parameters(name = "GAWK {0}") + public static Iterable parameters() throws Exception { + return loadSuiteState().cases; + } + + /** Gawk compatibility case under test. */ + @Parameter + public GawkMaketestsParser.GawkCase gawkCase; + + /** + * Executes one gawk compatibility case unless the explicit skip manifest marks + * it unsupported by the in-process Jawk harness. + * + * @throws Exception when preparing or executing the case fails unexpectedly + */ + @Test + public void test() throws Exception { + SuiteState state = loadSuiteState(); + String skipReason = state.skipReasons.get(gawkCase.name()); + Assume.assumeTrue(skipReason, skipReason == null); + if (LOG_PROGRESS) { + System.out.println("GAWK " + gawkCase.name()); + } + + AwkTestSupport.CliTestBuilder builder = AwkTestSupport + .cliTest("GAWK " + gawkCase.name()) + .emulateCliMain() + .mergeStdoutAndStderr() + .maxOutputBytes(MAX_CAPTURED_OUTPUT_BYTES); + + if (gawkCase.localeTag() != null) { + builder.argument("--locale", gawkCase.localeTag()); + } + for (String flag : gawkCase.runnableFlags()) { + builder.argument(flag); + } + builder.argument("-f", gawkCase.scriptFileName()); + if (gawkCase.stdinFileName() != null) { + builder.stdin(readUtf8(state.stagedDirectory.resolve(gawkCase.stdinFileName()))); + } + + AwkTestSupport.TestResult result; + try { + result = builder.build().run(); + } catch (AwkTestSupport.OutputLimitExceededException ex) { + fail( + "Captured output for GAWK " + + gawkCase.name() + + " exceeded " + + ex.maxBytes() + + " bytes. Enable -Djawk.gawk.progress=true to log case execution."); + return; + } + String actual = renderMaketestsOutput(result.output(), result.exitCode()); + String expected = normalizeNewlines(readUtf8(state.stagedDirectory.resolve(gawkCase.expectedFileName()))); + assertOutputMatches(state, expected, actual); + } + + private static synchronized SuiteState loadSuiteState() throws Exception { + if (suiteState != null) { + return suiteState; + } + Path resourceDirectory = resolveResourceDirectory(); + Path stagedDirectory = stageResourceDirectory(resourceDirectory); + Path actualOutputDirectory = Files.createDirectories(stagedDirectory.resolve(ACTUAL_OUTPUT_DIRECTORY)); + List parsedCases = parseCases(resourceDirectory.resolve(MAKETESTS_FILE)); + Map skipReasons = loadSkipReasons(resourceDirectory.resolve(SKIP_MANIFEST_FILE)); + validateCoverage(parsedCases, skipReasons); + suiteState = new SuiteState(stagedDirectory, actualOutputDirectory, parsedCases, skipReasons); + return suiteState; + } + + private static Path resolveResourceDirectory() throws Exception { + URL resourceUrl = GawkCompatibilityIT.class.getResource(GAWK_RESOURCE_PATH); + if (resourceUrl == null) { + throw new IOException("Couldn't find resource " + GAWK_RESOURCE_PATH); + } + Path resourceDirectory = Paths.get(resourceUrl.toURI()); + if (!Files.isDirectory(resourceDirectory)) { + throw new IOException(GAWK_RESOURCE_PATH + " is not a directory"); + } + return resourceDirectory; + } + + private static Path stageResourceDirectory(Path sourceDirectory) throws IOException { + Path workingDirectory = Paths.get("").toAbsolutePath().normalize(); + try (Stream paths = Files.walk(sourceDirectory)) { + paths.forEach(path -> copyToWorkingDirectory(sourceDirectory, workingDirectory, path)); + } + return workingDirectory; + } + + private static void copyToWorkingDirectory(Path sourceDirectory, Path workingDirectory, Path sourcePath) { + try { + Path relativePath = sourceDirectory.relativize(sourcePath); + if (relativePath.toString().isEmpty()) { + return; + } + Path destination = workingDirectory.resolve(relativePath.toString()); + if (Files.isDirectory(sourcePath)) { + Files.createDirectories(destination); + } else { + Path parent = destination.getParent(); + if (parent != null) { + Files.createDirectories(parent); + } + Files.copy(sourcePath, destination, StandardCopyOption.REPLACE_EXISTING); + } + } catch (IOException ex) { + throw new IllegalStateException("Failed to stage gawk resource " + sourcePath, ex); + } + } + + private static List parseCases(Path maketestsPath) throws IOException { + try (Reader reader = Files.newBufferedReader(maketestsPath, StandardCharsets.UTF_8)) { + return new ArrayList<>(GawkMaketestsParser.parse(reader)); + } + } + + private static Map loadSkipReasons(Path manifestPath) throws IOException { + Properties properties = new Properties(); + try (Reader reader = Files.newBufferedReader(manifestPath, StandardCharsets.UTF_8)) { + properties.load(reader); + } + Map skipReasons = new LinkedHashMap<>(); + for (String name : properties.stringPropertyNames()) { + skipReasons.put(name, properties.getProperty(name)); + } + return Collections.unmodifiableMap(skipReasons); + } + + private static void validateCoverage( + List parsedCases, + Map skipReasons) { + TreeSet parsedNames = new TreeSet<>(); + TreeSet missingSkipEntries = new TreeSet<>(); + for (GawkMaketestsParser.GawkCase parsedCase : parsedCases) { + parsedNames.add(parsedCase.name()); + if (parsedCase.requiresExplicitSkip() && !skipReasons.containsKey(parsedCase.name())) { + missingSkipEntries.add(parsedCase.name()); + } + } + if (!missingSkipEntries.isEmpty()) { + throw new IllegalStateException("Missing gawk skip manifest entries: " + String.join(", ", missingSkipEntries)); + } + + TreeSet staleSkipEntries = new TreeSet<>(skipReasons.keySet()); + staleSkipEntries.removeAll(parsedNames); + if (!staleSkipEntries.isEmpty()) { + throw new IllegalStateException( + "Skip manifest contains unknown gawk cases: " + String.join(", ", staleSkipEntries)); + } + } + + private static String renderMaketestsOutput(String output, int exitCode) { + String normalized = normalizeNewlines(output); + if (exitCode == 0) { + return normalized; + } + return normalized + EXIT_CODE_PREFIX + exitCode + "\n"; + } + + private void assertOutputMatches(SuiteState state, String expected, String actual) throws IOException { + if (expected.equals(actual)) { + return; + } + Path actualOutputPath = state.actualOutputDirectory.resolve(gawkCase.name() + ".actual"); + Files.write(actualOutputPath, actual.getBytes(StandardCharsets.UTF_8)); + int mismatchIndex = firstMismatchIndex(expected, actual); + throw new AssertionError(buildMismatchMessage(actualOutputPath, expected, actual, mismatchIndex)); + } + + private String buildMismatchMessage(Path actualOutputPath, String expected, String actual, int mismatchIndex) { + StringBuilder message = new StringBuilder(); + message.append("Unexpected output for GAWK ").append(gawkCase.name()); + if (mismatchIndex >= 0) { + message.append(" at char ").append(mismatchIndex); + } + message + .append(" (expected length ") + .append(expected.length()) + .append(", actual length ") + .append(actual.length()) + .append(")."); + if (mismatchIndex >= 0) { + message + .append(" Expected snippet: ") + .append(snippetAround(expected, mismatchIndex)) + .append(". Actual snippet: ") + .append(snippetAround(actual, mismatchIndex)) + .append("."); + } + message + .append(" Expected file: ") + .append(gawkCase.expectedFileName()) + .append(". Actual output written to ") + .append(actualOutputPath); + return message.toString(); + } + + private static int firstMismatchIndex(String expected, String actual) { + int commonLength = Math.min(expected.length(), actual.length()); + for (int index = 0; index < commonLength; index++) { + if (expected.charAt(index) != actual.charAt(index)) { + return index; + } + } + if (expected.length() != actual.length()) { + return commonLength; + } + return -1; + } + + private static String snippetAround(String text, int index) { + if (text.isEmpty()) { + return "\"\""; + } + int start = Math.max(0, index - DIFF_CONTEXT_RADIUS); + int end = Math.min(text.length(), index + DIFF_CONTEXT_RADIUS); + String prefix = start > 0 ? "..." : ""; + String suffix = end < text.length() ? "..." : ""; + return "\"" + + prefix + + sanitizeSnippet(text.substring(start, end)) + + suffix + + "\""; + } + + private static String sanitizeSnippet(String text) { + return text + .replace("\\", "\\\\") + .replace("\r", "\\r") + .replace("\n", "\\n") + .replace("\t", "\\t"); + } + + private static String readUtf8(Path path) throws IOException { + return new String(Files.readAllBytes(path), StandardCharsets.UTF_8); + } + + private static String normalizeNewlines(String text) { + return text.replace("\r\n", "\n"); + } + + private static final class SuiteState { + private final Path stagedDirectory; + private final Path actualOutputDirectory; + private final List cases; + private final Map skipReasons; + + SuiteState( + Path stagedDirectory, + Path actualOutputDirectory, + List cases, + Map skipReasons) { + this.stagedDirectory = stagedDirectory; + this.actualOutputDirectory = actualOutputDirectory; + this.cases = Collections.unmodifiableList(new ArrayList<>(cases)); + this.skipReasons = skipReasons; + } + } +} diff --git a/src/it/java/io/jawk/GawkMaketestsParser.java b/src/it/java/io/jawk/GawkMaketestsParser.java new file mode 100644 index 00000000..33f5b54b --- /dev/null +++ b/src/it/java/io/jawk/GawkMaketestsParser.java @@ -0,0 +1,229 @@ +package io.jawk; + +/*- + * ╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲ + * Jawk + * ჻჻჻჻჻჻ + * Copyright (C) 2006 - 2026 MetricsHub + * ჻჻჻჻჻჻ + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * . + * ╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱ + */ + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.Reader; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Locale; +import java.util.Set; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +final class GawkMaketestsParser { + + private static final String DUMMY_TARGET = "Gt-dummy"; + private static final Pattern TARGET_PATTERN = Pattern.compile("^([A-Za-z0-9_.+-]+):\\s*$"); + private static final Pattern FLAG_PATTERN = Pattern.compile("--[a-z-]+|-M"); + private static final Pattern LOCALE_PATTERN = Pattern.compile("GAWKLOCALE=([^;\\s]+)"); + private static final Set DIRECT_CLI_FLAGS = new LinkedHashSet<>(Arrays.asList("--posix", "--sandbox")); + private static final Set NOOP_FLAGS = new LinkedHashSet<>( + Arrays.asList("--non-decimal-data", "--re-interval")); + private static final Set UNSUPPORTED_FLAGS = new LinkedHashSet<>( + Arrays.asList("--csv", "--debug", "--lint", "--lint-old", "--pretty-print", "--traditional", "-M")); + + private GawkMaketestsParser() {} + + static List parse(Reader reader) throws IOException { + BufferedReader bufferedReader = new BufferedReader(reader); + List cases = new ArrayList<>(); + String currentTarget = null; + List currentBlock = new ArrayList<>(); + String line; + while ((line = bufferedReader.readLine()) != null) { + Matcher matcher = TARGET_PATTERN.matcher(line); + if (matcher.matches()) { + addCase(cases, currentTarget, currentBlock); + currentTarget = matcher.group(1); + currentBlock = new ArrayList<>(); + } else if (currentTarget != null) { + currentBlock.add(line); + } + } + addCase(cases, currentTarget, currentBlock); + return Collections.unmodifiableList(cases); + } + + private static void addCase(List cases, String target, List blockLines) { + if (target == null || DUMMY_TARGET.equals(target)) { + return; + } + String commandLine = findCommandLine(target, blockLines); + String blockText = String.join("\n", blockLines); + boolean shellScript = commandLine.contains("$@.sh"); + List flags = parseFlags(commandLine); + List runnableFlags = new ArrayList<>(); + List unsupportedFlags = new ArrayList<>(); + for (String flag : flags) { + if (DIRECT_CLI_FLAGS.contains(flag)) { + runnableFlags.add(flag); + } else if (NOOP_FLAGS.contains(flag)) { + continue; + } else if (UNSUPPORTED_FLAGS.contains(flag)) { + unsupportedFlags.add(flag); + } + } + String localeTag = parseLocaleTag(blockText); + boolean readsStandardInput = commandLine.contains("< \"$(srcdir)\"/$@.in"); + boolean hasMpfrExpectedVariant = blockText.contains("$@-mpfr.ok"); + cases + .add( + new GawkCase( + target, + shellScript, + flags, + runnableFlags, + unsupportedFlags, + readsStandardInput, + hasMpfrExpectedVariant, + localeTag)); + } + + private static String findCommandLine(String target, List blockLines) { + for (String line : blockLines) { + if (line.contains("$(AWK)") || line.contains("$@.sh")) { + return line; + } + } + throw new IllegalArgumentException("Unable to find AWK command line for Maketests target " + target); + } + + private static List parseFlags(String commandLine) { + LinkedHashSet flags = new LinkedHashSet<>(); + Matcher matcher = FLAG_PATTERN.matcher(commandLine); + while (matcher.find()) { + String flag = matcher.group(); + if ("-f".equals(flag)) { + continue; + } + flags.add(flag); + } + return Collections.unmodifiableList(new ArrayList<>(flags)); + } + + private static String parseLocaleTag(String blockText) { + Matcher matcher = LOCALE_PATTERN.matcher(blockText); + if (!matcher.find()) { + return null; + } + String gawkLocale = matcher.group(1); + if ("C".equals(gawkLocale)) { + return Locale.US.toLanguageTag(); + } + String[] languageAndCountry = gawkLocale.split("[_.]", 3); + if (languageAndCountry.length < 2) { + return gawkLocale; + } + return languageAndCountry[0].toLowerCase(Locale.ROOT) + + "-" + + languageAndCountry[1].toUpperCase(Locale.ROOT); + } + + static final class GawkCase { + private final String name; + private final boolean shellScript; + private final List flags; + private final List runnableFlags; + private final List unsupportedFlags; + private final boolean readsStandardInput; + private final boolean hasMpfrExpectedVariant; + private final String localeTag; + + GawkCase( + String name, + boolean shellScript, + List flags, + List runnableFlags, + List unsupportedFlags, + boolean readsStandardInput, + boolean hasMpfrExpectedVariant, + String localeTag) { + this.name = name; + this.shellScript = shellScript; + this.flags = Collections.unmodifiableList(new ArrayList<>(flags)); + this.runnableFlags = Collections.unmodifiableList(new ArrayList<>(runnableFlags)); + this.unsupportedFlags = Collections.unmodifiableList(new ArrayList<>(unsupportedFlags)); + this.readsStandardInput = readsStandardInput; + this.hasMpfrExpectedVariant = hasMpfrExpectedVariant; + this.localeTag = localeTag; + } + + String name() { + return name; + } + + String scriptMode() { + return shellScript ? "sh" : "awk"; + } + + String scriptFileName() { + return name + "." + scriptMode(); + } + + List flags() { + return flags; + } + + List runnableFlags() { + return runnableFlags; + } + + List unsupportedFlags() { + return unsupportedFlags; + } + + boolean readsStandardInput() { + return readsStandardInput; + } + + String stdinFileName() { + return readsStandardInput ? name + ".in" : null; + } + + boolean hasMpfrExpectedVariant() { + return hasMpfrExpectedVariant; + } + + String expectedFileName() { + return name + ".ok"; + } + + String localeTag() { + return localeTag; + } + + boolean requiresExplicitSkip() { + return shellScript || !unsupportedFlags.isEmpty(); + } + + @Override + public String toString() { + return name; + } + } +} diff --git a/src/test/resources/bwk/misc/inputs/funstack.in b/src/it/resources/bwk/misc/inputs/funstack.in similarity index 100% rename from src/test/resources/bwk/misc/inputs/funstack.in rename to src/it/resources/bwk/misc/inputs/funstack.in diff --git a/src/test/resources/bwk/misc/results/funstack.ok b/src/it/resources/bwk/misc/results/funstack.ok similarity index 100% rename from src/test/resources/bwk/misc/results/funstack.ok rename to src/it/resources/bwk/misc/results/funstack.ok diff --git a/src/test/resources/bwk/misc/scripts/funstack.awk b/src/it/resources/bwk/misc/scripts/funstack.awk similarity index 100% rename from src/test/resources/bwk/misc/scripts/funstack.awk rename to src/it/resources/bwk/misc/scripts/funstack.awk diff --git a/src/test/resources/bwk/p/inputs/test.countries b/src/it/resources/bwk/p/inputs/test.countries similarity index 100% rename from src/test/resources/bwk/p/inputs/test.countries rename to src/it/resources/bwk/p/inputs/test.countries diff --git a/src/test/resources/bwk/p/results/p.1.ok b/src/it/resources/bwk/p/results/p.1.ok similarity index 100% rename from src/test/resources/bwk/p/results/p.1.ok rename to src/it/resources/bwk/p/results/p.1.ok diff --git a/src/test/resources/bwk/p/results/p.10.ok b/src/it/resources/bwk/p/results/p.10.ok similarity index 100% rename from src/test/resources/bwk/p/results/p.10.ok rename to src/it/resources/bwk/p/results/p.10.ok diff --git a/src/test/resources/bwk/p/results/p.11.ok b/src/it/resources/bwk/p/results/p.11.ok similarity index 100% rename from src/test/resources/bwk/p/results/p.11.ok rename to src/it/resources/bwk/p/results/p.11.ok diff --git a/src/test/resources/bwk/p/results/p.12.ok b/src/it/resources/bwk/p/results/p.12.ok similarity index 100% rename from src/test/resources/bwk/p/results/p.12.ok rename to src/it/resources/bwk/p/results/p.12.ok diff --git a/src/test/resources/bwk/p/results/p.13.ok b/src/it/resources/bwk/p/results/p.13.ok similarity index 100% rename from src/test/resources/bwk/p/results/p.13.ok rename to src/it/resources/bwk/p/results/p.13.ok diff --git a/src/test/resources/bwk/p/results/p.14.ok b/src/it/resources/bwk/p/results/p.14.ok similarity index 100% rename from src/test/resources/bwk/p/results/p.14.ok rename to src/it/resources/bwk/p/results/p.14.ok diff --git a/src/test/resources/bwk/p/results/p.15.ok b/src/it/resources/bwk/p/results/p.15.ok similarity index 100% rename from src/test/resources/bwk/p/results/p.15.ok rename to src/it/resources/bwk/p/results/p.15.ok diff --git a/src/test/resources/bwk/p/results/p.16.ok b/src/it/resources/bwk/p/results/p.16.ok similarity index 100% rename from src/test/resources/bwk/p/results/p.16.ok rename to src/it/resources/bwk/p/results/p.16.ok diff --git a/src/test/resources/bwk/p/results/p.17.ok b/src/it/resources/bwk/p/results/p.17.ok similarity index 100% rename from src/test/resources/bwk/p/results/p.17.ok rename to src/it/resources/bwk/p/results/p.17.ok diff --git a/src/test/resources/bwk/p/results/p.18.ok b/src/it/resources/bwk/p/results/p.18.ok similarity index 100% rename from src/test/resources/bwk/p/results/p.18.ok rename to src/it/resources/bwk/p/results/p.18.ok diff --git a/src/test/resources/bwk/p/results/p.19.ok b/src/it/resources/bwk/p/results/p.19.ok similarity index 100% rename from src/test/resources/bwk/p/results/p.19.ok rename to src/it/resources/bwk/p/results/p.19.ok diff --git a/src/test/resources/bwk/p/results/p.2.ok b/src/it/resources/bwk/p/results/p.2.ok similarity index 100% rename from src/test/resources/bwk/p/results/p.2.ok rename to src/it/resources/bwk/p/results/p.2.ok diff --git a/src/test/resources/bwk/p/results/p.20.ok b/src/it/resources/bwk/p/results/p.20.ok similarity index 100% rename from src/test/resources/bwk/p/results/p.20.ok rename to src/it/resources/bwk/p/results/p.20.ok diff --git a/src/test/resources/bwk/p/results/p.21.ok b/src/it/resources/bwk/p/results/p.21.ok similarity index 100% rename from src/test/resources/bwk/p/results/p.21.ok rename to src/it/resources/bwk/p/results/p.21.ok diff --git a/src/test/resources/bwk/p/results/p.21a.ok b/src/it/resources/bwk/p/results/p.21a.ok similarity index 100% rename from src/test/resources/bwk/p/results/p.21a.ok rename to src/it/resources/bwk/p/results/p.21a.ok diff --git a/src/test/resources/bwk/p/results/p.22.ok b/src/it/resources/bwk/p/results/p.22.ok similarity index 100% rename from src/test/resources/bwk/p/results/p.22.ok rename to src/it/resources/bwk/p/results/p.22.ok diff --git a/src/test/resources/bwk/p/results/p.23.ok b/src/it/resources/bwk/p/results/p.23.ok similarity index 100% rename from src/test/resources/bwk/p/results/p.23.ok rename to src/it/resources/bwk/p/results/p.23.ok diff --git a/src/test/resources/bwk/p/results/p.24.ok b/src/it/resources/bwk/p/results/p.24.ok similarity index 100% rename from src/test/resources/bwk/p/results/p.24.ok rename to src/it/resources/bwk/p/results/p.24.ok diff --git a/src/test/resources/bwk/p/results/p.25.ok b/src/it/resources/bwk/p/results/p.25.ok similarity index 100% rename from src/test/resources/bwk/p/results/p.25.ok rename to src/it/resources/bwk/p/results/p.25.ok diff --git a/src/test/resources/bwk/p/results/p.26.ok b/src/it/resources/bwk/p/results/p.26.ok similarity index 100% rename from src/test/resources/bwk/p/results/p.26.ok rename to src/it/resources/bwk/p/results/p.26.ok diff --git a/src/test/resources/bwk/p/results/p.26a.ok b/src/it/resources/bwk/p/results/p.26a.ok similarity index 100% rename from src/test/resources/bwk/p/results/p.26a.ok rename to src/it/resources/bwk/p/results/p.26a.ok diff --git a/src/test/resources/bwk/p/results/p.27.ok b/src/it/resources/bwk/p/results/p.27.ok similarity index 100% rename from src/test/resources/bwk/p/results/p.27.ok rename to src/it/resources/bwk/p/results/p.27.ok diff --git a/src/test/resources/bwk/p/results/p.28.ok b/src/it/resources/bwk/p/results/p.28.ok similarity index 100% rename from src/test/resources/bwk/p/results/p.28.ok rename to src/it/resources/bwk/p/results/p.28.ok diff --git a/src/test/resources/bwk/p/results/p.29.ok b/src/it/resources/bwk/p/results/p.29.ok similarity index 100% rename from src/test/resources/bwk/p/results/p.29.ok rename to src/it/resources/bwk/p/results/p.29.ok diff --git a/src/test/resources/bwk/p/results/p.3.ok b/src/it/resources/bwk/p/results/p.3.ok similarity index 100% rename from src/test/resources/bwk/p/results/p.3.ok rename to src/it/resources/bwk/p/results/p.3.ok diff --git a/src/test/resources/bwk/p/results/p.30.ok b/src/it/resources/bwk/p/results/p.30.ok similarity index 100% rename from src/test/resources/bwk/p/results/p.30.ok rename to src/it/resources/bwk/p/results/p.30.ok diff --git a/src/test/resources/bwk/p/results/p.31.ok b/src/it/resources/bwk/p/results/p.31.ok similarity index 100% rename from src/test/resources/bwk/p/results/p.31.ok rename to src/it/resources/bwk/p/results/p.31.ok diff --git a/src/test/resources/bwk/p/results/p.32.ok b/src/it/resources/bwk/p/results/p.32.ok similarity index 100% rename from src/test/resources/bwk/p/results/p.32.ok rename to src/it/resources/bwk/p/results/p.32.ok diff --git a/src/test/resources/bwk/p/results/p.33.ok b/src/it/resources/bwk/p/results/p.33.ok similarity index 100% rename from src/test/resources/bwk/p/results/p.33.ok rename to src/it/resources/bwk/p/results/p.33.ok diff --git a/src/test/resources/bwk/p/results/p.34.ok b/src/it/resources/bwk/p/results/p.34.ok similarity index 100% rename from src/test/resources/bwk/p/results/p.34.ok rename to src/it/resources/bwk/p/results/p.34.ok diff --git a/src/test/resources/bwk/p/results/p.35.ok b/src/it/resources/bwk/p/results/p.35.ok similarity index 100% rename from src/test/resources/bwk/p/results/p.35.ok rename to src/it/resources/bwk/p/results/p.35.ok diff --git a/src/test/resources/bwk/p/results/p.36.ok b/src/it/resources/bwk/p/results/p.36.ok similarity index 100% rename from src/test/resources/bwk/p/results/p.36.ok rename to src/it/resources/bwk/p/results/p.36.ok diff --git a/src/test/resources/bwk/p/results/p.37.ok b/src/it/resources/bwk/p/results/p.37.ok similarity index 100% rename from src/test/resources/bwk/p/results/p.37.ok rename to src/it/resources/bwk/p/results/p.37.ok diff --git a/src/test/resources/bwk/p/results/p.38.ok b/src/it/resources/bwk/p/results/p.38.ok similarity index 100% rename from src/test/resources/bwk/p/results/p.38.ok rename to src/it/resources/bwk/p/results/p.38.ok diff --git a/src/test/resources/bwk/p/results/p.39.ok b/src/it/resources/bwk/p/results/p.39.ok similarity index 100% rename from src/test/resources/bwk/p/results/p.39.ok rename to src/it/resources/bwk/p/results/p.39.ok diff --git a/src/test/resources/bwk/p/results/p.4.ok b/src/it/resources/bwk/p/results/p.4.ok similarity index 100% rename from src/test/resources/bwk/p/results/p.4.ok rename to src/it/resources/bwk/p/results/p.4.ok diff --git a/src/test/resources/bwk/p/results/p.40.ok b/src/it/resources/bwk/p/results/p.40.ok similarity index 100% rename from src/test/resources/bwk/p/results/p.40.ok rename to src/it/resources/bwk/p/results/p.40.ok diff --git a/src/test/resources/bwk/p/results/p.41.ok b/src/it/resources/bwk/p/results/p.41.ok similarity index 100% rename from src/test/resources/bwk/p/results/p.41.ok rename to src/it/resources/bwk/p/results/p.41.ok diff --git a/src/test/resources/bwk/p/results/p.42.ok b/src/it/resources/bwk/p/results/p.42.ok similarity index 100% rename from src/test/resources/bwk/p/results/p.42.ok rename to src/it/resources/bwk/p/results/p.42.ok diff --git a/src/test/resources/bwk/p/results/p.43.ok b/src/it/resources/bwk/p/results/p.43.ok similarity index 100% rename from src/test/resources/bwk/p/results/p.43.ok rename to src/it/resources/bwk/p/results/p.43.ok diff --git a/src/test/resources/bwk/p/results/p.44.ok b/src/it/resources/bwk/p/results/p.44.ok similarity index 100% rename from src/test/resources/bwk/p/results/p.44.ok rename to src/it/resources/bwk/p/results/p.44.ok diff --git a/src/test/resources/bwk/p/results/p.45.ok b/src/it/resources/bwk/p/results/p.45.ok similarity index 100% rename from src/test/resources/bwk/p/results/p.45.ok rename to src/it/resources/bwk/p/results/p.45.ok diff --git a/src/test/resources/bwk/p/results/p.46.ok b/src/it/resources/bwk/p/results/p.46.ok similarity index 100% rename from src/test/resources/bwk/p/results/p.46.ok rename to src/it/resources/bwk/p/results/p.46.ok diff --git a/src/test/resources/bwk/p/results/p.47.ok b/src/it/resources/bwk/p/results/p.47.ok similarity index 100% rename from src/test/resources/bwk/p/results/p.47.ok rename to src/it/resources/bwk/p/results/p.47.ok diff --git a/src/test/resources/bwk/p/results/p.48.ok b/src/it/resources/bwk/p/results/p.48.ok similarity index 100% rename from src/test/resources/bwk/p/results/p.48.ok rename to src/it/resources/bwk/p/results/p.48.ok diff --git a/src/test/resources/bwk/p/results/p.48a.ok b/src/it/resources/bwk/p/results/p.48a.ok similarity index 100% rename from src/test/resources/bwk/p/results/p.48a.ok rename to src/it/resources/bwk/p/results/p.48a.ok diff --git a/src/test/resources/bwk/p/results/p.49.ok b/src/it/resources/bwk/p/results/p.49.ok similarity index 100% rename from src/test/resources/bwk/p/results/p.49.ok rename to src/it/resources/bwk/p/results/p.49.ok diff --git a/src/test/resources/bwk/p/results/p.5.ok b/src/it/resources/bwk/p/results/p.5.ok similarity index 100% rename from src/test/resources/bwk/p/results/p.5.ok rename to src/it/resources/bwk/p/results/p.5.ok diff --git a/src/test/resources/bwk/p/results/p.50.ok b/src/it/resources/bwk/p/results/p.50.ok similarity index 100% rename from src/test/resources/bwk/p/results/p.50.ok rename to src/it/resources/bwk/p/results/p.50.ok diff --git a/src/test/resources/bwk/p/results/p.51.ok b/src/it/resources/bwk/p/results/p.51.ok similarity index 100% rename from src/test/resources/bwk/p/results/p.51.ok rename to src/it/resources/bwk/p/results/p.51.ok diff --git a/src/test/resources/bwk/p/results/p.52.ok b/src/it/resources/bwk/p/results/p.52.ok similarity index 100% rename from src/test/resources/bwk/p/results/p.52.ok rename to src/it/resources/bwk/p/results/p.52.ok diff --git a/src/test/resources/bwk/p/results/p.5a.ok b/src/it/resources/bwk/p/results/p.5a.ok similarity index 100% rename from src/test/resources/bwk/p/results/p.5a.ok rename to src/it/resources/bwk/p/results/p.5a.ok diff --git a/src/test/resources/bwk/p/results/p.6.ok b/src/it/resources/bwk/p/results/p.6.ok similarity index 100% rename from src/test/resources/bwk/p/results/p.6.ok rename to src/it/resources/bwk/p/results/p.6.ok diff --git a/src/test/resources/bwk/p/results/p.7.ok b/src/it/resources/bwk/p/results/p.7.ok similarity index 100% rename from src/test/resources/bwk/p/results/p.7.ok rename to src/it/resources/bwk/p/results/p.7.ok diff --git a/src/test/resources/bwk/p/results/p.8.ok b/src/it/resources/bwk/p/results/p.8.ok similarity index 100% rename from src/test/resources/bwk/p/results/p.8.ok rename to src/it/resources/bwk/p/results/p.8.ok diff --git a/src/test/resources/bwk/p/results/p.9.ok b/src/it/resources/bwk/p/results/p.9.ok similarity index 100% rename from src/test/resources/bwk/p/results/p.9.ok rename to src/it/resources/bwk/p/results/p.9.ok diff --git a/src/test/resources/bwk/p/results/p.table.ok b/src/it/resources/bwk/p/results/p.table.ok similarity index 100% rename from src/test/resources/bwk/p/results/p.table.ok rename to src/it/resources/bwk/p/results/p.table.ok diff --git a/src/test/resources/bwk/p/scripts/p.1 b/src/it/resources/bwk/p/scripts/p.1 similarity index 100% rename from src/test/resources/bwk/p/scripts/p.1 rename to src/it/resources/bwk/p/scripts/p.1 diff --git a/src/test/resources/bwk/p/scripts/p.10 b/src/it/resources/bwk/p/scripts/p.10 similarity index 100% rename from src/test/resources/bwk/p/scripts/p.10 rename to src/it/resources/bwk/p/scripts/p.10 diff --git a/src/test/resources/bwk/p/scripts/p.11 b/src/it/resources/bwk/p/scripts/p.11 similarity index 100% rename from src/test/resources/bwk/p/scripts/p.11 rename to src/it/resources/bwk/p/scripts/p.11 diff --git a/src/test/resources/bwk/p/scripts/p.12 b/src/it/resources/bwk/p/scripts/p.12 similarity index 100% rename from src/test/resources/bwk/p/scripts/p.12 rename to src/it/resources/bwk/p/scripts/p.12 diff --git a/src/test/resources/bwk/p/scripts/p.13 b/src/it/resources/bwk/p/scripts/p.13 similarity index 100% rename from src/test/resources/bwk/p/scripts/p.13 rename to src/it/resources/bwk/p/scripts/p.13 diff --git a/src/test/resources/bwk/p/scripts/p.14 b/src/it/resources/bwk/p/scripts/p.14 similarity index 100% rename from src/test/resources/bwk/p/scripts/p.14 rename to src/it/resources/bwk/p/scripts/p.14 diff --git a/src/test/resources/bwk/p/scripts/p.15 b/src/it/resources/bwk/p/scripts/p.15 similarity index 100% rename from src/test/resources/bwk/p/scripts/p.15 rename to src/it/resources/bwk/p/scripts/p.15 diff --git a/src/test/resources/bwk/p/scripts/p.16 b/src/it/resources/bwk/p/scripts/p.16 similarity index 100% rename from src/test/resources/bwk/p/scripts/p.16 rename to src/it/resources/bwk/p/scripts/p.16 diff --git a/src/test/resources/bwk/p/scripts/p.17 b/src/it/resources/bwk/p/scripts/p.17 similarity index 100% rename from src/test/resources/bwk/p/scripts/p.17 rename to src/it/resources/bwk/p/scripts/p.17 diff --git a/src/test/resources/bwk/p/scripts/p.18 b/src/it/resources/bwk/p/scripts/p.18 similarity index 100% rename from src/test/resources/bwk/p/scripts/p.18 rename to src/it/resources/bwk/p/scripts/p.18 diff --git a/src/test/resources/bwk/p/scripts/p.19 b/src/it/resources/bwk/p/scripts/p.19 similarity index 100% rename from src/test/resources/bwk/p/scripts/p.19 rename to src/it/resources/bwk/p/scripts/p.19 diff --git a/src/test/resources/bwk/p/scripts/p.2 b/src/it/resources/bwk/p/scripts/p.2 similarity index 100% rename from src/test/resources/bwk/p/scripts/p.2 rename to src/it/resources/bwk/p/scripts/p.2 diff --git a/src/test/resources/bwk/p/scripts/p.20 b/src/it/resources/bwk/p/scripts/p.20 similarity index 100% rename from src/test/resources/bwk/p/scripts/p.20 rename to src/it/resources/bwk/p/scripts/p.20 diff --git a/src/test/resources/bwk/p/scripts/p.21 b/src/it/resources/bwk/p/scripts/p.21 similarity index 100% rename from src/test/resources/bwk/p/scripts/p.21 rename to src/it/resources/bwk/p/scripts/p.21 diff --git a/src/test/resources/bwk/p/scripts/p.21a b/src/it/resources/bwk/p/scripts/p.21a similarity index 100% rename from src/test/resources/bwk/p/scripts/p.21a rename to src/it/resources/bwk/p/scripts/p.21a diff --git a/src/test/resources/bwk/p/scripts/p.22 b/src/it/resources/bwk/p/scripts/p.22 similarity index 100% rename from src/test/resources/bwk/p/scripts/p.22 rename to src/it/resources/bwk/p/scripts/p.22 diff --git a/src/test/resources/bwk/p/scripts/p.23 b/src/it/resources/bwk/p/scripts/p.23 similarity index 100% rename from src/test/resources/bwk/p/scripts/p.23 rename to src/it/resources/bwk/p/scripts/p.23 diff --git a/src/test/resources/bwk/p/scripts/p.24 b/src/it/resources/bwk/p/scripts/p.24 similarity index 100% rename from src/test/resources/bwk/p/scripts/p.24 rename to src/it/resources/bwk/p/scripts/p.24 diff --git a/src/test/resources/bwk/p/scripts/p.25 b/src/it/resources/bwk/p/scripts/p.25 similarity index 100% rename from src/test/resources/bwk/p/scripts/p.25 rename to src/it/resources/bwk/p/scripts/p.25 diff --git a/src/test/resources/bwk/p/scripts/p.26 b/src/it/resources/bwk/p/scripts/p.26 similarity index 100% rename from src/test/resources/bwk/p/scripts/p.26 rename to src/it/resources/bwk/p/scripts/p.26 diff --git a/src/test/resources/bwk/p/scripts/p.26a b/src/it/resources/bwk/p/scripts/p.26a similarity index 100% rename from src/test/resources/bwk/p/scripts/p.26a rename to src/it/resources/bwk/p/scripts/p.26a diff --git a/src/test/resources/bwk/p/scripts/p.27 b/src/it/resources/bwk/p/scripts/p.27 similarity index 100% rename from src/test/resources/bwk/p/scripts/p.27 rename to src/it/resources/bwk/p/scripts/p.27 diff --git a/src/test/resources/bwk/p/scripts/p.28 b/src/it/resources/bwk/p/scripts/p.28 similarity index 100% rename from src/test/resources/bwk/p/scripts/p.28 rename to src/it/resources/bwk/p/scripts/p.28 diff --git a/src/test/resources/bwk/p/scripts/p.29 b/src/it/resources/bwk/p/scripts/p.29 similarity index 100% rename from src/test/resources/bwk/p/scripts/p.29 rename to src/it/resources/bwk/p/scripts/p.29 diff --git a/src/test/resources/bwk/p/scripts/p.3 b/src/it/resources/bwk/p/scripts/p.3 similarity index 100% rename from src/test/resources/bwk/p/scripts/p.3 rename to src/it/resources/bwk/p/scripts/p.3 diff --git a/src/test/resources/bwk/p/scripts/p.30 b/src/it/resources/bwk/p/scripts/p.30 similarity index 100% rename from src/test/resources/bwk/p/scripts/p.30 rename to src/it/resources/bwk/p/scripts/p.30 diff --git a/src/test/resources/bwk/p/scripts/p.31 b/src/it/resources/bwk/p/scripts/p.31 similarity index 100% rename from src/test/resources/bwk/p/scripts/p.31 rename to src/it/resources/bwk/p/scripts/p.31 diff --git a/src/test/resources/bwk/p/scripts/p.32 b/src/it/resources/bwk/p/scripts/p.32 similarity index 100% rename from src/test/resources/bwk/p/scripts/p.32 rename to src/it/resources/bwk/p/scripts/p.32 diff --git a/src/test/resources/bwk/p/scripts/p.33 b/src/it/resources/bwk/p/scripts/p.33 similarity index 100% rename from src/test/resources/bwk/p/scripts/p.33 rename to src/it/resources/bwk/p/scripts/p.33 diff --git a/src/test/resources/bwk/p/scripts/p.34 b/src/it/resources/bwk/p/scripts/p.34 similarity index 100% rename from src/test/resources/bwk/p/scripts/p.34 rename to src/it/resources/bwk/p/scripts/p.34 diff --git a/src/test/resources/bwk/p/scripts/p.35 b/src/it/resources/bwk/p/scripts/p.35 similarity index 100% rename from src/test/resources/bwk/p/scripts/p.35 rename to src/it/resources/bwk/p/scripts/p.35 diff --git a/src/test/resources/bwk/p/scripts/p.36 b/src/it/resources/bwk/p/scripts/p.36 similarity index 100% rename from src/test/resources/bwk/p/scripts/p.36 rename to src/it/resources/bwk/p/scripts/p.36 diff --git a/src/test/resources/bwk/p/scripts/p.37 b/src/it/resources/bwk/p/scripts/p.37 similarity index 100% rename from src/test/resources/bwk/p/scripts/p.37 rename to src/it/resources/bwk/p/scripts/p.37 diff --git a/src/test/resources/bwk/p/scripts/p.38 b/src/it/resources/bwk/p/scripts/p.38 similarity index 100% rename from src/test/resources/bwk/p/scripts/p.38 rename to src/it/resources/bwk/p/scripts/p.38 diff --git a/src/test/resources/bwk/p/scripts/p.39 b/src/it/resources/bwk/p/scripts/p.39 similarity index 100% rename from src/test/resources/bwk/p/scripts/p.39 rename to src/it/resources/bwk/p/scripts/p.39 diff --git a/src/test/resources/bwk/p/scripts/p.4 b/src/it/resources/bwk/p/scripts/p.4 similarity index 100% rename from src/test/resources/bwk/p/scripts/p.4 rename to src/it/resources/bwk/p/scripts/p.4 diff --git a/src/test/resources/bwk/p/scripts/p.40 b/src/it/resources/bwk/p/scripts/p.40 similarity index 100% rename from src/test/resources/bwk/p/scripts/p.40 rename to src/it/resources/bwk/p/scripts/p.40 diff --git a/src/test/resources/bwk/p/scripts/p.41 b/src/it/resources/bwk/p/scripts/p.41 similarity index 100% rename from src/test/resources/bwk/p/scripts/p.41 rename to src/it/resources/bwk/p/scripts/p.41 diff --git a/src/test/resources/bwk/p/scripts/p.42 b/src/it/resources/bwk/p/scripts/p.42 similarity index 100% rename from src/test/resources/bwk/p/scripts/p.42 rename to src/it/resources/bwk/p/scripts/p.42 diff --git a/src/test/resources/bwk/p/scripts/p.43 b/src/it/resources/bwk/p/scripts/p.43 similarity index 100% rename from src/test/resources/bwk/p/scripts/p.43 rename to src/it/resources/bwk/p/scripts/p.43 diff --git a/src/test/resources/bwk/p/scripts/p.44 b/src/it/resources/bwk/p/scripts/p.44 similarity index 100% rename from src/test/resources/bwk/p/scripts/p.44 rename to src/it/resources/bwk/p/scripts/p.44 diff --git a/src/test/resources/bwk/p/scripts/p.45 b/src/it/resources/bwk/p/scripts/p.45 similarity index 100% rename from src/test/resources/bwk/p/scripts/p.45 rename to src/it/resources/bwk/p/scripts/p.45 diff --git a/src/test/resources/bwk/p/scripts/p.46 b/src/it/resources/bwk/p/scripts/p.46 similarity index 100% rename from src/test/resources/bwk/p/scripts/p.46 rename to src/it/resources/bwk/p/scripts/p.46 diff --git a/src/test/resources/bwk/p/scripts/p.47 b/src/it/resources/bwk/p/scripts/p.47 similarity index 100% rename from src/test/resources/bwk/p/scripts/p.47 rename to src/it/resources/bwk/p/scripts/p.47 diff --git a/src/test/resources/bwk/p/scripts/p.48 b/src/it/resources/bwk/p/scripts/p.48 similarity index 100% rename from src/test/resources/bwk/p/scripts/p.48 rename to src/it/resources/bwk/p/scripts/p.48 diff --git a/src/test/resources/bwk/p/scripts/p.48a b/src/it/resources/bwk/p/scripts/p.48a similarity index 100% rename from src/test/resources/bwk/p/scripts/p.48a rename to src/it/resources/bwk/p/scripts/p.48a diff --git a/src/test/resources/bwk/p/scripts/p.49 b/src/it/resources/bwk/p/scripts/p.49 similarity index 100% rename from src/test/resources/bwk/p/scripts/p.49 rename to src/it/resources/bwk/p/scripts/p.49 diff --git a/src/test/resources/bwk/p/scripts/p.5 b/src/it/resources/bwk/p/scripts/p.5 similarity index 100% rename from src/test/resources/bwk/p/scripts/p.5 rename to src/it/resources/bwk/p/scripts/p.5 diff --git a/src/test/resources/bwk/p/scripts/p.50 b/src/it/resources/bwk/p/scripts/p.50 similarity index 100% rename from src/test/resources/bwk/p/scripts/p.50 rename to src/it/resources/bwk/p/scripts/p.50 diff --git a/src/test/resources/bwk/p/scripts/p.51 b/src/it/resources/bwk/p/scripts/p.51 similarity index 100% rename from src/test/resources/bwk/p/scripts/p.51 rename to src/it/resources/bwk/p/scripts/p.51 diff --git a/src/test/resources/bwk/p/scripts/p.52 b/src/it/resources/bwk/p/scripts/p.52 similarity index 100% rename from src/test/resources/bwk/p/scripts/p.52 rename to src/it/resources/bwk/p/scripts/p.52 diff --git a/src/test/resources/bwk/p/scripts/p.5a b/src/it/resources/bwk/p/scripts/p.5a similarity index 100% rename from src/test/resources/bwk/p/scripts/p.5a rename to src/it/resources/bwk/p/scripts/p.5a diff --git a/src/test/resources/bwk/p/scripts/p.6 b/src/it/resources/bwk/p/scripts/p.6 similarity index 100% rename from src/test/resources/bwk/p/scripts/p.6 rename to src/it/resources/bwk/p/scripts/p.6 diff --git a/src/test/resources/bwk/p/scripts/p.7 b/src/it/resources/bwk/p/scripts/p.7 similarity index 100% rename from src/test/resources/bwk/p/scripts/p.7 rename to src/it/resources/bwk/p/scripts/p.7 diff --git a/src/test/resources/bwk/p/scripts/p.8 b/src/it/resources/bwk/p/scripts/p.8 similarity index 100% rename from src/test/resources/bwk/p/scripts/p.8 rename to src/it/resources/bwk/p/scripts/p.8 diff --git a/src/test/resources/bwk/p/scripts/p.9 b/src/it/resources/bwk/p/scripts/p.9 similarity index 100% rename from src/test/resources/bwk/p/scripts/p.9 rename to src/it/resources/bwk/p/scripts/p.9 diff --git a/src/test/resources/bwk/p/scripts/p.table b/src/it/resources/bwk/p/scripts/p.table similarity index 100% rename from src/test/resources/bwk/p/scripts/p.table rename to src/it/resources/bwk/p/scripts/p.table diff --git a/src/test/resources/bwk/t/inputs/test.data b/src/it/resources/bwk/t/inputs/test.data similarity index 100% rename from src/test/resources/bwk/t/inputs/test.data rename to src/it/resources/bwk/t/inputs/test.data diff --git a/src/test/resources/bwk/t/results/t.0.ok b/src/it/resources/bwk/t/results/t.0.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.0.ok rename to src/it/resources/bwk/t/results/t.0.ok diff --git a/src/test/resources/bwk/t/results/t.0a.ok b/src/it/resources/bwk/t/results/t.0a.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.0a.ok rename to src/it/resources/bwk/t/results/t.0a.ok diff --git a/src/test/resources/bwk/t/results/t.1.ok b/src/it/resources/bwk/t/results/t.1.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.1.ok rename to src/it/resources/bwk/t/results/t.1.ok diff --git a/src/test/resources/bwk/t/results/t.1.x.ok b/src/it/resources/bwk/t/results/t.1.x.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.1.x.ok rename to src/it/resources/bwk/t/results/t.1.x.ok diff --git a/src/test/resources/bwk/t/results/t.2.ok b/src/it/resources/bwk/t/results/t.2.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.2.ok rename to src/it/resources/bwk/t/results/t.2.ok diff --git a/src/test/resources/bwk/t/results/t.2.x.ok b/src/it/resources/bwk/t/results/t.2.x.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.2.x.ok rename to src/it/resources/bwk/t/results/t.2.x.ok diff --git a/src/test/resources/bwk/t/results/t.3.ok b/src/it/resources/bwk/t/results/t.3.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.3.ok rename to src/it/resources/bwk/t/results/t.3.ok diff --git a/src/test/resources/bwk/t/results/t.3.x.ok b/src/it/resources/bwk/t/results/t.3.x.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.3.x.ok rename to src/it/resources/bwk/t/results/t.3.x.ok diff --git a/src/test/resources/bwk/t/results/t.4.ok b/src/it/resources/bwk/t/results/t.4.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.4.ok rename to src/it/resources/bwk/t/results/t.4.ok diff --git a/src/test/resources/bwk/t/results/t.4.x.ok b/src/it/resources/bwk/t/results/t.4.x.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.4.x.ok rename to src/it/resources/bwk/t/results/t.4.x.ok diff --git a/src/test/resources/bwk/t/results/t.5.x.ok b/src/it/resources/bwk/t/results/t.5.x.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.5.x.ok rename to src/it/resources/bwk/t/results/t.5.x.ok diff --git a/src/test/resources/bwk/t/results/t.6.ok b/src/it/resources/bwk/t/results/t.6.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.6.ok rename to src/it/resources/bwk/t/results/t.6.ok diff --git a/src/test/resources/bwk/t/results/t.6.x.ok b/src/it/resources/bwk/t/results/t.6.x.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.6.x.ok rename to src/it/resources/bwk/t/results/t.6.x.ok diff --git a/src/test/resources/bwk/t/results/t.6a.ok b/src/it/resources/bwk/t/results/t.6a.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.6a.ok rename to src/it/resources/bwk/t/results/t.6a.ok diff --git a/src/test/resources/bwk/t/results/t.6b.ok b/src/it/resources/bwk/t/results/t.6b.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.6b.ok rename to src/it/resources/bwk/t/results/t.6b.ok diff --git a/src/test/resources/bwk/t/results/t.8.x.ok b/src/it/resources/bwk/t/results/t.8.x.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.8.x.ok rename to src/it/resources/bwk/t/results/t.8.x.ok diff --git a/src/test/resources/bwk/t/results/t.8.y.ok b/src/it/resources/bwk/t/results/t.8.y.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.8.y.ok rename to src/it/resources/bwk/t/results/t.8.y.ok diff --git a/src/test/resources/bwk/t/results/t.NF.ok b/src/it/resources/bwk/t/results/t.NF.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.NF.ok rename to src/it/resources/bwk/t/results/t.NF.ok diff --git a/src/test/resources/bwk/t/results/t.a.ok b/src/it/resources/bwk/t/results/t.a.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.a.ok rename to src/it/resources/bwk/t/results/t.a.ok diff --git a/src/test/resources/bwk/t/results/t.addops.ok b/src/it/resources/bwk/t/results/t.addops.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.addops.ok rename to src/it/resources/bwk/t/results/t.addops.ok diff --git a/src/test/resources/bwk/t/results/t.aeiou.ok b/src/it/resources/bwk/t/results/t.aeiou.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.aeiou.ok rename to src/it/resources/bwk/t/results/t.aeiou.ok diff --git a/src/test/resources/bwk/t/results/t.aeiouy.ok b/src/it/resources/bwk/t/results/t.aeiouy.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.aeiouy.ok rename to src/it/resources/bwk/t/results/t.aeiouy.ok diff --git a/src/test/resources/bwk/t/results/t.arith.ok b/src/it/resources/bwk/t/results/t.arith.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.arith.ok rename to src/it/resources/bwk/t/results/t.arith.ok diff --git a/src/test/resources/bwk/t/results/t.array.ok b/src/it/resources/bwk/t/results/t.array.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.array.ok rename to src/it/resources/bwk/t/results/t.array.ok diff --git a/src/test/resources/bwk/t/results/t.array1.ok b/src/it/resources/bwk/t/results/t.array1.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.array1.ok rename to src/it/resources/bwk/t/results/t.array1.ok diff --git a/src/test/resources/bwk/t/results/t.array2.ok b/src/it/resources/bwk/t/results/t.array2.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.array2.ok rename to src/it/resources/bwk/t/results/t.array2.ok diff --git a/src/test/resources/bwk/t/results/t.assert.ok b/src/it/resources/bwk/t/results/t.assert.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.assert.ok rename to src/it/resources/bwk/t/results/t.assert.ok diff --git a/src/test/resources/bwk/t/results/t.avg.ok b/src/it/resources/bwk/t/results/t.avg.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.avg.ok rename to src/it/resources/bwk/t/results/t.avg.ok diff --git a/src/test/resources/bwk/t/results/t.b.x.ok b/src/it/resources/bwk/t/results/t.b.x.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.b.x.ok rename to src/it/resources/bwk/t/results/t.b.x.ok diff --git a/src/test/resources/bwk/t/results/t.be.ok b/src/it/resources/bwk/t/results/t.be.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.be.ok rename to src/it/resources/bwk/t/results/t.be.ok diff --git a/src/test/resources/bwk/t/results/t.beginexit.ok b/src/it/resources/bwk/t/results/t.beginexit.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.beginexit.ok rename to src/it/resources/bwk/t/results/t.beginexit.ok diff --git a/src/test/resources/bwk/t/results/t.beginnext.ok b/src/it/resources/bwk/t/results/t.beginnext.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.beginnext.ok rename to src/it/resources/bwk/t/results/t.beginnext.ok diff --git a/src/test/resources/bwk/t/results/t.break.ok b/src/it/resources/bwk/t/results/t.break.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.break.ok rename to src/it/resources/bwk/t/results/t.break.ok diff --git a/src/test/resources/bwk/t/results/t.break1.ok b/src/it/resources/bwk/t/results/t.break1.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.break1.ok rename to src/it/resources/bwk/t/results/t.break1.ok diff --git a/src/test/resources/bwk/t/results/t.break2.ok b/src/it/resources/bwk/t/results/t.break2.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.break2.ok rename to src/it/resources/bwk/t/results/t.break2.ok diff --git a/src/test/resources/bwk/t/results/t.break3.ok b/src/it/resources/bwk/t/results/t.break3.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.break3.ok rename to src/it/resources/bwk/t/results/t.break3.ok diff --git a/src/test/resources/bwk/t/results/t.bug1.ok b/src/it/resources/bwk/t/results/t.bug1.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.bug1.ok rename to src/it/resources/bwk/t/results/t.bug1.ok diff --git a/src/test/resources/bwk/t/results/t.builtins.ok b/src/it/resources/bwk/t/results/t.builtins.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.builtins.ok rename to src/it/resources/bwk/t/results/t.builtins.ok diff --git a/src/test/resources/bwk/t/results/t.cat.ok b/src/it/resources/bwk/t/results/t.cat.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.cat.ok rename to src/it/resources/bwk/t/results/t.cat.ok diff --git a/src/test/resources/bwk/t/results/t.cat1.ok b/src/it/resources/bwk/t/results/t.cat1.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.cat1.ok rename to src/it/resources/bwk/t/results/t.cat1.ok diff --git a/src/test/resources/bwk/t/results/t.cat2.ok b/src/it/resources/bwk/t/results/t.cat2.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.cat2.ok rename to src/it/resources/bwk/t/results/t.cat2.ok diff --git a/src/test/resources/bwk/t/results/t.cmp.ok b/src/it/resources/bwk/t/results/t.cmp.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.cmp.ok rename to src/it/resources/bwk/t/results/t.cmp.ok diff --git a/src/test/resources/bwk/t/results/t.coerce.ok b/src/it/resources/bwk/t/results/t.coerce.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.coerce.ok rename to src/it/resources/bwk/t/results/t.coerce.ok diff --git a/src/test/resources/bwk/t/results/t.coerce2.ok b/src/it/resources/bwk/t/results/t.coerce2.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.coerce2.ok rename to src/it/resources/bwk/t/results/t.coerce2.ok diff --git a/src/test/resources/bwk/t/results/t.comment.ok b/src/it/resources/bwk/t/results/t.comment.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.comment.ok rename to src/it/resources/bwk/t/results/t.comment.ok diff --git a/src/test/resources/bwk/t/results/t.comment1.ok b/src/it/resources/bwk/t/results/t.comment1.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.comment1.ok rename to src/it/resources/bwk/t/results/t.comment1.ok diff --git a/src/test/resources/bwk/t/results/t.concat.ok b/src/it/resources/bwk/t/results/t.concat.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.concat.ok rename to src/it/resources/bwk/t/results/t.concat.ok diff --git a/src/test/resources/bwk/t/results/t.cond.ok b/src/it/resources/bwk/t/results/t.cond.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.cond.ok rename to src/it/resources/bwk/t/results/t.cond.ok diff --git a/src/test/resources/bwk/t/results/t.contin.ok b/src/it/resources/bwk/t/results/t.contin.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.contin.ok rename to src/it/resources/bwk/t/results/t.contin.ok diff --git a/src/test/resources/bwk/t/results/t.count.ok b/src/it/resources/bwk/t/results/t.count.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.count.ok rename to src/it/resources/bwk/t/results/t.count.ok diff --git a/src/test/resources/bwk/t/results/t.crlf.ok b/src/it/resources/bwk/t/results/t.crlf.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.crlf.ok rename to src/it/resources/bwk/t/results/t.crlf.ok diff --git a/src/test/resources/bwk/t/results/t.cum.ok b/src/it/resources/bwk/t/results/t.cum.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.cum.ok rename to src/it/resources/bwk/t/results/t.cum.ok diff --git a/src/test/resources/bwk/t/results/t.d.x.ok b/src/it/resources/bwk/t/results/t.d.x.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.d.x.ok rename to src/it/resources/bwk/t/results/t.d.x.ok diff --git a/src/test/resources/bwk/t/results/t.delete0.ok b/src/it/resources/bwk/t/results/t.delete0.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.delete0.ok rename to src/it/resources/bwk/t/results/t.delete0.ok diff --git a/src/test/resources/bwk/t/results/t.delete1.ok b/src/it/resources/bwk/t/results/t.delete1.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.delete1.ok rename to src/it/resources/bwk/t/results/t.delete1.ok diff --git a/src/test/resources/bwk/t/results/t.delete2.ok b/src/it/resources/bwk/t/results/t.delete2.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.delete2.ok rename to src/it/resources/bwk/t/results/t.delete2.ok diff --git a/src/test/resources/bwk/t/results/t.delete3.ok b/src/it/resources/bwk/t/results/t.delete3.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.delete3.ok rename to src/it/resources/bwk/t/results/t.delete3.ok diff --git a/src/test/resources/bwk/t/results/t.do.ok b/src/it/resources/bwk/t/results/t.do.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.do.ok rename to src/it/resources/bwk/t/results/t.do.ok diff --git a/src/test/resources/bwk/t/results/t.e.ok b/src/it/resources/bwk/t/results/t.e.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.e.ok rename to src/it/resources/bwk/t/results/t.e.ok diff --git a/src/test/resources/bwk/t/results/t.else.ok b/src/it/resources/bwk/t/results/t.else.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.else.ok rename to src/it/resources/bwk/t/results/t.else.ok diff --git a/src/test/resources/bwk/t/results/t.exit.ok b/src/it/resources/bwk/t/results/t.exit.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.exit.ok rename to src/it/resources/bwk/t/results/t.exit.ok diff --git a/src/test/resources/bwk/t/results/t.exit1.ok b/src/it/resources/bwk/t/results/t.exit1.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.exit1.ok rename to src/it/resources/bwk/t/results/t.exit1.ok diff --git a/src/test/resources/bwk/t/results/t.f.ok b/src/it/resources/bwk/t/results/t.f.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.f.ok rename to src/it/resources/bwk/t/results/t.f.ok diff --git a/src/test/resources/bwk/t/results/t.f.x.ok b/src/it/resources/bwk/t/results/t.f.x.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.f.x.ok rename to src/it/resources/bwk/t/results/t.f.x.ok diff --git a/src/test/resources/bwk/t/results/t.f0.ok b/src/it/resources/bwk/t/results/t.f0.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.f0.ok rename to src/it/resources/bwk/t/results/t.f0.ok diff --git a/src/test/resources/bwk/t/results/t.f1.ok b/src/it/resources/bwk/t/results/t.f1.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.f1.ok rename to src/it/resources/bwk/t/results/t.f1.ok diff --git a/src/test/resources/bwk/t/results/t.f2.ok b/src/it/resources/bwk/t/results/t.f2.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.f2.ok rename to src/it/resources/bwk/t/results/t.f2.ok diff --git a/src/test/resources/bwk/t/results/t.f3.ok b/src/it/resources/bwk/t/results/t.f3.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.f3.ok rename to src/it/resources/bwk/t/results/t.f3.ok diff --git a/src/test/resources/bwk/t/results/t.f4.ok b/src/it/resources/bwk/t/results/t.f4.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.f4.ok rename to src/it/resources/bwk/t/results/t.f4.ok diff --git a/src/test/resources/bwk/t/results/t.for.ok b/src/it/resources/bwk/t/results/t.for.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.for.ok rename to src/it/resources/bwk/t/results/t.for.ok diff --git a/src/test/resources/bwk/t/results/t.for1.ok b/src/it/resources/bwk/t/results/t.for1.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.for1.ok rename to src/it/resources/bwk/t/results/t.for1.ok diff --git a/src/test/resources/bwk/t/results/t.for2.ok b/src/it/resources/bwk/t/results/t.for2.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.for2.ok rename to src/it/resources/bwk/t/results/t.for2.ok diff --git a/src/test/resources/bwk/t/results/t.for3.ok b/src/it/resources/bwk/t/results/t.for3.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.for3.ok rename to src/it/resources/bwk/t/results/t.for3.ok diff --git a/src/test/resources/bwk/t/results/t.format4.ok b/src/it/resources/bwk/t/results/t.format4.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.format4.ok rename to src/it/resources/bwk/t/results/t.format4.ok diff --git a/src/test/resources/bwk/t/results/t.fun.ok b/src/it/resources/bwk/t/results/t.fun.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.fun.ok rename to src/it/resources/bwk/t/results/t.fun.ok diff --git a/src/test/resources/bwk/t/results/t.fun0.ok b/src/it/resources/bwk/t/results/t.fun0.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.fun0.ok rename to src/it/resources/bwk/t/results/t.fun0.ok diff --git a/src/test/resources/bwk/t/results/t.fun1.ok b/src/it/resources/bwk/t/results/t.fun1.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.fun1.ok rename to src/it/resources/bwk/t/results/t.fun1.ok diff --git a/src/test/resources/bwk/t/results/t.fun2.ok b/src/it/resources/bwk/t/results/t.fun2.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.fun2.ok rename to src/it/resources/bwk/t/results/t.fun2.ok diff --git a/src/test/resources/bwk/t/results/t.fun3.ok b/src/it/resources/bwk/t/results/t.fun3.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.fun3.ok rename to src/it/resources/bwk/t/results/t.fun3.ok diff --git a/src/test/resources/bwk/t/results/t.fun4.ok b/src/it/resources/bwk/t/results/t.fun4.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.fun4.ok rename to src/it/resources/bwk/t/results/t.fun4.ok diff --git a/src/test/resources/bwk/t/results/t.fun5.ok b/src/it/resources/bwk/t/results/t.fun5.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.fun5.ok rename to src/it/resources/bwk/t/results/t.fun5.ok diff --git a/src/test/resources/bwk/t/results/t.getline1.ok b/src/it/resources/bwk/t/results/t.getline1.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.getline1.ok rename to src/it/resources/bwk/t/results/t.getline1.ok diff --git a/src/test/resources/bwk/t/results/t.getval.ok b/src/it/resources/bwk/t/results/t.getval.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.getval.ok rename to src/it/resources/bwk/t/results/t.getval.ok diff --git a/src/test/resources/bwk/t/results/t.gsub.ok b/src/it/resources/bwk/t/results/t.gsub.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.gsub.ok rename to src/it/resources/bwk/t/results/t.gsub.ok diff --git a/src/test/resources/bwk/t/results/t.gsub1.ok b/src/it/resources/bwk/t/results/t.gsub1.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.gsub1.ok rename to src/it/resources/bwk/t/results/t.gsub1.ok diff --git a/src/test/resources/bwk/t/results/t.gsub3.ok b/src/it/resources/bwk/t/results/t.gsub3.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.gsub3.ok rename to src/it/resources/bwk/t/results/t.gsub3.ok diff --git a/src/test/resources/bwk/t/results/t.gsub4.ok b/src/it/resources/bwk/t/results/t.gsub4.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.gsub4.ok rename to src/it/resources/bwk/t/results/t.gsub4.ok diff --git a/src/test/resources/bwk/t/results/t.i.x.ok b/src/it/resources/bwk/t/results/t.i.x.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.i.x.ok rename to src/it/resources/bwk/t/results/t.i.x.ok diff --git a/src/test/resources/bwk/t/results/t.if.ok b/src/it/resources/bwk/t/results/t.if.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.if.ok rename to src/it/resources/bwk/t/results/t.if.ok diff --git a/src/test/resources/bwk/t/results/t.in.ok b/src/it/resources/bwk/t/results/t.in.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.in.ok rename to src/it/resources/bwk/t/results/t.in.ok diff --git a/src/test/resources/bwk/t/results/t.in1.ok b/src/it/resources/bwk/t/results/t.in1.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.in1.ok rename to src/it/resources/bwk/t/results/t.in1.ok diff --git a/src/test/resources/bwk/t/results/t.in2.ok b/src/it/resources/bwk/t/results/t.in2.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.in2.ok rename to src/it/resources/bwk/t/results/t.in2.ok diff --git a/src/test/resources/bwk/t/results/t.in3.ok b/src/it/resources/bwk/t/results/t.in3.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.in3.ok rename to src/it/resources/bwk/t/results/t.in3.ok diff --git a/src/test/resources/bwk/t/results/t.incr.ok b/src/it/resources/bwk/t/results/t.incr.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.incr.ok rename to src/it/resources/bwk/t/results/t.incr.ok diff --git a/src/test/resources/bwk/t/results/t.incr2.ok b/src/it/resources/bwk/t/results/t.incr2.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.incr2.ok rename to src/it/resources/bwk/t/results/t.incr2.ok diff --git a/src/test/resources/bwk/t/results/t.incr3.ok b/src/it/resources/bwk/t/results/t.incr3.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.incr3.ok rename to src/it/resources/bwk/t/results/t.incr3.ok diff --git a/src/test/resources/bwk/t/results/t.index.ok b/src/it/resources/bwk/t/results/t.index.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.index.ok rename to src/it/resources/bwk/t/results/t.index.ok diff --git a/src/test/resources/bwk/t/results/t.intest.ok b/src/it/resources/bwk/t/results/t.intest.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.intest.ok rename to src/it/resources/bwk/t/results/t.intest.ok diff --git a/src/test/resources/bwk/t/results/t.intest2.ok b/src/it/resources/bwk/t/results/t.intest2.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.intest2.ok rename to src/it/resources/bwk/t/results/t.intest2.ok diff --git a/src/test/resources/bwk/t/results/t.j.x.ok b/src/it/resources/bwk/t/results/t.j.x.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.j.x.ok rename to src/it/resources/bwk/t/results/t.j.x.ok diff --git a/src/test/resources/bwk/t/results/t.longstr.ok b/src/it/resources/bwk/t/results/t.longstr.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.longstr.ok rename to src/it/resources/bwk/t/results/t.longstr.ok diff --git a/src/test/resources/bwk/t/results/t.makef.ok b/src/it/resources/bwk/t/results/t.makef.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.makef.ok rename to src/it/resources/bwk/t/results/t.makef.ok diff --git a/src/test/resources/bwk/t/results/t.match.ok b/src/it/resources/bwk/t/results/t.match.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.match.ok rename to src/it/resources/bwk/t/results/t.match.ok diff --git a/src/test/resources/bwk/t/results/t.match1.ok b/src/it/resources/bwk/t/results/t.match1.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.match1.ok rename to src/it/resources/bwk/t/results/t.match1.ok diff --git a/src/test/resources/bwk/t/results/t.max.ok b/src/it/resources/bwk/t/results/t.max.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.max.ok rename to src/it/resources/bwk/t/results/t.max.ok diff --git a/src/test/resources/bwk/t/results/t.mod.ok b/src/it/resources/bwk/t/results/t.mod.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.mod.ok rename to src/it/resources/bwk/t/results/t.mod.ok diff --git a/src/test/resources/bwk/t/results/t.monotone.ok b/src/it/resources/bwk/t/results/t.monotone.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.monotone.ok rename to src/it/resources/bwk/t/results/t.monotone.ok diff --git a/src/test/resources/bwk/t/results/t.nameval.ok b/src/it/resources/bwk/t/results/t.nameval.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.nameval.ok rename to src/it/resources/bwk/t/results/t.nameval.ok diff --git a/src/test/resources/bwk/t/results/t.next.ok b/src/it/resources/bwk/t/results/t.next.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.next.ok rename to src/it/resources/bwk/t/results/t.next.ok diff --git a/src/test/resources/bwk/t/results/t.not.ok b/src/it/resources/bwk/t/results/t.not.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.not.ok rename to src/it/resources/bwk/t/results/t.not.ok diff --git a/src/test/resources/bwk/t/results/t.null0.ok b/src/it/resources/bwk/t/results/t.null0.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.null0.ok rename to src/it/resources/bwk/t/results/t.null0.ok diff --git a/src/test/resources/bwk/t/results/t.ofmt.ok b/src/it/resources/bwk/t/results/t.ofmt.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.ofmt.ok rename to src/it/resources/bwk/t/results/t.ofmt.ok diff --git a/src/test/resources/bwk/t/results/t.ofs.ok b/src/it/resources/bwk/t/results/t.ofs.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.ofs.ok rename to src/it/resources/bwk/t/results/t.ofs.ok diff --git a/src/test/resources/bwk/t/results/t.ors.ok b/src/it/resources/bwk/t/results/t.ors.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.ors.ok rename to src/it/resources/bwk/t/results/t.ors.ok diff --git a/src/test/resources/bwk/t/results/t.pat.ok b/src/it/resources/bwk/t/results/t.pat.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.pat.ok rename to src/it/resources/bwk/t/results/t.pat.ok diff --git a/src/test/resources/bwk/t/results/t.pipe.ok b/src/it/resources/bwk/t/results/t.pipe.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.pipe.ok rename to src/it/resources/bwk/t/results/t.pipe.ok diff --git a/src/test/resources/bwk/t/results/t.pp.ok b/src/it/resources/bwk/t/results/t.pp.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.pp.ok rename to src/it/resources/bwk/t/results/t.pp.ok diff --git a/src/test/resources/bwk/t/results/t.pp1.ok b/src/it/resources/bwk/t/results/t.pp1.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.pp1.ok rename to src/it/resources/bwk/t/results/t.pp1.ok diff --git a/src/test/resources/bwk/t/results/t.pp2.ok b/src/it/resources/bwk/t/results/t.pp2.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.pp2.ok rename to src/it/resources/bwk/t/results/t.pp2.ok diff --git a/src/test/resources/bwk/t/results/t.printf.ok b/src/it/resources/bwk/t/results/t.printf.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.printf.ok rename to src/it/resources/bwk/t/results/t.printf.ok diff --git a/src/test/resources/bwk/t/results/t.printf2.ok b/src/it/resources/bwk/t/results/t.printf2.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.printf2.ok rename to src/it/resources/bwk/t/results/t.printf2.ok diff --git a/src/test/resources/bwk/t/results/t.quote.ok b/src/it/resources/bwk/t/results/t.quote.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.quote.ok rename to src/it/resources/bwk/t/results/t.quote.ok diff --git a/src/test/resources/bwk/t/results/t.randk.ok b/src/it/resources/bwk/t/results/t.randk.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.randk.ok rename to src/it/resources/bwk/t/results/t.randk.ok diff --git a/src/test/resources/bwk/t/results/t.re1.ok b/src/it/resources/bwk/t/results/t.re1.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.re1.ok rename to src/it/resources/bwk/t/results/t.re1.ok diff --git a/src/test/resources/bwk/t/results/t.re1a.ok b/src/it/resources/bwk/t/results/t.re1a.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.re1a.ok rename to src/it/resources/bwk/t/results/t.re1a.ok diff --git a/src/test/resources/bwk/t/results/t.re2.ok b/src/it/resources/bwk/t/results/t.re2.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.re2.ok rename to src/it/resources/bwk/t/results/t.re2.ok diff --git a/src/test/resources/bwk/t/results/t.re3.ok b/src/it/resources/bwk/t/results/t.re3.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.re3.ok rename to src/it/resources/bwk/t/results/t.re3.ok diff --git a/src/test/resources/bwk/t/results/t.re4.ok b/src/it/resources/bwk/t/results/t.re4.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.re4.ok rename to src/it/resources/bwk/t/results/t.re4.ok diff --git a/src/test/resources/bwk/t/results/t.re5.ok b/src/it/resources/bwk/t/results/t.re5.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.re5.ok rename to src/it/resources/bwk/t/results/t.re5.ok diff --git a/src/test/resources/bwk/t/results/t.re7.ok b/src/it/resources/bwk/t/results/t.re7.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.re7.ok rename to src/it/resources/bwk/t/results/t.re7.ok diff --git a/src/test/resources/bwk/t/results/t.reFS.ok b/src/it/resources/bwk/t/results/t.reFS.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.reFS.ok rename to src/it/resources/bwk/t/results/t.reFS.ok diff --git a/src/test/resources/bwk/t/results/t.rec.ok b/src/it/resources/bwk/t/results/t.rec.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.rec.ok rename to src/it/resources/bwk/t/results/t.rec.ok diff --git a/src/test/resources/bwk/t/results/t.redir1.ok b/src/it/resources/bwk/t/results/t.redir1.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.redir1.ok rename to src/it/resources/bwk/t/results/t.redir1.ok diff --git a/src/test/resources/bwk/t/results/t.reg.ok b/src/it/resources/bwk/t/results/t.reg.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.reg.ok rename to src/it/resources/bwk/t/results/t.reg.ok diff --git a/src/test/resources/bwk/t/results/t.roff.ok b/src/it/resources/bwk/t/results/t.roff.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.roff.ok rename to src/it/resources/bwk/t/results/t.roff.ok diff --git a/src/test/resources/bwk/t/results/t.sep.ok b/src/it/resources/bwk/t/results/t.sep.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.sep.ok rename to src/it/resources/bwk/t/results/t.sep.ok diff --git a/src/test/resources/bwk/t/results/t.seqno.ok b/src/it/resources/bwk/t/results/t.seqno.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.seqno.ok rename to src/it/resources/bwk/t/results/t.seqno.ok diff --git a/src/test/resources/bwk/t/results/t.set0.ok b/src/it/resources/bwk/t/results/t.set0.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.set0.ok rename to src/it/resources/bwk/t/results/t.set0.ok diff --git a/src/test/resources/bwk/t/results/t.set0a.ok b/src/it/resources/bwk/t/results/t.set0a.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.set0a.ok rename to src/it/resources/bwk/t/results/t.set0a.ok diff --git a/src/test/resources/bwk/t/results/t.set0b.ok b/src/it/resources/bwk/t/results/t.set0b.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.set0b.ok rename to src/it/resources/bwk/t/results/t.set0b.ok diff --git a/src/test/resources/bwk/t/results/t.set1.ok b/src/it/resources/bwk/t/results/t.set1.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.set1.ok rename to src/it/resources/bwk/t/results/t.set1.ok diff --git a/src/test/resources/bwk/t/results/t.set2.ok b/src/it/resources/bwk/t/results/t.set2.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.set2.ok rename to src/it/resources/bwk/t/results/t.set2.ok diff --git a/src/test/resources/bwk/t/results/t.set3.ok b/src/it/resources/bwk/t/results/t.set3.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.set3.ok rename to src/it/resources/bwk/t/results/t.set3.ok diff --git a/src/test/resources/bwk/t/results/t.split1.ok b/src/it/resources/bwk/t/results/t.split1.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.split1.ok rename to src/it/resources/bwk/t/results/t.split1.ok diff --git a/src/test/resources/bwk/t/results/t.split2.ok b/src/it/resources/bwk/t/results/t.split2.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.split2.ok rename to src/it/resources/bwk/t/results/t.split2.ok diff --git a/src/test/resources/bwk/t/results/t.split2a.ok b/src/it/resources/bwk/t/results/t.split2a.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.split2a.ok rename to src/it/resources/bwk/t/results/t.split2a.ok diff --git a/src/test/resources/bwk/t/results/t.split3.ok b/src/it/resources/bwk/t/results/t.split3.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.split3.ok rename to src/it/resources/bwk/t/results/t.split3.ok diff --git a/src/test/resources/bwk/t/results/t.split4.ok b/src/it/resources/bwk/t/results/t.split4.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.split4.ok rename to src/it/resources/bwk/t/results/t.split4.ok diff --git a/src/test/resources/bwk/t/results/t.split8.ok b/src/it/resources/bwk/t/results/t.split8.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.split8.ok rename to src/it/resources/bwk/t/results/t.split8.ok diff --git a/src/test/resources/bwk/t/results/t.split9.ok b/src/it/resources/bwk/t/results/t.split9.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.split9.ok rename to src/it/resources/bwk/t/results/t.split9.ok diff --git a/src/test/resources/bwk/t/results/t.split9a.ok b/src/it/resources/bwk/t/results/t.split9a.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.split9a.ok rename to src/it/resources/bwk/t/results/t.split9a.ok diff --git a/src/test/resources/bwk/t/results/t.stately.ok b/src/it/resources/bwk/t/results/t.stately.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.stately.ok rename to src/it/resources/bwk/t/results/t.stately.ok diff --git a/src/test/resources/bwk/t/results/t.strcmp.ok b/src/it/resources/bwk/t/results/t.strcmp.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.strcmp.ok rename to src/it/resources/bwk/t/results/t.strcmp.ok diff --git a/src/test/resources/bwk/t/results/t.strcmp1.ok b/src/it/resources/bwk/t/results/t.strcmp1.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.strcmp1.ok rename to src/it/resources/bwk/t/results/t.strcmp1.ok diff --git a/src/test/resources/bwk/t/results/t.strnum.ok b/src/it/resources/bwk/t/results/t.strnum.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.strnum.ok rename to src/it/resources/bwk/t/results/t.strnum.ok diff --git a/src/test/resources/bwk/t/results/t.sub0.ok b/src/it/resources/bwk/t/results/t.sub0.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.sub0.ok rename to src/it/resources/bwk/t/results/t.sub0.ok diff --git a/src/test/resources/bwk/t/results/t.sub1.ok b/src/it/resources/bwk/t/results/t.sub1.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.sub1.ok rename to src/it/resources/bwk/t/results/t.sub1.ok diff --git a/src/test/resources/bwk/t/results/t.sub2.ok b/src/it/resources/bwk/t/results/t.sub2.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.sub2.ok rename to src/it/resources/bwk/t/results/t.sub2.ok diff --git a/src/test/resources/bwk/t/results/t.sub3.ok b/src/it/resources/bwk/t/results/t.sub3.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.sub3.ok rename to src/it/resources/bwk/t/results/t.sub3.ok diff --git a/src/test/resources/bwk/t/results/t.substr.ok b/src/it/resources/bwk/t/results/t.substr.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.substr.ok rename to src/it/resources/bwk/t/results/t.substr.ok diff --git a/src/test/resources/bwk/t/results/t.substr1.ok b/src/it/resources/bwk/t/results/t.substr1.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.substr1.ok rename to src/it/resources/bwk/t/results/t.substr1.ok diff --git a/src/test/resources/bwk/t/results/t.time.ok b/src/it/resources/bwk/t/results/t.time.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.time.ok rename to src/it/resources/bwk/t/results/t.time.ok diff --git a/src/test/resources/bwk/t/results/t.vf.ok b/src/it/resources/bwk/t/results/t.vf.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.vf.ok rename to src/it/resources/bwk/t/results/t.vf.ok diff --git a/src/test/resources/bwk/t/results/t.vf1.ok b/src/it/resources/bwk/t/results/t.vf1.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.vf1.ok rename to src/it/resources/bwk/t/results/t.vf1.ok diff --git a/src/test/resources/bwk/t/results/t.vf2.ok b/src/it/resources/bwk/t/results/t.vf2.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.vf2.ok rename to src/it/resources/bwk/t/results/t.vf2.ok diff --git a/src/test/resources/bwk/t/results/t.vf3.ok b/src/it/resources/bwk/t/results/t.vf3.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.vf3.ok rename to src/it/resources/bwk/t/results/t.vf3.ok diff --git a/src/test/resources/bwk/t/results/t.x.ok b/src/it/resources/bwk/t/results/t.x.ok similarity index 100% rename from src/test/resources/bwk/t/results/t.x.ok rename to src/it/resources/bwk/t/results/t.x.ok diff --git a/src/test/resources/bwk/t/scripts/t.0 b/src/it/resources/bwk/t/scripts/t.0 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.0 rename to src/it/resources/bwk/t/scripts/t.0 diff --git a/src/test/resources/bwk/t/scripts/t.0a b/src/it/resources/bwk/t/scripts/t.0a similarity index 100% rename from src/test/resources/bwk/t/scripts/t.0a rename to src/it/resources/bwk/t/scripts/t.0a diff --git a/src/test/resources/bwk/t/scripts/t.1 b/src/it/resources/bwk/t/scripts/t.1 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.1 rename to src/it/resources/bwk/t/scripts/t.1 diff --git a/src/test/resources/bwk/t/scripts/t.1.x b/src/it/resources/bwk/t/scripts/t.1.x similarity index 100% rename from src/test/resources/bwk/t/scripts/t.1.x rename to src/it/resources/bwk/t/scripts/t.1.x diff --git a/src/test/resources/bwk/t/scripts/t.2 b/src/it/resources/bwk/t/scripts/t.2 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.2 rename to src/it/resources/bwk/t/scripts/t.2 diff --git a/src/test/resources/bwk/t/scripts/t.2.x b/src/it/resources/bwk/t/scripts/t.2.x similarity index 100% rename from src/test/resources/bwk/t/scripts/t.2.x rename to src/it/resources/bwk/t/scripts/t.2.x diff --git a/src/test/resources/bwk/t/scripts/t.3 b/src/it/resources/bwk/t/scripts/t.3 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.3 rename to src/it/resources/bwk/t/scripts/t.3 diff --git a/src/test/resources/bwk/t/scripts/t.3.x b/src/it/resources/bwk/t/scripts/t.3.x similarity index 100% rename from src/test/resources/bwk/t/scripts/t.3.x rename to src/it/resources/bwk/t/scripts/t.3.x diff --git a/src/test/resources/bwk/t/scripts/t.4 b/src/it/resources/bwk/t/scripts/t.4 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.4 rename to src/it/resources/bwk/t/scripts/t.4 diff --git a/src/test/resources/bwk/t/scripts/t.4.x b/src/it/resources/bwk/t/scripts/t.4.x similarity index 100% rename from src/test/resources/bwk/t/scripts/t.4.x rename to src/it/resources/bwk/t/scripts/t.4.x diff --git a/src/test/resources/bwk/t/scripts/t.5.x b/src/it/resources/bwk/t/scripts/t.5.x similarity index 100% rename from src/test/resources/bwk/t/scripts/t.5.x rename to src/it/resources/bwk/t/scripts/t.5.x diff --git a/src/test/resources/bwk/t/scripts/t.6 b/src/it/resources/bwk/t/scripts/t.6 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.6 rename to src/it/resources/bwk/t/scripts/t.6 diff --git a/src/test/resources/bwk/t/scripts/t.6.x b/src/it/resources/bwk/t/scripts/t.6.x similarity index 100% rename from src/test/resources/bwk/t/scripts/t.6.x rename to src/it/resources/bwk/t/scripts/t.6.x diff --git a/src/test/resources/bwk/t/scripts/t.6a b/src/it/resources/bwk/t/scripts/t.6a similarity index 100% rename from src/test/resources/bwk/t/scripts/t.6a rename to src/it/resources/bwk/t/scripts/t.6a diff --git a/src/test/resources/bwk/t/scripts/t.6b b/src/it/resources/bwk/t/scripts/t.6b similarity index 100% rename from src/test/resources/bwk/t/scripts/t.6b rename to src/it/resources/bwk/t/scripts/t.6b diff --git a/src/test/resources/bwk/t/scripts/t.8.x b/src/it/resources/bwk/t/scripts/t.8.x similarity index 100% rename from src/test/resources/bwk/t/scripts/t.8.x rename to src/it/resources/bwk/t/scripts/t.8.x diff --git a/src/test/resources/bwk/t/scripts/t.8.y b/src/it/resources/bwk/t/scripts/t.8.y similarity index 100% rename from src/test/resources/bwk/t/scripts/t.8.y rename to src/it/resources/bwk/t/scripts/t.8.y diff --git a/src/test/resources/bwk/t/scripts/t.NF b/src/it/resources/bwk/t/scripts/t.NF similarity index 100% rename from src/test/resources/bwk/t/scripts/t.NF rename to src/it/resources/bwk/t/scripts/t.NF diff --git a/src/test/resources/bwk/t/scripts/t.a b/src/it/resources/bwk/t/scripts/t.a similarity index 100% rename from src/test/resources/bwk/t/scripts/t.a rename to src/it/resources/bwk/t/scripts/t.a diff --git a/src/test/resources/bwk/t/scripts/t.addops b/src/it/resources/bwk/t/scripts/t.addops similarity index 100% rename from src/test/resources/bwk/t/scripts/t.addops rename to src/it/resources/bwk/t/scripts/t.addops diff --git a/src/test/resources/bwk/t/scripts/t.aeiou b/src/it/resources/bwk/t/scripts/t.aeiou similarity index 100% rename from src/test/resources/bwk/t/scripts/t.aeiou rename to src/it/resources/bwk/t/scripts/t.aeiou diff --git a/src/test/resources/bwk/t/scripts/t.aeiouy b/src/it/resources/bwk/t/scripts/t.aeiouy similarity index 100% rename from src/test/resources/bwk/t/scripts/t.aeiouy rename to src/it/resources/bwk/t/scripts/t.aeiouy diff --git a/src/test/resources/bwk/t/scripts/t.arith b/src/it/resources/bwk/t/scripts/t.arith similarity index 100% rename from src/test/resources/bwk/t/scripts/t.arith rename to src/it/resources/bwk/t/scripts/t.arith diff --git a/src/test/resources/bwk/t/scripts/t.array b/src/it/resources/bwk/t/scripts/t.array similarity index 100% rename from src/test/resources/bwk/t/scripts/t.array rename to src/it/resources/bwk/t/scripts/t.array diff --git a/src/test/resources/bwk/t/scripts/t.array1 b/src/it/resources/bwk/t/scripts/t.array1 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.array1 rename to src/it/resources/bwk/t/scripts/t.array1 diff --git a/src/test/resources/bwk/t/scripts/t.array2 b/src/it/resources/bwk/t/scripts/t.array2 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.array2 rename to src/it/resources/bwk/t/scripts/t.array2 diff --git a/src/test/resources/bwk/t/scripts/t.assert b/src/it/resources/bwk/t/scripts/t.assert similarity index 100% rename from src/test/resources/bwk/t/scripts/t.assert rename to src/it/resources/bwk/t/scripts/t.assert diff --git a/src/test/resources/bwk/t/scripts/t.avg b/src/it/resources/bwk/t/scripts/t.avg similarity index 100% rename from src/test/resources/bwk/t/scripts/t.avg rename to src/it/resources/bwk/t/scripts/t.avg diff --git a/src/test/resources/bwk/t/scripts/t.b.x b/src/it/resources/bwk/t/scripts/t.b.x similarity index 100% rename from src/test/resources/bwk/t/scripts/t.b.x rename to src/it/resources/bwk/t/scripts/t.b.x diff --git a/src/test/resources/bwk/t/scripts/t.be b/src/it/resources/bwk/t/scripts/t.be similarity index 100% rename from src/test/resources/bwk/t/scripts/t.be rename to src/it/resources/bwk/t/scripts/t.be diff --git a/src/test/resources/bwk/t/scripts/t.beginexit b/src/it/resources/bwk/t/scripts/t.beginexit similarity index 100% rename from src/test/resources/bwk/t/scripts/t.beginexit rename to src/it/resources/bwk/t/scripts/t.beginexit diff --git a/src/test/resources/bwk/t/scripts/t.beginnext b/src/it/resources/bwk/t/scripts/t.beginnext similarity index 100% rename from src/test/resources/bwk/t/scripts/t.beginnext rename to src/it/resources/bwk/t/scripts/t.beginnext diff --git a/src/test/resources/bwk/t/scripts/t.break b/src/it/resources/bwk/t/scripts/t.break similarity index 100% rename from src/test/resources/bwk/t/scripts/t.break rename to src/it/resources/bwk/t/scripts/t.break diff --git a/src/test/resources/bwk/t/scripts/t.break1 b/src/it/resources/bwk/t/scripts/t.break1 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.break1 rename to src/it/resources/bwk/t/scripts/t.break1 diff --git a/src/test/resources/bwk/t/scripts/t.break2 b/src/it/resources/bwk/t/scripts/t.break2 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.break2 rename to src/it/resources/bwk/t/scripts/t.break2 diff --git a/src/test/resources/bwk/t/scripts/t.break3 b/src/it/resources/bwk/t/scripts/t.break3 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.break3 rename to src/it/resources/bwk/t/scripts/t.break3 diff --git a/src/test/resources/bwk/t/scripts/t.bug1 b/src/it/resources/bwk/t/scripts/t.bug1 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.bug1 rename to src/it/resources/bwk/t/scripts/t.bug1 diff --git a/src/test/resources/bwk/t/scripts/t.builtins b/src/it/resources/bwk/t/scripts/t.builtins similarity index 100% rename from src/test/resources/bwk/t/scripts/t.builtins rename to src/it/resources/bwk/t/scripts/t.builtins diff --git a/src/test/resources/bwk/t/scripts/t.cat b/src/it/resources/bwk/t/scripts/t.cat similarity index 100% rename from src/test/resources/bwk/t/scripts/t.cat rename to src/it/resources/bwk/t/scripts/t.cat diff --git a/src/test/resources/bwk/t/scripts/t.cat1 b/src/it/resources/bwk/t/scripts/t.cat1 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.cat1 rename to src/it/resources/bwk/t/scripts/t.cat1 diff --git a/src/test/resources/bwk/t/scripts/t.cat2 b/src/it/resources/bwk/t/scripts/t.cat2 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.cat2 rename to src/it/resources/bwk/t/scripts/t.cat2 diff --git a/src/test/resources/bwk/t/scripts/t.cmp b/src/it/resources/bwk/t/scripts/t.cmp similarity index 100% rename from src/test/resources/bwk/t/scripts/t.cmp rename to src/it/resources/bwk/t/scripts/t.cmp diff --git a/src/test/resources/bwk/t/scripts/t.coerce b/src/it/resources/bwk/t/scripts/t.coerce similarity index 100% rename from src/test/resources/bwk/t/scripts/t.coerce rename to src/it/resources/bwk/t/scripts/t.coerce diff --git a/src/test/resources/bwk/t/scripts/t.coerce2 b/src/it/resources/bwk/t/scripts/t.coerce2 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.coerce2 rename to src/it/resources/bwk/t/scripts/t.coerce2 diff --git a/src/test/resources/bwk/t/scripts/t.comment b/src/it/resources/bwk/t/scripts/t.comment similarity index 100% rename from src/test/resources/bwk/t/scripts/t.comment rename to src/it/resources/bwk/t/scripts/t.comment diff --git a/src/test/resources/bwk/t/scripts/t.comment1 b/src/it/resources/bwk/t/scripts/t.comment1 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.comment1 rename to src/it/resources/bwk/t/scripts/t.comment1 diff --git a/src/test/resources/bwk/t/scripts/t.concat b/src/it/resources/bwk/t/scripts/t.concat similarity index 100% rename from src/test/resources/bwk/t/scripts/t.concat rename to src/it/resources/bwk/t/scripts/t.concat diff --git a/src/test/resources/bwk/t/scripts/t.cond b/src/it/resources/bwk/t/scripts/t.cond similarity index 100% rename from src/test/resources/bwk/t/scripts/t.cond rename to src/it/resources/bwk/t/scripts/t.cond diff --git a/src/test/resources/bwk/t/scripts/t.contin b/src/it/resources/bwk/t/scripts/t.contin similarity index 100% rename from src/test/resources/bwk/t/scripts/t.contin rename to src/it/resources/bwk/t/scripts/t.contin diff --git a/src/test/resources/bwk/t/scripts/t.count b/src/it/resources/bwk/t/scripts/t.count similarity index 100% rename from src/test/resources/bwk/t/scripts/t.count rename to src/it/resources/bwk/t/scripts/t.count diff --git a/src/test/resources/bwk/t/scripts/t.crlf b/src/it/resources/bwk/t/scripts/t.crlf similarity index 100% rename from src/test/resources/bwk/t/scripts/t.crlf rename to src/it/resources/bwk/t/scripts/t.crlf diff --git a/src/test/resources/bwk/t/scripts/t.cum b/src/it/resources/bwk/t/scripts/t.cum similarity index 100% rename from src/test/resources/bwk/t/scripts/t.cum rename to src/it/resources/bwk/t/scripts/t.cum diff --git a/src/test/resources/bwk/t/scripts/t.d.x b/src/it/resources/bwk/t/scripts/t.d.x similarity index 100% rename from src/test/resources/bwk/t/scripts/t.d.x rename to src/it/resources/bwk/t/scripts/t.d.x diff --git a/src/test/resources/bwk/t/scripts/t.delete0 b/src/it/resources/bwk/t/scripts/t.delete0 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.delete0 rename to src/it/resources/bwk/t/scripts/t.delete0 diff --git a/src/test/resources/bwk/t/scripts/t.delete1 b/src/it/resources/bwk/t/scripts/t.delete1 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.delete1 rename to src/it/resources/bwk/t/scripts/t.delete1 diff --git a/src/test/resources/bwk/t/scripts/t.delete2 b/src/it/resources/bwk/t/scripts/t.delete2 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.delete2 rename to src/it/resources/bwk/t/scripts/t.delete2 diff --git a/src/test/resources/bwk/t/scripts/t.delete3 b/src/it/resources/bwk/t/scripts/t.delete3 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.delete3 rename to src/it/resources/bwk/t/scripts/t.delete3 diff --git a/src/test/resources/bwk/t/scripts/t.do b/src/it/resources/bwk/t/scripts/t.do similarity index 100% rename from src/test/resources/bwk/t/scripts/t.do rename to src/it/resources/bwk/t/scripts/t.do diff --git a/src/test/resources/bwk/t/scripts/t.e b/src/it/resources/bwk/t/scripts/t.e similarity index 100% rename from src/test/resources/bwk/t/scripts/t.e rename to src/it/resources/bwk/t/scripts/t.e diff --git a/src/test/resources/bwk/t/scripts/t.else b/src/it/resources/bwk/t/scripts/t.else similarity index 100% rename from src/test/resources/bwk/t/scripts/t.else rename to src/it/resources/bwk/t/scripts/t.else diff --git a/src/test/resources/bwk/t/scripts/t.exit b/src/it/resources/bwk/t/scripts/t.exit similarity index 100% rename from src/test/resources/bwk/t/scripts/t.exit rename to src/it/resources/bwk/t/scripts/t.exit diff --git a/src/test/resources/bwk/t/scripts/t.exit1 b/src/it/resources/bwk/t/scripts/t.exit1 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.exit1 rename to src/it/resources/bwk/t/scripts/t.exit1 diff --git a/src/test/resources/bwk/t/scripts/t.f b/src/it/resources/bwk/t/scripts/t.f similarity index 100% rename from src/test/resources/bwk/t/scripts/t.f rename to src/it/resources/bwk/t/scripts/t.f diff --git a/src/test/resources/bwk/t/scripts/t.f.x b/src/it/resources/bwk/t/scripts/t.f.x similarity index 100% rename from src/test/resources/bwk/t/scripts/t.f.x rename to src/it/resources/bwk/t/scripts/t.f.x diff --git a/src/test/resources/bwk/t/scripts/t.f0 b/src/it/resources/bwk/t/scripts/t.f0 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.f0 rename to src/it/resources/bwk/t/scripts/t.f0 diff --git a/src/test/resources/bwk/t/scripts/t.f1 b/src/it/resources/bwk/t/scripts/t.f1 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.f1 rename to src/it/resources/bwk/t/scripts/t.f1 diff --git a/src/test/resources/bwk/t/scripts/t.f2 b/src/it/resources/bwk/t/scripts/t.f2 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.f2 rename to src/it/resources/bwk/t/scripts/t.f2 diff --git a/src/test/resources/bwk/t/scripts/t.f3 b/src/it/resources/bwk/t/scripts/t.f3 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.f3 rename to src/it/resources/bwk/t/scripts/t.f3 diff --git a/src/test/resources/bwk/t/scripts/t.f4 b/src/it/resources/bwk/t/scripts/t.f4 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.f4 rename to src/it/resources/bwk/t/scripts/t.f4 diff --git a/src/test/resources/bwk/t/scripts/t.for b/src/it/resources/bwk/t/scripts/t.for similarity index 100% rename from src/test/resources/bwk/t/scripts/t.for rename to src/it/resources/bwk/t/scripts/t.for diff --git a/src/test/resources/bwk/t/scripts/t.for1 b/src/it/resources/bwk/t/scripts/t.for1 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.for1 rename to src/it/resources/bwk/t/scripts/t.for1 diff --git a/src/test/resources/bwk/t/scripts/t.for2 b/src/it/resources/bwk/t/scripts/t.for2 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.for2 rename to src/it/resources/bwk/t/scripts/t.for2 diff --git a/src/test/resources/bwk/t/scripts/t.for3 b/src/it/resources/bwk/t/scripts/t.for3 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.for3 rename to src/it/resources/bwk/t/scripts/t.for3 diff --git a/src/test/resources/bwk/t/scripts/t.format4 b/src/it/resources/bwk/t/scripts/t.format4 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.format4 rename to src/it/resources/bwk/t/scripts/t.format4 diff --git a/src/test/resources/bwk/t/scripts/t.fun b/src/it/resources/bwk/t/scripts/t.fun similarity index 100% rename from src/test/resources/bwk/t/scripts/t.fun rename to src/it/resources/bwk/t/scripts/t.fun diff --git a/src/test/resources/bwk/t/scripts/t.fun0 b/src/it/resources/bwk/t/scripts/t.fun0 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.fun0 rename to src/it/resources/bwk/t/scripts/t.fun0 diff --git a/src/test/resources/bwk/t/scripts/t.fun1 b/src/it/resources/bwk/t/scripts/t.fun1 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.fun1 rename to src/it/resources/bwk/t/scripts/t.fun1 diff --git a/src/test/resources/bwk/t/scripts/t.fun2 b/src/it/resources/bwk/t/scripts/t.fun2 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.fun2 rename to src/it/resources/bwk/t/scripts/t.fun2 diff --git a/src/test/resources/bwk/t/scripts/t.fun3 b/src/it/resources/bwk/t/scripts/t.fun3 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.fun3 rename to src/it/resources/bwk/t/scripts/t.fun3 diff --git a/src/test/resources/bwk/t/scripts/t.fun4 b/src/it/resources/bwk/t/scripts/t.fun4 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.fun4 rename to src/it/resources/bwk/t/scripts/t.fun4 diff --git a/src/test/resources/bwk/t/scripts/t.fun5 b/src/it/resources/bwk/t/scripts/t.fun5 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.fun5 rename to src/it/resources/bwk/t/scripts/t.fun5 diff --git a/src/test/resources/bwk/t/scripts/t.getline1 b/src/it/resources/bwk/t/scripts/t.getline1 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.getline1 rename to src/it/resources/bwk/t/scripts/t.getline1 diff --git a/src/test/resources/bwk/t/scripts/t.getval b/src/it/resources/bwk/t/scripts/t.getval similarity index 100% rename from src/test/resources/bwk/t/scripts/t.getval rename to src/it/resources/bwk/t/scripts/t.getval diff --git a/src/test/resources/bwk/t/scripts/t.gsub b/src/it/resources/bwk/t/scripts/t.gsub similarity index 100% rename from src/test/resources/bwk/t/scripts/t.gsub rename to src/it/resources/bwk/t/scripts/t.gsub diff --git a/src/test/resources/bwk/t/scripts/t.gsub1 b/src/it/resources/bwk/t/scripts/t.gsub1 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.gsub1 rename to src/it/resources/bwk/t/scripts/t.gsub1 diff --git a/src/test/resources/bwk/t/scripts/t.gsub3 b/src/it/resources/bwk/t/scripts/t.gsub3 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.gsub3 rename to src/it/resources/bwk/t/scripts/t.gsub3 diff --git a/src/test/resources/bwk/t/scripts/t.gsub4 b/src/it/resources/bwk/t/scripts/t.gsub4 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.gsub4 rename to src/it/resources/bwk/t/scripts/t.gsub4 diff --git a/src/test/resources/bwk/t/scripts/t.i.x b/src/it/resources/bwk/t/scripts/t.i.x similarity index 100% rename from src/test/resources/bwk/t/scripts/t.i.x rename to src/it/resources/bwk/t/scripts/t.i.x diff --git a/src/test/resources/bwk/t/scripts/t.if b/src/it/resources/bwk/t/scripts/t.if similarity index 100% rename from src/test/resources/bwk/t/scripts/t.if rename to src/it/resources/bwk/t/scripts/t.if diff --git a/src/test/resources/bwk/t/scripts/t.in b/src/it/resources/bwk/t/scripts/t.in similarity index 100% rename from src/test/resources/bwk/t/scripts/t.in rename to src/it/resources/bwk/t/scripts/t.in diff --git a/src/test/resources/bwk/t/scripts/t.in1 b/src/it/resources/bwk/t/scripts/t.in1 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.in1 rename to src/it/resources/bwk/t/scripts/t.in1 diff --git a/src/test/resources/bwk/t/scripts/t.in2 b/src/it/resources/bwk/t/scripts/t.in2 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.in2 rename to src/it/resources/bwk/t/scripts/t.in2 diff --git a/src/test/resources/bwk/t/scripts/t.in3 b/src/it/resources/bwk/t/scripts/t.in3 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.in3 rename to src/it/resources/bwk/t/scripts/t.in3 diff --git a/src/test/resources/bwk/t/scripts/t.incr b/src/it/resources/bwk/t/scripts/t.incr similarity index 100% rename from src/test/resources/bwk/t/scripts/t.incr rename to src/it/resources/bwk/t/scripts/t.incr diff --git a/src/test/resources/bwk/t/scripts/t.incr2 b/src/it/resources/bwk/t/scripts/t.incr2 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.incr2 rename to src/it/resources/bwk/t/scripts/t.incr2 diff --git a/src/test/resources/bwk/t/scripts/t.incr3 b/src/it/resources/bwk/t/scripts/t.incr3 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.incr3 rename to src/it/resources/bwk/t/scripts/t.incr3 diff --git a/src/test/resources/bwk/t/scripts/t.index b/src/it/resources/bwk/t/scripts/t.index similarity index 100% rename from src/test/resources/bwk/t/scripts/t.index rename to src/it/resources/bwk/t/scripts/t.index diff --git a/src/test/resources/bwk/t/scripts/t.intest b/src/it/resources/bwk/t/scripts/t.intest similarity index 100% rename from src/test/resources/bwk/t/scripts/t.intest rename to src/it/resources/bwk/t/scripts/t.intest diff --git a/src/test/resources/bwk/t/scripts/t.intest2 b/src/it/resources/bwk/t/scripts/t.intest2 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.intest2 rename to src/it/resources/bwk/t/scripts/t.intest2 diff --git a/src/test/resources/bwk/t/scripts/t.j.x b/src/it/resources/bwk/t/scripts/t.j.x similarity index 100% rename from src/test/resources/bwk/t/scripts/t.j.x rename to src/it/resources/bwk/t/scripts/t.j.x diff --git a/src/test/resources/bwk/t/scripts/t.longstr b/src/it/resources/bwk/t/scripts/t.longstr similarity index 100% rename from src/test/resources/bwk/t/scripts/t.longstr rename to src/it/resources/bwk/t/scripts/t.longstr diff --git a/src/test/resources/bwk/t/scripts/t.makef b/src/it/resources/bwk/t/scripts/t.makef similarity index 100% rename from src/test/resources/bwk/t/scripts/t.makef rename to src/it/resources/bwk/t/scripts/t.makef diff --git a/src/test/resources/bwk/t/scripts/t.match b/src/it/resources/bwk/t/scripts/t.match similarity index 100% rename from src/test/resources/bwk/t/scripts/t.match rename to src/it/resources/bwk/t/scripts/t.match diff --git a/src/test/resources/bwk/t/scripts/t.match1 b/src/it/resources/bwk/t/scripts/t.match1 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.match1 rename to src/it/resources/bwk/t/scripts/t.match1 diff --git a/src/test/resources/bwk/t/scripts/t.max b/src/it/resources/bwk/t/scripts/t.max similarity index 100% rename from src/test/resources/bwk/t/scripts/t.max rename to src/it/resources/bwk/t/scripts/t.max diff --git a/src/test/resources/bwk/t/scripts/t.mod b/src/it/resources/bwk/t/scripts/t.mod similarity index 100% rename from src/test/resources/bwk/t/scripts/t.mod rename to src/it/resources/bwk/t/scripts/t.mod diff --git a/src/test/resources/bwk/t/scripts/t.monotone b/src/it/resources/bwk/t/scripts/t.monotone similarity index 100% rename from src/test/resources/bwk/t/scripts/t.monotone rename to src/it/resources/bwk/t/scripts/t.monotone diff --git a/src/test/resources/bwk/t/scripts/t.nameval b/src/it/resources/bwk/t/scripts/t.nameval similarity index 100% rename from src/test/resources/bwk/t/scripts/t.nameval rename to src/it/resources/bwk/t/scripts/t.nameval diff --git a/src/test/resources/bwk/t/scripts/t.next b/src/it/resources/bwk/t/scripts/t.next similarity index 100% rename from src/test/resources/bwk/t/scripts/t.next rename to src/it/resources/bwk/t/scripts/t.next diff --git a/src/test/resources/bwk/t/scripts/t.not b/src/it/resources/bwk/t/scripts/t.not similarity index 100% rename from src/test/resources/bwk/t/scripts/t.not rename to src/it/resources/bwk/t/scripts/t.not diff --git a/src/test/resources/bwk/t/scripts/t.null0 b/src/it/resources/bwk/t/scripts/t.null0 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.null0 rename to src/it/resources/bwk/t/scripts/t.null0 diff --git a/src/test/resources/bwk/t/scripts/t.ofmt b/src/it/resources/bwk/t/scripts/t.ofmt similarity index 100% rename from src/test/resources/bwk/t/scripts/t.ofmt rename to src/it/resources/bwk/t/scripts/t.ofmt diff --git a/src/test/resources/bwk/t/scripts/t.ofs b/src/it/resources/bwk/t/scripts/t.ofs similarity index 100% rename from src/test/resources/bwk/t/scripts/t.ofs rename to src/it/resources/bwk/t/scripts/t.ofs diff --git a/src/test/resources/bwk/t/scripts/t.ors b/src/it/resources/bwk/t/scripts/t.ors similarity index 100% rename from src/test/resources/bwk/t/scripts/t.ors rename to src/it/resources/bwk/t/scripts/t.ors diff --git a/src/test/resources/bwk/t/scripts/t.pat b/src/it/resources/bwk/t/scripts/t.pat similarity index 100% rename from src/test/resources/bwk/t/scripts/t.pat rename to src/it/resources/bwk/t/scripts/t.pat diff --git a/src/test/resources/bwk/t/scripts/t.pipe b/src/it/resources/bwk/t/scripts/t.pipe similarity index 100% rename from src/test/resources/bwk/t/scripts/t.pipe rename to src/it/resources/bwk/t/scripts/t.pipe diff --git a/src/test/resources/bwk/t/scripts/t.pp b/src/it/resources/bwk/t/scripts/t.pp similarity index 100% rename from src/test/resources/bwk/t/scripts/t.pp rename to src/it/resources/bwk/t/scripts/t.pp diff --git a/src/test/resources/bwk/t/scripts/t.pp1 b/src/it/resources/bwk/t/scripts/t.pp1 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.pp1 rename to src/it/resources/bwk/t/scripts/t.pp1 diff --git a/src/test/resources/bwk/t/scripts/t.pp2 b/src/it/resources/bwk/t/scripts/t.pp2 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.pp2 rename to src/it/resources/bwk/t/scripts/t.pp2 diff --git a/src/test/resources/bwk/t/scripts/t.printf b/src/it/resources/bwk/t/scripts/t.printf similarity index 100% rename from src/test/resources/bwk/t/scripts/t.printf rename to src/it/resources/bwk/t/scripts/t.printf diff --git a/src/test/resources/bwk/t/scripts/t.printf2 b/src/it/resources/bwk/t/scripts/t.printf2 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.printf2 rename to src/it/resources/bwk/t/scripts/t.printf2 diff --git a/src/test/resources/bwk/t/scripts/t.quote b/src/it/resources/bwk/t/scripts/t.quote similarity index 100% rename from src/test/resources/bwk/t/scripts/t.quote rename to src/it/resources/bwk/t/scripts/t.quote diff --git a/src/test/resources/bwk/t/scripts/t.randk b/src/it/resources/bwk/t/scripts/t.randk similarity index 100% rename from src/test/resources/bwk/t/scripts/t.randk rename to src/it/resources/bwk/t/scripts/t.randk diff --git a/src/test/resources/bwk/t/scripts/t.re1 b/src/it/resources/bwk/t/scripts/t.re1 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.re1 rename to src/it/resources/bwk/t/scripts/t.re1 diff --git a/src/test/resources/bwk/t/scripts/t.re1a b/src/it/resources/bwk/t/scripts/t.re1a similarity index 100% rename from src/test/resources/bwk/t/scripts/t.re1a rename to src/it/resources/bwk/t/scripts/t.re1a diff --git a/src/test/resources/bwk/t/scripts/t.re2 b/src/it/resources/bwk/t/scripts/t.re2 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.re2 rename to src/it/resources/bwk/t/scripts/t.re2 diff --git a/src/test/resources/bwk/t/scripts/t.re3 b/src/it/resources/bwk/t/scripts/t.re3 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.re3 rename to src/it/resources/bwk/t/scripts/t.re3 diff --git a/src/test/resources/bwk/t/scripts/t.re4 b/src/it/resources/bwk/t/scripts/t.re4 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.re4 rename to src/it/resources/bwk/t/scripts/t.re4 diff --git a/src/test/resources/bwk/t/scripts/t.re5 b/src/it/resources/bwk/t/scripts/t.re5 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.re5 rename to src/it/resources/bwk/t/scripts/t.re5 diff --git a/src/test/resources/bwk/t/scripts/t.re7 b/src/it/resources/bwk/t/scripts/t.re7 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.re7 rename to src/it/resources/bwk/t/scripts/t.re7 diff --git a/src/test/resources/bwk/t/scripts/t.reFS b/src/it/resources/bwk/t/scripts/t.reFS similarity index 100% rename from src/test/resources/bwk/t/scripts/t.reFS rename to src/it/resources/bwk/t/scripts/t.reFS diff --git a/src/test/resources/bwk/t/scripts/t.rec b/src/it/resources/bwk/t/scripts/t.rec similarity index 100% rename from src/test/resources/bwk/t/scripts/t.rec rename to src/it/resources/bwk/t/scripts/t.rec diff --git a/src/test/resources/bwk/t/scripts/t.redir1 b/src/it/resources/bwk/t/scripts/t.redir1 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.redir1 rename to src/it/resources/bwk/t/scripts/t.redir1 diff --git a/src/test/resources/bwk/t/scripts/t.reg b/src/it/resources/bwk/t/scripts/t.reg similarity index 100% rename from src/test/resources/bwk/t/scripts/t.reg rename to src/it/resources/bwk/t/scripts/t.reg diff --git a/src/test/resources/bwk/t/scripts/t.roff b/src/it/resources/bwk/t/scripts/t.roff similarity index 100% rename from src/test/resources/bwk/t/scripts/t.roff rename to src/it/resources/bwk/t/scripts/t.roff diff --git a/src/test/resources/bwk/t/scripts/t.sep b/src/it/resources/bwk/t/scripts/t.sep similarity index 100% rename from src/test/resources/bwk/t/scripts/t.sep rename to src/it/resources/bwk/t/scripts/t.sep diff --git a/src/test/resources/bwk/t/scripts/t.seqno b/src/it/resources/bwk/t/scripts/t.seqno similarity index 100% rename from src/test/resources/bwk/t/scripts/t.seqno rename to src/it/resources/bwk/t/scripts/t.seqno diff --git a/src/test/resources/bwk/t/scripts/t.set0 b/src/it/resources/bwk/t/scripts/t.set0 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.set0 rename to src/it/resources/bwk/t/scripts/t.set0 diff --git a/src/test/resources/bwk/t/scripts/t.set0a b/src/it/resources/bwk/t/scripts/t.set0a similarity index 100% rename from src/test/resources/bwk/t/scripts/t.set0a rename to src/it/resources/bwk/t/scripts/t.set0a diff --git a/src/test/resources/bwk/t/scripts/t.set0b b/src/it/resources/bwk/t/scripts/t.set0b similarity index 100% rename from src/test/resources/bwk/t/scripts/t.set0b rename to src/it/resources/bwk/t/scripts/t.set0b diff --git a/src/test/resources/bwk/t/scripts/t.set1 b/src/it/resources/bwk/t/scripts/t.set1 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.set1 rename to src/it/resources/bwk/t/scripts/t.set1 diff --git a/src/test/resources/bwk/t/scripts/t.set2 b/src/it/resources/bwk/t/scripts/t.set2 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.set2 rename to src/it/resources/bwk/t/scripts/t.set2 diff --git a/src/test/resources/bwk/t/scripts/t.set3 b/src/it/resources/bwk/t/scripts/t.set3 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.set3 rename to src/it/resources/bwk/t/scripts/t.set3 diff --git a/src/test/resources/bwk/t/scripts/t.split1 b/src/it/resources/bwk/t/scripts/t.split1 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.split1 rename to src/it/resources/bwk/t/scripts/t.split1 diff --git a/src/test/resources/bwk/t/scripts/t.split2 b/src/it/resources/bwk/t/scripts/t.split2 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.split2 rename to src/it/resources/bwk/t/scripts/t.split2 diff --git a/src/test/resources/bwk/t/scripts/t.split2a b/src/it/resources/bwk/t/scripts/t.split2a similarity index 100% rename from src/test/resources/bwk/t/scripts/t.split2a rename to src/it/resources/bwk/t/scripts/t.split2a diff --git a/src/test/resources/bwk/t/scripts/t.split3 b/src/it/resources/bwk/t/scripts/t.split3 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.split3 rename to src/it/resources/bwk/t/scripts/t.split3 diff --git a/src/test/resources/bwk/t/scripts/t.split4 b/src/it/resources/bwk/t/scripts/t.split4 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.split4 rename to src/it/resources/bwk/t/scripts/t.split4 diff --git a/src/test/resources/bwk/t/scripts/t.split8 b/src/it/resources/bwk/t/scripts/t.split8 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.split8 rename to src/it/resources/bwk/t/scripts/t.split8 diff --git a/src/test/resources/bwk/t/scripts/t.split9 b/src/it/resources/bwk/t/scripts/t.split9 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.split9 rename to src/it/resources/bwk/t/scripts/t.split9 diff --git a/src/test/resources/bwk/t/scripts/t.split9a b/src/it/resources/bwk/t/scripts/t.split9a similarity index 100% rename from src/test/resources/bwk/t/scripts/t.split9a rename to src/it/resources/bwk/t/scripts/t.split9a diff --git a/src/test/resources/bwk/t/scripts/t.stately b/src/it/resources/bwk/t/scripts/t.stately similarity index 100% rename from src/test/resources/bwk/t/scripts/t.stately rename to src/it/resources/bwk/t/scripts/t.stately diff --git a/src/test/resources/bwk/t/scripts/t.strcmp b/src/it/resources/bwk/t/scripts/t.strcmp similarity index 100% rename from src/test/resources/bwk/t/scripts/t.strcmp rename to src/it/resources/bwk/t/scripts/t.strcmp diff --git a/src/test/resources/bwk/t/scripts/t.strcmp1 b/src/it/resources/bwk/t/scripts/t.strcmp1 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.strcmp1 rename to src/it/resources/bwk/t/scripts/t.strcmp1 diff --git a/src/test/resources/bwk/t/scripts/t.strnum b/src/it/resources/bwk/t/scripts/t.strnum similarity index 100% rename from src/test/resources/bwk/t/scripts/t.strnum rename to src/it/resources/bwk/t/scripts/t.strnum diff --git a/src/test/resources/bwk/t/scripts/t.sub0 b/src/it/resources/bwk/t/scripts/t.sub0 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.sub0 rename to src/it/resources/bwk/t/scripts/t.sub0 diff --git a/src/test/resources/bwk/t/scripts/t.sub1 b/src/it/resources/bwk/t/scripts/t.sub1 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.sub1 rename to src/it/resources/bwk/t/scripts/t.sub1 diff --git a/src/test/resources/bwk/t/scripts/t.sub2 b/src/it/resources/bwk/t/scripts/t.sub2 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.sub2 rename to src/it/resources/bwk/t/scripts/t.sub2 diff --git a/src/test/resources/bwk/t/scripts/t.sub3 b/src/it/resources/bwk/t/scripts/t.sub3 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.sub3 rename to src/it/resources/bwk/t/scripts/t.sub3 diff --git a/src/test/resources/bwk/t/scripts/t.substr b/src/it/resources/bwk/t/scripts/t.substr similarity index 100% rename from src/test/resources/bwk/t/scripts/t.substr rename to src/it/resources/bwk/t/scripts/t.substr diff --git a/src/test/resources/bwk/t/scripts/t.substr1 b/src/it/resources/bwk/t/scripts/t.substr1 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.substr1 rename to src/it/resources/bwk/t/scripts/t.substr1 diff --git a/src/test/resources/bwk/t/scripts/t.time b/src/it/resources/bwk/t/scripts/t.time similarity index 100% rename from src/test/resources/bwk/t/scripts/t.time rename to src/it/resources/bwk/t/scripts/t.time diff --git a/src/test/resources/bwk/t/scripts/t.vf b/src/it/resources/bwk/t/scripts/t.vf similarity index 100% rename from src/test/resources/bwk/t/scripts/t.vf rename to src/it/resources/bwk/t/scripts/t.vf diff --git a/src/test/resources/bwk/t/scripts/t.vf1 b/src/it/resources/bwk/t/scripts/t.vf1 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.vf1 rename to src/it/resources/bwk/t/scripts/t.vf1 diff --git a/src/test/resources/bwk/t/scripts/t.vf2 b/src/it/resources/bwk/t/scripts/t.vf2 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.vf2 rename to src/it/resources/bwk/t/scripts/t.vf2 diff --git a/src/test/resources/bwk/t/scripts/t.vf3 b/src/it/resources/bwk/t/scripts/t.vf3 similarity index 100% rename from src/test/resources/bwk/t/scripts/t.vf3 rename to src/it/resources/bwk/t/scripts/t.vf3 diff --git a/src/test/resources/bwk/t/scripts/t.x b/src/it/resources/bwk/t/scripts/t.x similarity index 100% rename from src/test/resources/bwk/t/scripts/t.x rename to src/it/resources/bwk/t/scripts/t.x diff --git a/src/test/resources/gawk/ChangeLog b/src/it/resources/gawk/ChangeLog similarity index 100% rename from src/test/resources/gawk/ChangeLog rename to src/it/resources/gawk/ChangeLog diff --git a/src/test/resources/gawk/ChangeLog.0 b/src/it/resources/gawk/ChangeLog.0 similarity index 100% rename from src/test/resources/gawk/ChangeLog.0 rename to src/it/resources/gawk/ChangeLog.0 diff --git a/src/test/resources/gawk/ChangeLog.1 b/src/it/resources/gawk/ChangeLog.1 similarity index 100% rename from src/test/resources/gawk/ChangeLog.1 rename to src/it/resources/gawk/ChangeLog.1 diff --git a/src/test/resources/gawk/Gentests b/src/it/resources/gawk/Gentests similarity index 100% rename from src/test/resources/gawk/Gentests rename to src/it/resources/gawk/Gentests diff --git a/src/test/resources/gawk/Makefile.am b/src/it/resources/gawk/Makefile.am similarity index 100% rename from src/test/resources/gawk/Makefile.am rename to src/it/resources/gawk/Makefile.am diff --git a/src/test/resources/gawk/Makefile.in b/src/it/resources/gawk/Makefile.in similarity index 100% rename from src/test/resources/gawk/Makefile.in rename to src/it/resources/gawk/Makefile.in diff --git a/src/test/resources/gawk/Maketests b/src/it/resources/gawk/Maketests similarity index 100% rename from src/test/resources/gawk/Maketests rename to src/it/resources/gawk/Maketests diff --git a/src/it/resources/gawk/README b/src/it/resources/gawk/README new file mode 100644 index 00000000..61976b8a --- /dev/null +++ b/src/it/resources/gawk/README @@ -0,0 +1,24 @@ +Mon Jan 22 13:08:58 EST 1996 +============================ + +This directory contains the tests for gawk. The tests use the +following conventions. + +Given some aspect of gawk named `foo', there will be one or more +of the following files: + +foo.awk --- actual code for the test if not inline in the Makefile +foo.in --- the data for the test, if it needs data +foo.ok --- the expected results +_foo --- the actual results; generated at run time + +The _foo file will be left around if a test fails, allowing you to +compare actual and expected results, in case they differ. + +If they do differ (other than strftime.ok and _strftime!), send in a +bug report. See the manual for the bug report procedure. + +Known Issues: +============= +May 2017: On a system with no ptys available, the pty1 test will hang. +There isn't anything that can be done about this. diff --git a/src/test/resources/gawk/aadelete1.awk b/src/it/resources/gawk/aadelete1.awk similarity index 100% rename from src/test/resources/gawk/aadelete1.awk rename to src/it/resources/gawk/aadelete1.awk diff --git a/src/test/resources/gawk/aadelete1.ok b/src/it/resources/gawk/aadelete1.ok similarity index 100% rename from src/test/resources/gawk/aadelete1.ok rename to src/it/resources/gawk/aadelete1.ok diff --git a/src/test/resources/gawk/aadelete2.awk b/src/it/resources/gawk/aadelete2.awk similarity index 100% rename from src/test/resources/gawk/aadelete2.awk rename to src/it/resources/gawk/aadelete2.awk diff --git a/src/test/resources/gawk/aadelete2.ok b/src/it/resources/gawk/aadelete2.ok similarity index 100% rename from src/test/resources/gawk/aadelete2.ok rename to src/it/resources/gawk/aadelete2.ok diff --git a/src/test/resources/gawk/aarray1.awk b/src/it/resources/gawk/aarray1.awk similarity index 100% rename from src/test/resources/gawk/aarray1.awk rename to src/it/resources/gawk/aarray1.awk diff --git a/src/test/resources/gawk/aarray1.ok b/src/it/resources/gawk/aarray1.ok similarity index 100% rename from src/test/resources/gawk/aarray1.ok rename to src/it/resources/gawk/aarray1.ok diff --git a/src/test/resources/gawk/aasort.awk b/src/it/resources/gawk/aasort.awk similarity index 100% rename from src/test/resources/gawk/aasort.awk rename to src/it/resources/gawk/aasort.awk diff --git a/src/test/resources/gawk/aasort.ok b/src/it/resources/gawk/aasort.ok similarity index 100% rename from src/test/resources/gawk/aasort.ok rename to src/it/resources/gawk/aasort.ok diff --git a/src/test/resources/gawk/aasorti.awk b/src/it/resources/gawk/aasorti.awk similarity index 100% rename from src/test/resources/gawk/aasorti.awk rename to src/it/resources/gawk/aasorti.awk diff --git a/src/test/resources/gawk/aasorti.ok b/src/it/resources/gawk/aasorti.ok similarity index 100% rename from src/test/resources/gawk/aasorti.ok rename to src/it/resources/gawk/aasorti.ok diff --git a/src/test/resources/gawk/addcomma.awk b/src/it/resources/gawk/addcomma.awk similarity index 100% rename from src/test/resources/gawk/addcomma.awk rename to src/it/resources/gawk/addcomma.awk diff --git a/src/test/resources/gawk/addcomma.in b/src/it/resources/gawk/addcomma.in similarity index 100% rename from src/test/resources/gawk/addcomma.in rename to src/it/resources/gawk/addcomma.in diff --git a/src/test/resources/gawk/addcomma.ok b/src/it/resources/gawk/addcomma.ok similarity index 100% rename from src/test/resources/gawk/addcomma.ok rename to src/it/resources/gawk/addcomma.ok diff --git a/src/test/resources/gawk/anchgsub.awk b/src/it/resources/gawk/anchgsub.awk similarity index 100% rename from src/test/resources/gawk/anchgsub.awk rename to src/it/resources/gawk/anchgsub.awk diff --git a/src/test/resources/gawk/anchgsub.in b/src/it/resources/gawk/anchgsub.in similarity index 100% rename from src/test/resources/gawk/anchgsub.in rename to src/it/resources/gawk/anchgsub.in diff --git a/src/test/resources/gawk/anchgsub.ok b/src/it/resources/gawk/anchgsub.ok similarity index 100% rename from src/test/resources/gawk/anchgsub.ok rename to src/it/resources/gawk/anchgsub.ok diff --git a/src/test/resources/gawk/anchor.awk b/src/it/resources/gawk/anchor.awk similarity index 100% rename from src/test/resources/gawk/anchor.awk rename to src/it/resources/gawk/anchor.awk diff --git a/src/test/resources/gawk/anchor.in b/src/it/resources/gawk/anchor.in similarity index 100% rename from src/test/resources/gawk/anchor.in rename to src/it/resources/gawk/anchor.in diff --git a/src/test/resources/gawk/anchor.ok b/src/it/resources/gawk/anchor.ok similarity index 100% rename from src/test/resources/gawk/anchor.ok rename to src/it/resources/gawk/anchor.ok diff --git a/src/test/resources/gawk/apiterm.awk b/src/it/resources/gawk/apiterm.awk similarity index 100% rename from src/test/resources/gawk/apiterm.awk rename to src/it/resources/gawk/apiterm.awk diff --git a/src/test/resources/gawk/apiterm.in b/src/it/resources/gawk/apiterm.in similarity index 100% rename from src/test/resources/gawk/apiterm.in rename to src/it/resources/gawk/apiterm.in diff --git a/src/test/resources/gawk/apiterm.ok b/src/it/resources/gawk/apiterm.ok similarity index 100% rename from src/test/resources/gawk/apiterm.ok rename to src/it/resources/gawk/apiterm.ok diff --git a/src/test/resources/gawk/argarray.awk b/src/it/resources/gawk/argarray.awk similarity index 100% rename from src/test/resources/gawk/argarray.awk rename to src/it/resources/gawk/argarray.awk diff --git a/src/test/resources/gawk/argarray.in b/src/it/resources/gawk/argarray.in similarity index 100% rename from src/test/resources/gawk/argarray.in rename to src/it/resources/gawk/argarray.in diff --git a/src/test/resources/gawk/argarray.ok b/src/it/resources/gawk/argarray.ok similarity index 100% rename from src/test/resources/gawk/argarray.ok rename to src/it/resources/gawk/argarray.ok diff --git a/src/test/resources/gawk/argcasfile.awk b/src/it/resources/gawk/argcasfile.awk similarity index 100% rename from src/test/resources/gawk/argcasfile.awk rename to src/it/resources/gawk/argcasfile.awk diff --git a/src/test/resources/gawk/argcasfile.in b/src/it/resources/gawk/argcasfile.in similarity index 100% rename from src/test/resources/gawk/argcasfile.in rename to src/it/resources/gawk/argcasfile.in diff --git a/src/test/resources/gawk/argcasfile.ok b/src/it/resources/gawk/argcasfile.ok similarity index 100% rename from src/test/resources/gawk/argcasfile.ok rename to src/it/resources/gawk/argcasfile.ok diff --git a/src/test/resources/gawk/argtest.awk b/src/it/resources/gawk/argtest.awk similarity index 100% rename from src/test/resources/gawk/argtest.awk rename to src/it/resources/gawk/argtest.awk diff --git a/src/test/resources/gawk/argtest.ok b/src/it/resources/gawk/argtest.ok similarity index 100% rename from src/test/resources/gawk/argtest.ok rename to src/it/resources/gawk/argtest.ok diff --git a/src/test/resources/gawk/arrayind1.awk b/src/it/resources/gawk/arrayind1.awk similarity index 100% rename from src/test/resources/gawk/arrayind1.awk rename to src/it/resources/gawk/arrayind1.awk diff --git a/src/test/resources/gawk/arrayind1.in b/src/it/resources/gawk/arrayind1.in similarity index 100% rename from src/test/resources/gawk/arrayind1.in rename to src/it/resources/gawk/arrayind1.in diff --git a/src/test/resources/gawk/arrayind1.ok b/src/it/resources/gawk/arrayind1.ok similarity index 100% rename from src/test/resources/gawk/arrayind1.ok rename to src/it/resources/gawk/arrayind1.ok diff --git a/src/test/resources/gawk/arrayind2.awk b/src/it/resources/gawk/arrayind2.awk similarity index 100% rename from src/test/resources/gawk/arrayind2.awk rename to src/it/resources/gawk/arrayind2.awk diff --git a/src/test/resources/gawk/arrayind2.ok b/src/it/resources/gawk/arrayind2.ok similarity index 100% rename from src/test/resources/gawk/arrayind2.ok rename to src/it/resources/gawk/arrayind2.ok diff --git a/src/test/resources/gawk/arrayind3.awk b/src/it/resources/gawk/arrayind3.awk similarity index 100% rename from src/test/resources/gawk/arrayind3.awk rename to src/it/resources/gawk/arrayind3.awk diff --git a/src/test/resources/gawk/arrayind3.ok b/src/it/resources/gawk/arrayind3.ok similarity index 100% rename from src/test/resources/gawk/arrayind3.ok rename to src/it/resources/gawk/arrayind3.ok diff --git a/src/test/resources/gawk/arrayparm.awk b/src/it/resources/gawk/arrayparm.awk similarity index 100% rename from src/test/resources/gawk/arrayparm.awk rename to src/it/resources/gawk/arrayparm.awk diff --git a/src/test/resources/gawk/arrayparm.ok b/src/it/resources/gawk/arrayparm.ok similarity index 100% rename from src/test/resources/gawk/arrayparm.ok rename to src/it/resources/gawk/arrayparm.ok diff --git a/src/test/resources/gawk/arrayprm2.awk b/src/it/resources/gawk/arrayprm2.awk similarity index 100% rename from src/test/resources/gawk/arrayprm2.awk rename to src/it/resources/gawk/arrayprm2.awk diff --git a/src/test/resources/gawk/arrayprm2.ok b/src/it/resources/gawk/arrayprm2.ok similarity index 100% rename from src/test/resources/gawk/arrayprm2.ok rename to src/it/resources/gawk/arrayprm2.ok diff --git a/src/test/resources/gawk/arrayprm3.awk b/src/it/resources/gawk/arrayprm3.awk similarity index 100% rename from src/test/resources/gawk/arrayprm3.awk rename to src/it/resources/gawk/arrayprm3.awk diff --git a/src/test/resources/gawk/arrayprm3.ok b/src/it/resources/gawk/arrayprm3.ok similarity index 100% rename from src/test/resources/gawk/arrayprm3.ok rename to src/it/resources/gawk/arrayprm3.ok diff --git a/src/test/resources/gawk/arrayref.awk b/src/it/resources/gawk/arrayref.awk similarity index 100% rename from src/test/resources/gawk/arrayref.awk rename to src/it/resources/gawk/arrayref.awk diff --git a/src/test/resources/gawk/arrayref.ok b/src/it/resources/gawk/arrayref.ok similarity index 100% rename from src/test/resources/gawk/arrayref.ok rename to src/it/resources/gawk/arrayref.ok diff --git a/src/test/resources/gawk/arraysort.awk b/src/it/resources/gawk/arraysort.awk similarity index 100% rename from src/test/resources/gawk/arraysort.awk rename to src/it/resources/gawk/arraysort.awk diff --git a/src/test/resources/gawk/arraysort.ok b/src/it/resources/gawk/arraysort.ok similarity index 100% rename from src/test/resources/gawk/arraysort.ok rename to src/it/resources/gawk/arraysort.ok diff --git a/src/test/resources/gawk/arraysort2.awk b/src/it/resources/gawk/arraysort2.awk similarity index 100% rename from src/test/resources/gawk/arraysort2.awk rename to src/it/resources/gawk/arraysort2.awk diff --git a/src/test/resources/gawk/arraysort2.ok b/src/it/resources/gawk/arraysort2.ok similarity index 100% rename from src/test/resources/gawk/arraysort2.ok rename to src/it/resources/gawk/arraysort2.ok diff --git a/src/test/resources/gawk/arraytype-mpfr.ok b/src/it/resources/gawk/arraytype-mpfr.ok similarity index 100% rename from src/test/resources/gawk/arraytype-mpfr.ok rename to src/it/resources/gawk/arraytype-mpfr.ok diff --git a/src/test/resources/gawk/arraytype.awk b/src/it/resources/gawk/arraytype.awk similarity index 100% rename from src/test/resources/gawk/arraytype.awk rename to src/it/resources/gawk/arraytype.awk diff --git a/src/test/resources/gawk/arraytype.ok b/src/it/resources/gawk/arraytype.ok similarity index 100% rename from src/test/resources/gawk/arraytype.ok rename to src/it/resources/gawk/arraytype.ok diff --git a/src/test/resources/gawk/arrdbg.awk b/src/it/resources/gawk/arrdbg.awk similarity index 100% rename from src/test/resources/gawk/arrdbg.awk rename to src/it/resources/gawk/arrdbg.awk diff --git a/src/test/resources/gawk/arrymem1.awk b/src/it/resources/gawk/arrymem1.awk similarity index 100% rename from src/test/resources/gawk/arrymem1.awk rename to src/it/resources/gawk/arrymem1.awk diff --git a/src/test/resources/gawk/arrymem1.ok b/src/it/resources/gawk/arrymem1.ok similarity index 100% rename from src/test/resources/gawk/arrymem1.ok rename to src/it/resources/gawk/arrymem1.ok diff --git a/src/test/resources/gawk/arryref2.awk b/src/it/resources/gawk/arryref2.awk similarity index 100% rename from src/test/resources/gawk/arryref2.awk rename to src/it/resources/gawk/arryref2.awk diff --git a/src/test/resources/gawk/arryref2.ok b/src/it/resources/gawk/arryref2.ok similarity index 100% rename from src/test/resources/gawk/arryref2.ok rename to src/it/resources/gawk/arryref2.ok diff --git a/src/test/resources/gawk/arryref3.awk b/src/it/resources/gawk/arryref3.awk similarity index 100% rename from src/test/resources/gawk/arryref3.awk rename to src/it/resources/gawk/arryref3.awk diff --git a/src/test/resources/gawk/arryref3.ok b/src/it/resources/gawk/arryref3.ok similarity index 100% rename from src/test/resources/gawk/arryref3.ok rename to src/it/resources/gawk/arryref3.ok diff --git a/src/test/resources/gawk/arryref4.awk b/src/it/resources/gawk/arryref4.awk similarity index 100% rename from src/test/resources/gawk/arryref4.awk rename to src/it/resources/gawk/arryref4.awk diff --git a/src/test/resources/gawk/arryref4.ok b/src/it/resources/gawk/arryref4.ok similarity index 100% rename from src/test/resources/gawk/arryref4.ok rename to src/it/resources/gawk/arryref4.ok diff --git a/src/test/resources/gawk/arryref5.awk b/src/it/resources/gawk/arryref5.awk similarity index 100% rename from src/test/resources/gawk/arryref5.awk rename to src/it/resources/gawk/arryref5.awk diff --git a/src/test/resources/gawk/arryref5.ok b/src/it/resources/gawk/arryref5.ok similarity index 100% rename from src/test/resources/gawk/arryref5.ok rename to src/it/resources/gawk/arryref5.ok diff --git a/src/test/resources/gawk/arynasty.awk b/src/it/resources/gawk/arynasty.awk similarity index 100% rename from src/test/resources/gawk/arynasty.awk rename to src/it/resources/gawk/arynasty.awk diff --git a/src/test/resources/gawk/arynasty.ok b/src/it/resources/gawk/arynasty.ok similarity index 100% rename from src/test/resources/gawk/arynasty.ok rename to src/it/resources/gawk/arynasty.ok diff --git a/src/test/resources/gawk/arynocls.awk b/src/it/resources/gawk/arynocls.awk similarity index 96% rename from src/test/resources/gawk/arynocls.awk rename to src/it/resources/gawk/arynocls.awk index 4238c08c..724c9ac8 100644 --- a/src/test/resources/gawk/arynocls.awk +++ b/src/it/resources/gawk/arynocls.awk @@ -1,5 +1,5 @@ #To: bug-gnu-utils@gnu.org -#From: Kristj�n J�nasson +#From: Kristján Jónasson #Subject: Gawk bug #Cc: arnold@gnu.org # @@ -35,7 +35,7 @@ function sub1(x) { # while (getline < "a" == 1) i++ - while ((getline < INPUT) == 1) i++ + while (getline < INPUT == 1) i++ # close("a") close(INPUT) } @@ -44,7 +44,7 @@ function sub2(x) { i=0 delete y # while (getline < "a" == 1) z[++i] = $1 - while ((getline < INPUT) == 1) z[++i] = $1 + while (getline < INPUT == 1) z[++i] = $1 for(i in z) y[i] = x[i] + z[i] } diff --git a/src/test/resources/gawk/arynocls.in b/src/it/resources/gawk/arynocls.in similarity index 100% rename from src/test/resources/gawk/arynocls.in rename to src/it/resources/gawk/arynocls.in diff --git a/src/test/resources/gawk/arynocls.ok b/src/it/resources/gawk/arynocls.ok similarity index 100% rename from src/test/resources/gawk/arynocls.ok rename to src/it/resources/gawk/arynocls.ok diff --git a/src/test/resources/gawk/aryprm1.awk b/src/it/resources/gawk/aryprm1.awk similarity index 100% rename from src/test/resources/gawk/aryprm1.awk rename to src/it/resources/gawk/aryprm1.awk diff --git a/src/test/resources/gawk/aryprm1.ok b/src/it/resources/gawk/aryprm1.ok similarity index 100% rename from src/test/resources/gawk/aryprm1.ok rename to src/it/resources/gawk/aryprm1.ok diff --git a/src/test/resources/gawk/aryprm2.awk b/src/it/resources/gawk/aryprm2.awk similarity index 100% rename from src/test/resources/gawk/aryprm2.awk rename to src/it/resources/gawk/aryprm2.awk diff --git a/src/test/resources/gawk/aryprm2.ok b/src/it/resources/gawk/aryprm2.ok similarity index 100% rename from src/test/resources/gawk/aryprm2.ok rename to src/it/resources/gawk/aryprm2.ok diff --git a/src/test/resources/gawk/aryprm3.awk b/src/it/resources/gawk/aryprm3.awk similarity index 100% rename from src/test/resources/gawk/aryprm3.awk rename to src/it/resources/gawk/aryprm3.awk diff --git a/src/test/resources/gawk/aryprm3.ok b/src/it/resources/gawk/aryprm3.ok similarity index 100% rename from src/test/resources/gawk/aryprm3.ok rename to src/it/resources/gawk/aryprm3.ok diff --git a/src/test/resources/gawk/aryprm4.awk b/src/it/resources/gawk/aryprm4.awk similarity index 100% rename from src/test/resources/gawk/aryprm4.awk rename to src/it/resources/gawk/aryprm4.awk diff --git a/src/test/resources/gawk/aryprm4.ok b/src/it/resources/gawk/aryprm4.ok similarity index 100% rename from src/test/resources/gawk/aryprm4.ok rename to src/it/resources/gawk/aryprm4.ok diff --git a/src/test/resources/gawk/aryprm5.awk b/src/it/resources/gawk/aryprm5.awk similarity index 100% rename from src/test/resources/gawk/aryprm5.awk rename to src/it/resources/gawk/aryprm5.awk diff --git a/src/test/resources/gawk/aryprm5.ok b/src/it/resources/gawk/aryprm5.ok similarity index 100% rename from src/test/resources/gawk/aryprm5.ok rename to src/it/resources/gawk/aryprm5.ok diff --git a/src/test/resources/gawk/aryprm6.awk b/src/it/resources/gawk/aryprm6.awk similarity index 100% rename from src/test/resources/gawk/aryprm6.awk rename to src/it/resources/gawk/aryprm6.awk diff --git a/src/test/resources/gawk/aryprm6.ok b/src/it/resources/gawk/aryprm6.ok similarity index 100% rename from src/test/resources/gawk/aryprm6.ok rename to src/it/resources/gawk/aryprm6.ok diff --git a/src/test/resources/gawk/aryprm7.awk b/src/it/resources/gawk/aryprm7.awk similarity index 100% rename from src/test/resources/gawk/aryprm7.awk rename to src/it/resources/gawk/aryprm7.awk diff --git a/src/test/resources/gawk/aryprm7.ok b/src/it/resources/gawk/aryprm7.ok similarity index 100% rename from src/test/resources/gawk/aryprm7.ok rename to src/it/resources/gawk/aryprm7.ok diff --git a/src/test/resources/gawk/aryprm8.awk b/src/it/resources/gawk/aryprm8.awk similarity index 100% rename from src/test/resources/gawk/aryprm8.awk rename to src/it/resources/gawk/aryprm8.awk diff --git a/src/test/resources/gawk/aryprm8.ok b/src/it/resources/gawk/aryprm8.ok similarity index 100% rename from src/test/resources/gawk/aryprm8.ok rename to src/it/resources/gawk/aryprm8.ok diff --git a/src/test/resources/gawk/aryprm9.awk b/src/it/resources/gawk/aryprm9.awk similarity index 100% rename from src/test/resources/gawk/aryprm9.awk rename to src/it/resources/gawk/aryprm9.awk diff --git a/src/test/resources/gawk/aryprm9.ok b/src/it/resources/gawk/aryprm9.ok similarity index 100% rename from src/test/resources/gawk/aryprm9.ok rename to src/it/resources/gawk/aryprm9.ok diff --git a/src/test/resources/gawk/arysubnm.awk b/src/it/resources/gawk/arysubnm.awk similarity index 100% rename from src/test/resources/gawk/arysubnm.awk rename to src/it/resources/gawk/arysubnm.awk diff --git a/src/test/resources/gawk/arysubnm.ok b/src/it/resources/gawk/arysubnm.ok similarity index 100% rename from src/test/resources/gawk/arysubnm.ok rename to src/it/resources/gawk/arysubnm.ok diff --git a/src/test/resources/gawk/aryunasgn.awk b/src/it/resources/gawk/aryunasgn.awk similarity index 100% rename from src/test/resources/gawk/aryunasgn.awk rename to src/it/resources/gawk/aryunasgn.awk diff --git a/src/test/resources/gawk/aryunasgn.ok b/src/it/resources/gawk/aryunasgn.ok similarity index 100% rename from src/test/resources/gawk/aryunasgn.ok rename to src/it/resources/gawk/aryunasgn.ok diff --git a/src/test/resources/gawk/asgext.awk b/src/it/resources/gawk/asgext.awk similarity index 100% rename from src/test/resources/gawk/asgext.awk rename to src/it/resources/gawk/asgext.awk diff --git a/src/test/resources/gawk/asgext.in b/src/it/resources/gawk/asgext.in similarity index 100% rename from src/test/resources/gawk/asgext.in rename to src/it/resources/gawk/asgext.in diff --git a/src/test/resources/gawk/asgext.ok b/src/it/resources/gawk/asgext.ok similarity index 100% rename from src/test/resources/gawk/asgext.ok rename to src/it/resources/gawk/asgext.ok diff --git a/src/test/resources/gawk/asort.awk b/src/it/resources/gawk/asort.awk similarity index 100% rename from src/test/resources/gawk/asort.awk rename to src/it/resources/gawk/asort.awk diff --git a/src/test/resources/gawk/asort.ok b/src/it/resources/gawk/asort.ok similarity index 100% rename from src/test/resources/gawk/asort.ok rename to src/it/resources/gawk/asort.ok diff --git a/src/test/resources/gawk/asortbool.awk b/src/it/resources/gawk/asortbool.awk similarity index 100% rename from src/test/resources/gawk/asortbool.awk rename to src/it/resources/gawk/asortbool.awk diff --git a/src/test/resources/gawk/asortbool.ok b/src/it/resources/gawk/asortbool.ok similarity index 100% rename from src/test/resources/gawk/asortbool.ok rename to src/it/resources/gawk/asortbool.ok diff --git a/src/test/resources/gawk/asorti.awk b/src/it/resources/gawk/asorti.awk similarity index 100% rename from src/test/resources/gawk/asorti.awk rename to src/it/resources/gawk/asorti.awk diff --git a/src/test/resources/gawk/asorti.ok b/src/it/resources/gawk/asorti.ok similarity index 100% rename from src/test/resources/gawk/asorti.ok rename to src/it/resources/gawk/asorti.ok diff --git a/src/test/resources/gawk/asortsymtab.awk b/src/it/resources/gawk/asortsymtab.awk similarity index 100% rename from src/test/resources/gawk/asortsymtab.awk rename to src/it/resources/gawk/asortsymtab.awk diff --git a/src/test/resources/gawk/asortsymtab.ok b/src/it/resources/gawk/asortsymtab.ok similarity index 100% rename from src/test/resources/gawk/asortsymtab.ok rename to src/it/resources/gawk/asortsymtab.ok diff --git a/src/test/resources/gawk/assignnumfield.awk b/src/it/resources/gawk/assignnumfield.awk similarity index 100% rename from src/test/resources/gawk/assignnumfield.awk rename to src/it/resources/gawk/assignnumfield.awk diff --git a/src/test/resources/gawk/assignnumfield.in b/src/it/resources/gawk/assignnumfield.in similarity index 100% rename from src/test/resources/gawk/assignnumfield.in rename to src/it/resources/gawk/assignnumfield.in diff --git a/src/test/resources/gawk/assignnumfield.ok b/src/it/resources/gawk/assignnumfield.ok similarity index 100% rename from src/test/resources/gawk/assignnumfield.ok rename to src/it/resources/gawk/assignnumfield.ok diff --git a/src/test/resources/gawk/assignnumfield2.awk b/src/it/resources/gawk/assignnumfield2.awk similarity index 100% rename from src/test/resources/gawk/assignnumfield2.awk rename to src/it/resources/gawk/assignnumfield2.awk diff --git a/src/test/resources/gawk/assignnumfield2.ok b/src/it/resources/gawk/assignnumfield2.ok similarity index 100% rename from src/test/resources/gawk/assignnumfield2.ok rename to src/it/resources/gawk/assignnumfield2.ok diff --git a/src/test/resources/gawk/awkpath.ok b/src/it/resources/gawk/awkpath.ok similarity index 100% rename from src/test/resources/gawk/awkpath.ok rename to src/it/resources/gawk/awkpath.ok diff --git a/src/test/resources/gawk/back89.awk b/src/it/resources/gawk/back89.awk similarity index 100% rename from src/test/resources/gawk/back89.awk rename to src/it/resources/gawk/back89.awk diff --git a/src/test/resources/gawk/back89.in b/src/it/resources/gawk/back89.in similarity index 100% rename from src/test/resources/gawk/back89.in rename to src/it/resources/gawk/back89.in diff --git a/src/test/resources/gawk/back89.ok b/src/it/resources/gawk/back89.ok similarity index 100% rename from src/test/resources/gawk/back89.ok rename to src/it/resources/gawk/back89.ok diff --git a/src/test/resources/gawk/backbigs1.awk b/src/it/resources/gawk/backbigs1.awk similarity index 100% rename from src/test/resources/gawk/backbigs1.awk rename to src/it/resources/gawk/backbigs1.awk diff --git a/src/test/resources/gawk/backbigs1.in b/src/it/resources/gawk/backbigs1.in similarity index 100% rename from src/test/resources/gawk/backbigs1.in rename to src/it/resources/gawk/backbigs1.in diff --git a/src/test/resources/gawk/backbigs1.ok b/src/it/resources/gawk/backbigs1.ok similarity index 100% rename from src/test/resources/gawk/backbigs1.ok rename to src/it/resources/gawk/backbigs1.ok diff --git a/src/test/resources/gawk/backgsub.awk b/src/it/resources/gawk/backgsub.awk similarity index 100% rename from src/test/resources/gawk/backgsub.awk rename to src/it/resources/gawk/backgsub.awk diff --git a/src/test/resources/gawk/backgsub.in b/src/it/resources/gawk/backgsub.in similarity index 100% rename from src/test/resources/gawk/backgsub.in rename to src/it/resources/gawk/backgsub.in diff --git a/src/test/resources/gawk/backgsub.ok b/src/it/resources/gawk/backgsub.ok similarity index 100% rename from src/test/resources/gawk/backgsub.ok rename to src/it/resources/gawk/backgsub.ok diff --git a/src/test/resources/gawk/backsmalls1.awk b/src/it/resources/gawk/backsmalls1.awk similarity index 100% rename from src/test/resources/gawk/backsmalls1.awk rename to src/it/resources/gawk/backsmalls1.awk diff --git a/src/test/resources/gawk/backsmalls1.in b/src/it/resources/gawk/backsmalls1.in similarity index 100% rename from src/test/resources/gawk/backsmalls1.in rename to src/it/resources/gawk/backsmalls1.in diff --git a/src/test/resources/gawk/backsmalls1.ok b/src/it/resources/gawk/backsmalls1.ok similarity index 100% rename from src/test/resources/gawk/backsmalls1.ok rename to src/it/resources/gawk/backsmalls1.ok diff --git a/src/test/resources/gawk/backsmalls2.awk b/src/it/resources/gawk/backsmalls2.awk similarity index 100% rename from src/test/resources/gawk/backsmalls2.awk rename to src/it/resources/gawk/backsmalls2.awk diff --git a/src/test/resources/gawk/backsmalls2.ok b/src/it/resources/gawk/backsmalls2.ok similarity index 100% rename from src/test/resources/gawk/backsmalls2.ok rename to src/it/resources/gawk/backsmalls2.ok diff --git a/src/test/resources/gawk/backw.awk b/src/it/resources/gawk/backw.awk similarity index 100% rename from src/test/resources/gawk/backw.awk rename to src/it/resources/gawk/backw.awk diff --git a/src/test/resources/gawk/backw.in b/src/it/resources/gawk/backw.in similarity index 100% rename from src/test/resources/gawk/backw.in rename to src/it/resources/gawk/backw.in diff --git a/src/test/resources/gawk/backw.ok b/src/it/resources/gawk/backw.ok similarity index 100% rename from src/test/resources/gawk/backw.ok rename to src/it/resources/gawk/backw.ok diff --git a/src/test/resources/gawk/badargs.ok b/src/it/resources/gawk/badargs.ok similarity index 100% rename from src/test/resources/gawk/badargs.ok rename to src/it/resources/gawk/badargs.ok diff --git a/src/test/resources/gawk/badassign1.awk b/src/it/resources/gawk/badassign1.awk similarity index 100% rename from src/test/resources/gawk/badassign1.awk rename to src/it/resources/gawk/badassign1.awk diff --git a/src/test/resources/gawk/badassign1.ok b/src/it/resources/gawk/badassign1.ok similarity index 100% rename from src/test/resources/gawk/badassign1.ok rename to src/it/resources/gawk/badassign1.ok diff --git a/src/test/resources/gawk/badbuild.awk b/src/it/resources/gawk/badbuild.awk similarity index 100% rename from src/test/resources/gawk/badbuild.awk rename to src/it/resources/gawk/badbuild.awk diff --git a/src/test/resources/gawk/badbuild.in b/src/it/resources/gawk/badbuild.in similarity index 100% rename from src/test/resources/gawk/badbuild.in rename to src/it/resources/gawk/badbuild.in diff --git a/src/test/resources/gawk/badbuild.ok b/src/it/resources/gawk/badbuild.ok similarity index 100% rename from src/test/resources/gawk/badbuild.ok rename to src/it/resources/gawk/badbuild.ok diff --git a/src/test/resources/gawk/beginfile1.awk b/src/it/resources/gawk/beginfile1.awk similarity index 100% rename from src/test/resources/gawk/beginfile1.awk rename to src/it/resources/gawk/beginfile1.awk diff --git a/src/test/resources/gawk/beginfile1.ok b/src/it/resources/gawk/beginfile1.ok similarity index 100% rename from src/test/resources/gawk/beginfile1.ok rename to src/it/resources/gawk/beginfile1.ok diff --git a/src/test/resources/gawk/beginfile2.in b/src/it/resources/gawk/beginfile2.in similarity index 100% rename from src/test/resources/gawk/beginfile2.in rename to src/it/resources/gawk/beginfile2.in diff --git a/src/test/resources/gawk/beginfile2.ok b/src/it/resources/gawk/beginfile2.ok similarity index 100% rename from src/test/resources/gawk/beginfile2.ok rename to src/it/resources/gawk/beginfile2.ok diff --git a/src/test/resources/gawk/beginfile2.sh b/src/it/resources/gawk/beginfile2.sh similarity index 100% rename from src/test/resources/gawk/beginfile2.sh rename to src/it/resources/gawk/beginfile2.sh diff --git a/src/test/resources/gawk/binmode1.ok b/src/it/resources/gawk/binmode1.ok similarity index 100% rename from src/test/resources/gawk/binmode1.ok rename to src/it/resources/gawk/binmode1.ok diff --git a/src/test/resources/gawk/callparam.awk b/src/it/resources/gawk/callparam.awk similarity index 100% rename from src/test/resources/gawk/callparam.awk rename to src/it/resources/gawk/callparam.awk diff --git a/src/test/resources/gawk/callparam.ok b/src/it/resources/gawk/callparam.ok similarity index 100% rename from src/test/resources/gawk/callparam.ok rename to src/it/resources/gawk/callparam.ok diff --git a/src/test/resources/gawk/charasbytes.awk b/src/it/resources/gawk/charasbytes.awk similarity index 100% rename from src/test/resources/gawk/charasbytes.awk rename to src/it/resources/gawk/charasbytes.awk diff --git a/src/test/resources/gawk/charasbytes.in b/src/it/resources/gawk/charasbytes.in similarity index 100% rename from src/test/resources/gawk/charasbytes.in rename to src/it/resources/gawk/charasbytes.in diff --git a/src/test/resources/gawk/charasbytes.ok b/src/it/resources/gawk/charasbytes.ok similarity index 100% rename from src/test/resources/gawk/charasbytes.ok rename to src/it/resources/gawk/charasbytes.ok diff --git a/src/it/resources/gawk/check_retest.awk b/src/it/resources/gawk/check_retest.awk new file mode 100644 index 00000000..b023a533 --- /dev/null +++ b/src/it/resources/gawk/check_retest.awk @@ -0,0 +1,2 @@ +FNR == 1 { save = $0 } +FNR %2 == 0 { if ($0 != save) exit 1 } diff --git a/src/it/resources/gawk/checknegtime.awk b/src/it/resources/gawk/checknegtime.awk new file mode 100644 index 00000000..06dfcae9 --- /dev/null +++ b/src/it/resources/gawk/checknegtime.awk @@ -0,0 +1,22 @@ +NR == 1 { + # Tue Dec 15 07:00:00 GMT 1959 + Weekday = $1 + Month = $2 + Day = $3 + Time = $4 + Timezone = $5 + Year = $6 +} + +NR == 2 { + if (NF == 0) # MinGW gives an empty line + exit 0 + + # Some BSDs give us UTC in the timezone + if ($1 == Weekday && $2 == Month && $3 == Day && + $4 == Time && $6 == Year) + exit 0 + + # Some other mismatch + exit 1 +} diff --git a/src/test/resources/gawk/childin.awk b/src/it/resources/gawk/childin.awk similarity index 100% rename from src/test/resources/gawk/childin.awk rename to src/it/resources/gawk/childin.awk diff --git a/src/test/resources/gawk/childin.in b/src/it/resources/gawk/childin.in similarity index 100% rename from src/test/resources/gawk/childin.in rename to src/it/resources/gawk/childin.in diff --git a/src/test/resources/gawk/childin.ok b/src/it/resources/gawk/childin.ok similarity index 100% rename from src/test/resources/gawk/childin.ok rename to src/it/resources/gawk/childin.ok diff --git a/src/it/resources/gawk/clobber.awk b/src/it/resources/gawk/clobber.awk new file mode 100644 index 00000000..388414b4 --- /dev/null +++ b/src/it/resources/gawk/clobber.awk @@ -0,0 +1,98 @@ +BEGIN { + print "000800" > "seq" + close("seq") + ARGV[1] = "seq" + ARGC = 2 +} + +{ printf "%06d", $1 + 1 >"seq"; + printf "%06d", $1 + 1 } +# Date: Mon, 20 Jan 1997 15:14:06 -0600 (CST) +# From: Dave Bodenstab +# To: bug-gnu-utils@prep.ai.mit.edu +# Subject: GNU awk 3.0.2 core dump +# Cc: arnold@gnu.ai.mit.edu +# +# The following program produces a core file on my FreeBSD system: +# +# bash$ echo 000800 >/tmp/seq +# bash$ gawk '{ printf "%06d", $1 + 1 >"/tmp/seq"; +# printf "%06d", $1 + 1 }' /tmp/seq +# +# This fragment comes from mgetty+sendfax. +# +# Here is the trace: +# +# Script started on Mon Jan 20 15:09:04 1997 +# bash$ gawk --version +# GNU Awk 3.0.2 +# Copyright (C) 1989, 1991-1996 Free Software Foundation. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# bash$ gdb gawk +# GDB is free software and you are welcome to distribute copies of it +# under certain conditions; type "show copying" to see the conditions. +# There is absolutely no warranty for GDB; type "show warranty" for details. +# GDB 4.13 (i386-unknown-freebsd), +# Copyright 1994 Free Software Foundation, Inc... +# (gdb) shell echo 000800 >/tmp/seq +# (gdb) r '{ printf "%06d", $1 + 1 >"/tmp/seq"; printf "%06d", $1 + 1 }(gdb) r '{ printf "%06d", $1 + 1 >"/tmp/seq"; printf "%06d", $1 + 1 }' /tmp/seq +# Starting program: /scratch/archive/src/cmd/gnuawk-3.0.2/gawk '{ printf "%06d", $1 + 1 >"/tmp/seq"; printf "%06d", $1 + 1 }' /tmp/seq +# +# Program received signal SIGBUS, Bus error. +# 0xd86f in def_parse_field (up_to=1, buf=0x37704, len=6, fs=0x3b240, rp=0x0, +# set=0xce6c , n=0x0) at field.c:391 +# 391 sav = *end; +# (gdb) bt +# #0 0xd86f in def_parse_field (up_to=1, buf=0x37704, len=6, fs=0x3b240, +# rp=0x0, set=0xce6c , n=0x0) at field.c:391 +# #1 0xddb1 in get_field (requested=1, assign=0x0) at field.c:669 +# #2 0xc25d in r_get_lhs (ptr=0x3b9b4, assign=0x0) at eval.c:1339 +# #3 0x9ab0 in r_tree_eval (tree=0x3b9b4, iscond=0) at eval.c:604 +# #4 0xa5f1 in r_tree_eval (tree=0x3b9fc, iscond=0) at eval.c:745 +# #5 0x4661 in format_tree (fmt_string=0x3e040 "%06d", n0=0, carg=0x3ba20) +# at builtin.c:620 +# #6 0x5beb in do_sprintf (tree=0x3b96c) at builtin.c:809 +# #7 0x5cd5 in do_printf (tree=0x3ba8c) at builtin.c:844 +# #8 0x9271 in interpret (tree=0x3ba8c) at eval.c:465 +# #9 0x8ca3 in interpret (tree=0x3bbd0) at eval.c:308 +# #10 0x8c34 in interpret (tree=0x3bc18) at eval.c:292 +# #11 0xf069 in do_input () at io.c:312 +# #12 0x12ba9 in main (argc=3, argv=0xefbfd538) at main.c:393 +# (gdb) l +# 386 *buf += len; +# 387 return nf; +# 388 } +# 389 +# 390 /* before doing anything save the char at *end */ +# 391 sav = *end; +# 392 /* because it will be destroyed now: */ +# 393 +# 394 *end = ' '; /* sentinel character */ +# 395 for (; nf < up_to; scan++) { +# (gdb) print end +# $1 = 0x804d006 +# (gdb) print buf +# $2 = (char **) 0x37704 +# (gdb) print *buf +# $3 = 0x804d000 +# (gdb) q +# The program is running. Quit anyway (and kill it)? (y or n) y +# bash$ exit +# +# Script done on Mon Jan 20 15:11:07 1997 +# +# Dave Bodenstab +# imdave@synet.net diff --git a/src/it/resources/gawk/clobber.ok b/src/it/resources/gawk/clobber.ok new file mode 100644 index 00000000..71057085 --- /dev/null +++ b/src/it/resources/gawk/clobber.ok @@ -0,0 +1 @@ +000801 \ No newline at end of file diff --git a/src/test/resources/gawk/clos1way.awk b/src/it/resources/gawk/clos1way.awk similarity index 100% rename from src/test/resources/gawk/clos1way.awk rename to src/it/resources/gawk/clos1way.awk diff --git a/src/test/resources/gawk/clos1way.ok b/src/it/resources/gawk/clos1way.ok similarity index 100% rename from src/test/resources/gawk/clos1way.ok rename to src/it/resources/gawk/clos1way.ok diff --git a/src/test/resources/gawk/clos1way2.awk b/src/it/resources/gawk/clos1way2.awk similarity index 100% rename from src/test/resources/gawk/clos1way2.awk rename to src/it/resources/gawk/clos1way2.awk diff --git a/src/test/resources/gawk/clos1way2.in b/src/it/resources/gawk/clos1way2.in similarity index 100% rename from src/test/resources/gawk/clos1way2.in rename to src/it/resources/gawk/clos1way2.in diff --git a/src/test/resources/gawk/clos1way2.ok b/src/it/resources/gawk/clos1way2.ok similarity index 100% rename from src/test/resources/gawk/clos1way2.ok rename to src/it/resources/gawk/clos1way2.ok diff --git a/src/test/resources/gawk/clos1way3.awk b/src/it/resources/gawk/clos1way3.awk similarity index 100% rename from src/test/resources/gawk/clos1way3.awk rename to src/it/resources/gawk/clos1way3.awk diff --git a/src/test/resources/gawk/clos1way3.ok b/src/it/resources/gawk/clos1way3.ok similarity index 100% rename from src/test/resources/gawk/clos1way3.ok rename to src/it/resources/gawk/clos1way3.ok diff --git a/src/test/resources/gawk/clos1way4.awk b/src/it/resources/gawk/clos1way4.awk similarity index 100% rename from src/test/resources/gawk/clos1way4.awk rename to src/it/resources/gawk/clos1way4.awk diff --git a/src/test/resources/gawk/clos1way4.ok b/src/it/resources/gawk/clos1way4.ok similarity index 100% rename from src/test/resources/gawk/clos1way4.ok rename to src/it/resources/gawk/clos1way4.ok diff --git a/src/test/resources/gawk/clos1way5.awk b/src/it/resources/gawk/clos1way5.awk similarity index 100% rename from src/test/resources/gawk/clos1way5.awk rename to src/it/resources/gawk/clos1way5.awk diff --git a/src/test/resources/gawk/clos1way5.ok b/src/it/resources/gawk/clos1way5.ok similarity index 100% rename from src/test/resources/gawk/clos1way5.ok rename to src/it/resources/gawk/clos1way5.ok diff --git a/src/test/resources/gawk/clos1way6.awk b/src/it/resources/gawk/clos1way6.awk similarity index 100% rename from src/test/resources/gawk/clos1way6.awk rename to src/it/resources/gawk/clos1way6.awk diff --git a/src/test/resources/gawk/clos1way6.ok b/src/it/resources/gawk/clos1way6.ok similarity index 100% rename from src/test/resources/gawk/clos1way6.ok rename to src/it/resources/gawk/clos1way6.ok diff --git a/src/test/resources/gawk/close_status.awk b/src/it/resources/gawk/close_status.awk similarity index 100% rename from src/test/resources/gawk/close_status.awk rename to src/it/resources/gawk/close_status.awk diff --git a/src/test/resources/gawk/close_status.ok b/src/it/resources/gawk/close_status.ok similarity index 100% rename from src/test/resources/gawk/close_status.ok rename to src/it/resources/gawk/close_status.ok diff --git a/src/test/resources/gawk/closebad.awk b/src/it/resources/gawk/closebad.awk similarity index 100% rename from src/test/resources/gawk/closebad.awk rename to src/it/resources/gawk/closebad.awk diff --git a/src/test/resources/gawk/closebad.ok b/src/it/resources/gawk/closebad.ok similarity index 100% rename from src/test/resources/gawk/closebad.ok rename to src/it/resources/gawk/closebad.ok diff --git a/src/test/resources/gawk/clsflnam.awk b/src/it/resources/gawk/clsflnam.awk similarity index 100% rename from src/test/resources/gawk/clsflnam.awk rename to src/it/resources/gawk/clsflnam.awk diff --git a/src/test/resources/gawk/clsflnam.in b/src/it/resources/gawk/clsflnam.in similarity index 100% rename from src/test/resources/gawk/clsflnam.in rename to src/it/resources/gawk/clsflnam.in diff --git a/src/test/resources/gawk/clsflnam.ok b/src/it/resources/gawk/clsflnam.ok similarity index 100% rename from src/test/resources/gawk/clsflnam.ok rename to src/it/resources/gawk/clsflnam.ok diff --git a/src/test/resources/gawk/cmdlinefsbacknl.ok b/src/it/resources/gawk/cmdlinefsbacknl.ok similarity index 100% rename from src/test/resources/gawk/cmdlinefsbacknl.ok rename to src/it/resources/gawk/cmdlinefsbacknl.ok diff --git a/src/test/resources/gawk/cmdlinefsbacknl.sh b/src/it/resources/gawk/cmdlinefsbacknl.sh similarity index 100% rename from src/test/resources/gawk/cmdlinefsbacknl.sh rename to src/it/resources/gawk/cmdlinefsbacknl.sh diff --git a/src/test/resources/gawk/colonwarn.awk b/src/it/resources/gawk/colonwarn.awk similarity index 100% rename from src/test/resources/gawk/colonwarn.awk rename to src/it/resources/gawk/colonwarn.awk diff --git a/src/test/resources/gawk/colonwarn.in b/src/it/resources/gawk/colonwarn.in similarity index 100% rename from src/test/resources/gawk/colonwarn.in rename to src/it/resources/gawk/colonwarn.in diff --git a/src/test/resources/gawk/colonwarn.ok b/src/it/resources/gawk/colonwarn.ok similarity index 100% rename from src/test/resources/gawk/colonwarn.ok rename to src/it/resources/gawk/colonwarn.ok diff --git a/src/test/resources/gawk/commas.awk b/src/it/resources/gawk/commas.awk similarity index 100% rename from src/test/resources/gawk/commas.awk rename to src/it/resources/gawk/commas.awk diff --git a/src/test/resources/gawk/commas.ok b/src/it/resources/gawk/commas.ok similarity index 100% rename from src/test/resources/gawk/commas.ok rename to src/it/resources/gawk/commas.ok diff --git a/src/test/resources/gawk/compare.awk b/src/it/resources/gawk/compare.awk similarity index 100% rename from src/test/resources/gawk/compare.awk rename to src/it/resources/gawk/compare.awk diff --git a/src/test/resources/gawk/compare.in b/src/it/resources/gawk/compare.in similarity index 100% rename from src/test/resources/gawk/compare.in rename to src/it/resources/gawk/compare.in diff --git a/src/test/resources/gawk/compare.ok b/src/it/resources/gawk/compare.ok similarity index 100% rename from src/test/resources/gawk/compare.ok rename to src/it/resources/gawk/compare.ok diff --git a/src/test/resources/gawk/compare2.awk b/src/it/resources/gawk/compare2.awk similarity index 100% rename from src/test/resources/gawk/compare2.awk rename to src/it/resources/gawk/compare2.awk diff --git a/src/test/resources/gawk/compare2.ok b/src/it/resources/gawk/compare2.ok similarity index 100% rename from src/test/resources/gawk/compare2.ok rename to src/it/resources/gawk/compare2.ok diff --git a/src/test/resources/gawk/concat1.awk b/src/it/resources/gawk/concat1.awk similarity index 100% rename from src/test/resources/gawk/concat1.awk rename to src/it/resources/gawk/concat1.awk diff --git a/src/test/resources/gawk/concat1.in b/src/it/resources/gawk/concat1.in similarity index 100% rename from src/test/resources/gawk/concat1.in rename to src/it/resources/gawk/concat1.in diff --git a/src/test/resources/gawk/concat1.ok b/src/it/resources/gawk/concat1.ok similarity index 100% rename from src/test/resources/gawk/concat1.ok rename to src/it/resources/gawk/concat1.ok diff --git a/src/test/resources/gawk/concat2.awk b/src/it/resources/gawk/concat2.awk similarity index 100% rename from src/test/resources/gawk/concat2.awk rename to src/it/resources/gawk/concat2.awk diff --git a/src/test/resources/gawk/concat2.ok b/src/it/resources/gawk/concat2.ok similarity index 100% rename from src/test/resources/gawk/concat2.ok rename to src/it/resources/gawk/concat2.ok diff --git a/src/test/resources/gawk/concat3.awk b/src/it/resources/gawk/concat3.awk similarity index 100% rename from src/test/resources/gawk/concat3.awk rename to src/it/resources/gawk/concat3.awk diff --git a/src/test/resources/gawk/concat3.ok b/src/it/resources/gawk/concat3.ok similarity index 100% rename from src/test/resources/gawk/concat3.ok rename to src/it/resources/gawk/concat3.ok diff --git a/src/test/resources/gawk/concat4.awk b/src/it/resources/gawk/concat4.awk similarity index 100% rename from src/test/resources/gawk/concat4.awk rename to src/it/resources/gawk/concat4.awk diff --git a/src/test/resources/gawk/concat4.in b/src/it/resources/gawk/concat4.in similarity index 100% rename from src/test/resources/gawk/concat4.in rename to src/it/resources/gawk/concat4.in diff --git a/src/test/resources/gawk/concat4.ok b/src/it/resources/gawk/concat4.ok similarity index 100% rename from src/test/resources/gawk/concat4.ok rename to src/it/resources/gawk/concat4.ok diff --git a/src/test/resources/gawk/concat5.awk b/src/it/resources/gawk/concat5.awk similarity index 100% rename from src/test/resources/gawk/concat5.awk rename to src/it/resources/gawk/concat5.awk diff --git a/src/test/resources/gawk/concat5.ok b/src/it/resources/gawk/concat5.ok similarity index 100% rename from src/test/resources/gawk/concat5.ok rename to src/it/resources/gawk/concat5.ok diff --git a/src/test/resources/gawk/convfmt.awk b/src/it/resources/gawk/convfmt.awk similarity index 100% rename from src/test/resources/gawk/convfmt.awk rename to src/it/resources/gawk/convfmt.awk diff --git a/src/test/resources/gawk/convfmt.ok b/src/it/resources/gawk/convfmt.ok similarity index 100% rename from src/test/resources/gawk/convfmt.ok rename to src/it/resources/gawk/convfmt.ok diff --git a/src/test/resources/gawk/crlf.awk b/src/it/resources/gawk/crlf.awk similarity index 100% rename from src/test/resources/gawk/crlf.awk rename to src/it/resources/gawk/crlf.awk diff --git a/src/test/resources/gawk/crlf.ok b/src/it/resources/gawk/crlf.ok similarity index 100% rename from src/test/resources/gawk/crlf.ok rename to src/it/resources/gawk/crlf.ok diff --git a/src/test/resources/gawk/csv1.awk b/src/it/resources/gawk/csv1.awk similarity index 100% rename from src/test/resources/gawk/csv1.awk rename to src/it/resources/gawk/csv1.awk diff --git a/src/test/resources/gawk/csv1.in b/src/it/resources/gawk/csv1.in similarity index 100% rename from src/test/resources/gawk/csv1.in rename to src/it/resources/gawk/csv1.in diff --git a/src/test/resources/gawk/csv1.ok b/src/it/resources/gawk/csv1.ok similarity index 100% rename from src/test/resources/gawk/csv1.ok rename to src/it/resources/gawk/csv1.ok diff --git a/src/test/resources/gawk/csv2.awk b/src/it/resources/gawk/csv2.awk similarity index 100% rename from src/test/resources/gawk/csv2.awk rename to src/it/resources/gawk/csv2.awk diff --git a/src/test/resources/gawk/csv2.ok b/src/it/resources/gawk/csv2.ok similarity index 100% rename from src/test/resources/gawk/csv2.ok rename to src/it/resources/gawk/csv2.ok diff --git a/src/test/resources/gawk/csv3.awk b/src/it/resources/gawk/csv3.awk similarity index 100% rename from src/test/resources/gawk/csv3.awk rename to src/it/resources/gawk/csv3.awk diff --git a/src/test/resources/gawk/csv3.in b/src/it/resources/gawk/csv3.in similarity index 100% rename from src/test/resources/gawk/csv3.in rename to src/it/resources/gawk/csv3.in diff --git a/src/test/resources/gawk/csv3.ok b/src/it/resources/gawk/csv3.ok similarity index 100% rename from src/test/resources/gawk/csv3.ok rename to src/it/resources/gawk/csv3.ok diff --git a/src/test/resources/gawk/csvodd.awk b/src/it/resources/gawk/csvodd.awk similarity index 100% rename from src/test/resources/gawk/csvodd.awk rename to src/it/resources/gawk/csvodd.awk diff --git a/src/test/resources/gawk/csvodd.in b/src/it/resources/gawk/csvodd.in similarity index 100% rename from src/test/resources/gawk/csvodd.in rename to src/it/resources/gawk/csvodd.in diff --git a/src/test/resources/gawk/csvodd.ok b/src/it/resources/gawk/csvodd.ok similarity index 100% rename from src/test/resources/gawk/csvodd.ok rename to src/it/resources/gawk/csvodd.ok diff --git a/src/test/resources/gawk/datanonl.awk b/src/it/resources/gawk/datanonl.awk similarity index 100% rename from src/test/resources/gawk/datanonl.awk rename to src/it/resources/gawk/datanonl.awk diff --git a/src/test/resources/gawk/datanonl.in b/src/it/resources/gawk/datanonl.in similarity index 100% rename from src/test/resources/gawk/datanonl.in rename to src/it/resources/gawk/datanonl.in diff --git a/src/test/resources/gawk/datanonl.ok b/src/it/resources/gawk/datanonl.ok similarity index 100% rename from src/test/resources/gawk/datanonl.ok rename to src/it/resources/gawk/datanonl.ok diff --git a/src/it/resources/gawk/dbugeval.in b/src/it/resources/gawk/dbugeval.in new file mode 100644 index 00000000..6a3c2459 --- /dev/null +++ b/src/it/resources/gawk/dbugeval.in @@ -0,0 +1,2 @@ +eval "" +eval "" diff --git a/src/it/resources/gawk/dbugeval.ok b/src/it/resources/gawk/dbugeval.ok new file mode 100644 index 00000000..284f2abb --- /dev/null +++ b/src/it/resources/gawk/dbugeval.ok @@ -0,0 +1 @@ +EXIT CODE: 2 diff --git a/src/it/resources/gawk/dbugeval2.awk b/src/it/resources/gawk/dbugeval2.awk new file mode 100644 index 00000000..4997d1b4 --- /dev/null +++ b/src/it/resources/gawk/dbugeval2.awk @@ -0,0 +1,4 @@ +BEGIN { + a = 2 + b = 3 +} diff --git a/src/it/resources/gawk/dbugeval2.in b/src/it/resources/gawk/dbugeval2.in new file mode 100644 index 00000000..165f7147 --- /dev/null +++ b/src/it/resources/gawk/dbugeval2.in @@ -0,0 +1,3 @@ +b 3 +r +eval "print and(a, 3)" diff --git a/src/it/resources/gawk/dbugeval2.ok b/src/it/resources/gawk/dbugeval2.ok new file mode 100644 index 00000000..38cd7bb6 --- /dev/null +++ b/src/it/resources/gawk/dbugeval2.ok @@ -0,0 +1,7 @@ +Breakpoint 1 set at file `dbugeval2.awk', line 3 +Starting program: +Stopping in BEGIN ... +Breakpoint 1, main() at `dbugeval2.awk':3 +3 b = 3 +2 +EXIT CODE: 2 diff --git a/src/it/resources/gawk/dbugeval3.awk b/src/it/resources/gawk/dbugeval3.awk new file mode 100644 index 00000000..cc69752a --- /dev/null +++ b/src/it/resources/gawk/dbugeval3.awk @@ -0,0 +1,4 @@ + +function isnumeric(x) { + return (length(x) && x == x+0) +} diff --git a/src/it/resources/gawk/dbugeval3.in b/src/it/resources/gawk/dbugeval3.in new file mode 100644 index 00000000..5ea49024 --- /dev/null +++ b/src/it/resources/gawk/dbugeval3.in @@ -0,0 +1,2 @@ +eval "print isnumeric(\"hello\")" +eval "print isnumeric(\"42.5\")" diff --git a/src/it/resources/gawk/dbugeval3.ok b/src/it/resources/gawk/dbugeval3.ok new file mode 100644 index 00000000..22550206 --- /dev/null +++ b/src/it/resources/gawk/dbugeval3.ok @@ -0,0 +1,3 @@ +0 +1 +EXIT CODE: 2 diff --git a/src/test/resources/gawk/delarprm.ok b/src/it/resources/gawk/dbugeval4.awk similarity index 100% rename from src/test/resources/gawk/delarprm.ok rename to src/it/resources/gawk/dbugeval4.awk diff --git a/src/it/resources/gawk/dbugeval4.in b/src/it/resources/gawk/dbugeval4.in new file mode 100644 index 00000000..cf7b513f --- /dev/null +++ b/src/it/resources/gawk/dbugeval4.in @@ -0,0 +1,2 @@ +eval "a()" +eval "print 1" diff --git a/src/it/resources/gawk/dbugeval4.ok b/src/it/resources/gawk/dbugeval4.ok new file mode 100644 index 00000000..a40d0891 --- /dev/null +++ b/src/it/resources/gawk/dbugeval4.ok @@ -0,0 +1,5 @@ +gawk: cmd. line:1: fatal: function `a' not defined +fatal error during eval, need to restart. +Restarting ... +1 +EXIT CODE: 2 diff --git a/src/it/resources/gawk/dbugtypedre1.awk b/src/it/resources/gawk/dbugtypedre1.awk new file mode 100644 index 00000000..b8c0b6d7 --- /dev/null +++ b/src/it/resources/gawk/dbugtypedre1.awk @@ -0,0 +1 @@ +@include "typeof1.awk" diff --git a/src/it/resources/gawk/dbugtypedre1.in b/src/it/resources/gawk/dbugtypedre1.in new file mode 100644 index 00000000..00158c65 --- /dev/null +++ b/src/it/resources/gawk/dbugtypedre1.in @@ -0,0 +1,4 @@ +watch e +run +next +p e diff --git a/src/it/resources/gawk/dbugtypedre1.ok b/src/it/resources/gawk/dbugtypedre1.ok new file mode 100644 index 00000000..ae89ff44 --- /dev/null +++ b/src/it/resources/gawk/dbugtypedre1.ok @@ -0,0 +1,17 @@ +Watchpoint 1: e +Starting program: +number +untyped +regexp +string +array number +Stopping in BEGIN ... +Watchpoint 1: e + Old value: untyped variable + New value: @/foo/ +main() at `typeof1.awk':7 +7 e = @/foo/ ; print typeof(e) +regexp +8 print typeof(@/bar/) +e = @/foo/ +EXIT CODE: 2 diff --git a/src/it/resources/gawk/dbugtypedre2.awk b/src/it/resources/gawk/dbugtypedre2.awk new file mode 100644 index 00000000..a78de32b --- /dev/null +++ b/src/it/resources/gawk/dbugtypedre2.awk @@ -0,0 +1 @@ +BEGIN { x = 0; x = @/[a-z]/; x = "" } diff --git a/src/it/resources/gawk/dbugtypedre2.in b/src/it/resources/gawk/dbugtypedre2.in new file mode 100644 index 00000000..d01ce5a5 --- /dev/null +++ b/src/it/resources/gawk/dbugtypedre2.in @@ -0,0 +1,4 @@ +w x + r + n + n diff --git a/src/it/resources/gawk/dbugtypedre2.ok b/src/it/resources/gawk/dbugtypedre2.ok new file mode 100644 index 00000000..ab70fb90 --- /dev/null +++ b/src/it/resources/gawk/dbugtypedre2.ok @@ -0,0 +1,15 @@ +Watchpoint 1: x +Starting program: +Stopping in BEGIN ... +Watchpoint 1: x + Old value: untyped variable + New value: 0 +main() at `dbugtypedre2.awk':1 +1 BEGIN { x = 0; x = @/[a-z]/; x = "" } +Watchpoint 1: x + Old value: 0 + New value: @/[a-z]/ +main() at `dbugtypedre2.awk':1 +1 BEGIN { x = 0; x = @/[a-z]/; x = "" } +Program exited normally with exit value: 0 +EXIT CODE: 2 diff --git a/src/test/resources/gawk/defref.awk b/src/it/resources/gawk/defref.awk similarity index 100% rename from src/test/resources/gawk/defref.awk rename to src/it/resources/gawk/defref.awk diff --git a/src/test/resources/gawk/defref.ok b/src/it/resources/gawk/defref.ok similarity index 100% rename from src/test/resources/gawk/defref.ok rename to src/it/resources/gawk/defref.ok diff --git a/src/test/resources/gawk/delargv.awk b/src/it/resources/gawk/delargv.awk similarity index 100% rename from src/test/resources/gawk/delargv.awk rename to src/it/resources/gawk/delargv.awk diff --git a/src/test/resources/gawk/delargv.ok b/src/it/resources/gawk/delargv.ok similarity index 100% rename from src/test/resources/gawk/delargv.ok rename to src/it/resources/gawk/delargv.ok diff --git a/src/test/resources/gawk/delarpm2.awk b/src/it/resources/gawk/delarpm2.awk similarity index 100% rename from src/test/resources/gawk/delarpm2.awk rename to src/it/resources/gawk/delarpm2.awk diff --git a/src/test/resources/gawk/delarpm2.ok b/src/it/resources/gawk/delarpm2.ok similarity index 100% rename from src/test/resources/gawk/delarpm2.ok rename to src/it/resources/gawk/delarpm2.ok diff --git a/src/test/resources/gawk/delarprm.awk b/src/it/resources/gawk/delarprm.awk similarity index 100% rename from src/test/resources/gawk/delarprm.awk rename to src/it/resources/gawk/delarprm.awk diff --git a/src/test/resources/gawk/elemnew1.ok b/src/it/resources/gawk/delarprm.ok similarity index 100% rename from src/test/resources/gawk/elemnew1.ok rename to src/it/resources/gawk/delarprm.ok diff --git a/src/test/resources/gawk/delfunc.awk b/src/it/resources/gawk/delfunc.awk similarity index 100% rename from src/test/resources/gawk/delfunc.awk rename to src/it/resources/gawk/delfunc.awk diff --git a/src/test/resources/gawk/delfunc.ok b/src/it/resources/gawk/delfunc.ok similarity index 100% rename from src/test/resources/gawk/delfunc.ok rename to src/it/resources/gawk/delfunc.ok diff --git a/src/test/resources/gawk/delsub.awk b/src/it/resources/gawk/delsub.awk similarity index 100% rename from src/test/resources/gawk/delsub.awk rename to src/it/resources/gawk/delsub.awk diff --git a/src/test/resources/gawk/delsub.ok b/src/it/resources/gawk/delsub.ok similarity index 100% rename from src/test/resources/gawk/delsub.ok rename to src/it/resources/gawk/delsub.ok diff --git a/src/test/resources/gawk/devfd.in1 b/src/it/resources/gawk/devfd.in1 similarity index 100% rename from src/test/resources/gawk/devfd.in1 rename to src/it/resources/gawk/devfd.in1 diff --git a/src/test/resources/gawk/devfd.in2 b/src/it/resources/gawk/devfd.in2 similarity index 100% rename from src/test/resources/gawk/devfd.in2 rename to src/it/resources/gawk/devfd.in2 diff --git a/src/test/resources/gawk/devfd.in4 b/src/it/resources/gawk/devfd.in4 similarity index 100% rename from src/test/resources/gawk/devfd.in4 rename to src/it/resources/gawk/devfd.in4 diff --git a/src/test/resources/gawk/devfd.in5 b/src/it/resources/gawk/devfd.in5 similarity index 100% rename from src/test/resources/gawk/devfd.in5 rename to src/it/resources/gawk/devfd.in5 diff --git a/src/test/resources/gawk/devfd.ok b/src/it/resources/gawk/devfd.ok similarity index 100% rename from src/test/resources/gawk/devfd.ok rename to src/it/resources/gawk/devfd.ok diff --git a/src/test/resources/gawk/devfd1.awk b/src/it/resources/gawk/devfd1.awk similarity index 100% rename from src/test/resources/gawk/devfd1.awk rename to src/it/resources/gawk/devfd1.awk diff --git a/src/test/resources/gawk/devfd1.ok b/src/it/resources/gawk/devfd1.ok similarity index 100% rename from src/test/resources/gawk/devfd1.ok rename to src/it/resources/gawk/devfd1.ok diff --git a/src/test/resources/gawk/devfd2.ok b/src/it/resources/gawk/devfd2.ok similarity index 100% rename from src/test/resources/gawk/devfd2.ok rename to src/it/resources/gawk/devfd2.ok diff --git a/src/test/resources/gawk/dfacheck1.awk b/src/it/resources/gawk/dfacheck1.awk similarity index 100% rename from src/test/resources/gawk/dfacheck1.awk rename to src/it/resources/gawk/dfacheck1.awk diff --git a/src/test/resources/gawk/dfacheck1.in b/src/it/resources/gawk/dfacheck1.in similarity index 100% rename from src/test/resources/gawk/dfacheck1.in rename to src/it/resources/gawk/dfacheck1.in diff --git a/src/test/resources/gawk/dfacheck1.ok b/src/it/resources/gawk/dfacheck1.ok similarity index 100% rename from src/test/resources/gawk/dfacheck1.ok rename to src/it/resources/gawk/dfacheck1.ok diff --git a/src/test/resources/gawk/dfacheck2.awk b/src/it/resources/gawk/dfacheck2.awk similarity index 100% rename from src/test/resources/gawk/dfacheck2.awk rename to src/it/resources/gawk/dfacheck2.awk diff --git a/src/test/resources/gawk/dfacheck2.in b/src/it/resources/gawk/dfacheck2.in similarity index 100% rename from src/test/resources/gawk/dfacheck2.in rename to src/it/resources/gawk/dfacheck2.in diff --git a/src/test/resources/gawk/dfacheck2.ok b/src/it/resources/gawk/dfacheck2.ok similarity index 100% rename from src/test/resources/gawk/dfacheck2.ok rename to src/it/resources/gawk/dfacheck2.ok diff --git a/src/test/resources/gawk/dfamb1.awk b/src/it/resources/gawk/dfamb1.awk similarity index 100% rename from src/test/resources/gawk/dfamb1.awk rename to src/it/resources/gawk/dfamb1.awk diff --git a/src/test/resources/gawk/dfamb1.in b/src/it/resources/gawk/dfamb1.in similarity index 100% rename from src/test/resources/gawk/dfamb1.in rename to src/it/resources/gawk/dfamb1.in diff --git a/src/test/resources/gawk/dfamb1.ok b/src/it/resources/gawk/dfamb1.ok similarity index 100% rename from src/test/resources/gawk/dfamb1.ok rename to src/it/resources/gawk/dfamb1.ok diff --git a/src/test/resources/gawk/dfastress.awk b/src/it/resources/gawk/dfastress.awk similarity index 100% rename from src/test/resources/gawk/dfastress.awk rename to src/it/resources/gawk/dfastress.awk diff --git a/src/test/resources/gawk/dfastress.ok b/src/it/resources/gawk/dfastress.ok similarity index 100% rename from src/test/resources/gawk/dfastress.ok rename to src/it/resources/gawk/dfastress.ok diff --git a/src/test/resources/gawk/divzero.awk b/src/it/resources/gawk/divzero.awk similarity index 100% rename from src/test/resources/gawk/divzero.awk rename to src/it/resources/gawk/divzero.awk diff --git a/src/test/resources/gawk/divzero.ok b/src/it/resources/gawk/divzero.ok similarity index 100% rename from src/test/resources/gawk/divzero.ok rename to src/it/resources/gawk/divzero.ok diff --git a/src/test/resources/gawk/divzero2.awk b/src/it/resources/gawk/divzero2.awk similarity index 100% rename from src/test/resources/gawk/divzero2.awk rename to src/it/resources/gawk/divzero2.awk diff --git a/src/test/resources/gawk/divzero2.ok b/src/it/resources/gawk/divzero2.ok similarity index 100% rename from src/test/resources/gawk/divzero2.ok rename to src/it/resources/gawk/divzero2.ok diff --git a/src/test/resources/gawk/double1.awk b/src/it/resources/gawk/double1.awk similarity index 100% rename from src/test/resources/gawk/double1.awk rename to src/it/resources/gawk/double1.awk diff --git a/src/test/resources/gawk/double1.ok b/src/it/resources/gawk/double1.ok similarity index 100% rename from src/test/resources/gawk/double1.ok rename to src/it/resources/gawk/double1.ok diff --git a/src/test/resources/gawk/double2.awk b/src/it/resources/gawk/double2.awk similarity index 100% rename from src/test/resources/gawk/double2.awk rename to src/it/resources/gawk/double2.awk diff --git a/src/test/resources/gawk/double2.ok b/src/it/resources/gawk/double2.ok similarity index 100% rename from src/test/resources/gawk/double2.ok rename to src/it/resources/gawk/double2.ok diff --git a/src/test/resources/gawk/dtdgport.awk b/src/it/resources/gawk/dtdgport.awk similarity index 100% rename from src/test/resources/gawk/dtdgport.awk rename to src/it/resources/gawk/dtdgport.awk diff --git a/src/test/resources/gawk/dumpvars.in b/src/it/resources/gawk/dumpvars.in similarity index 100% rename from src/test/resources/gawk/dumpvars.in rename to src/it/resources/gawk/dumpvars.in diff --git a/src/test/resources/gawk/dumpvars.ok b/src/it/resources/gawk/dumpvars.ok similarity index 100% rename from src/test/resources/gawk/dumpvars.ok rename to src/it/resources/gawk/dumpvars.ok diff --git a/src/test/resources/gawk/dynlj.awk b/src/it/resources/gawk/dynlj.awk similarity index 100% rename from src/test/resources/gawk/dynlj.awk rename to src/it/resources/gawk/dynlj.awk diff --git a/src/test/resources/gawk/dynlj.ok b/src/it/resources/gawk/dynlj.ok similarity index 100% rename from src/test/resources/gawk/dynlj.ok rename to src/it/resources/gawk/dynlj.ok diff --git a/src/test/resources/gawk/elemnew1.awk b/src/it/resources/gawk/elemnew1.awk similarity index 100% rename from src/test/resources/gawk/elemnew1.awk rename to src/it/resources/gawk/elemnew1.awk diff --git a/src/test/resources/gawk/eofsplit.ok b/src/it/resources/gawk/elemnew1.ok similarity index 100% rename from src/test/resources/gawk/eofsplit.ok rename to src/it/resources/gawk/elemnew1.ok diff --git a/src/test/resources/gawk/elemnew2.awk b/src/it/resources/gawk/elemnew2.awk similarity index 100% rename from src/test/resources/gawk/elemnew2.awk rename to src/it/resources/gawk/elemnew2.awk diff --git a/src/test/resources/gawk/elemnew2.ok b/src/it/resources/gawk/elemnew2.ok similarity index 100% rename from src/test/resources/gawk/elemnew2.ok rename to src/it/resources/gawk/elemnew2.ok diff --git a/src/test/resources/gawk/elemnew3.awk b/src/it/resources/gawk/elemnew3.awk similarity index 100% rename from src/test/resources/gawk/elemnew3.awk rename to src/it/resources/gawk/elemnew3.awk diff --git a/src/test/resources/gawk/elemnew3.ok b/src/it/resources/gawk/elemnew3.ok similarity index 100% rename from src/test/resources/gawk/elemnew3.ok rename to src/it/resources/gawk/elemnew3.ok diff --git a/src/test/resources/gawk/eofsplit.awk b/src/it/resources/gawk/eofsplit.awk similarity index 100% rename from src/test/resources/gawk/eofsplit.awk rename to src/it/resources/gawk/eofsplit.awk diff --git a/src/test/resources/gawk/exit2.ok b/src/it/resources/gawk/eofsplit.ok similarity index 100% rename from src/test/resources/gawk/exit2.ok rename to src/it/resources/gawk/eofsplit.ok diff --git a/src/test/resources/gawk/eofsrc1.ok b/src/it/resources/gawk/eofsrc1.ok similarity index 100% rename from src/test/resources/gawk/eofsrc1.ok rename to src/it/resources/gawk/eofsrc1.ok diff --git a/src/test/resources/gawk/eofsrc1a.awk b/src/it/resources/gawk/eofsrc1a.awk similarity index 100% rename from src/test/resources/gawk/eofsrc1a.awk rename to src/it/resources/gawk/eofsrc1a.awk diff --git a/src/test/resources/gawk/eofsrc1b.awk b/src/it/resources/gawk/eofsrc1b.awk similarity index 100% rename from src/test/resources/gawk/eofsrc1b.awk rename to src/it/resources/gawk/eofsrc1b.awk diff --git a/src/test/resources/gawk/errno.awk b/src/it/resources/gawk/errno.awk similarity index 100% rename from src/test/resources/gawk/errno.awk rename to src/it/resources/gawk/errno.awk diff --git a/src/test/resources/gawk/errno.in b/src/it/resources/gawk/errno.in similarity index 100% rename from src/test/resources/gawk/errno.in rename to src/it/resources/gawk/errno.in diff --git a/src/test/resources/gawk/errno.ok b/src/it/resources/gawk/errno.ok similarity index 100% rename from src/test/resources/gawk/errno.ok rename to src/it/resources/gawk/errno.ok diff --git a/src/test/resources/gawk/escapebrace.awk b/src/it/resources/gawk/escapebrace.awk similarity index 100% rename from src/test/resources/gawk/escapebrace.awk rename to src/it/resources/gawk/escapebrace.awk diff --git a/src/test/resources/gawk/escapebrace.in b/src/it/resources/gawk/escapebrace.in similarity index 100% rename from src/test/resources/gawk/escapebrace.in rename to src/it/resources/gawk/escapebrace.in diff --git a/src/test/resources/gawk/escapebrace.ok b/src/it/resources/gawk/escapebrace.ok similarity index 100% rename from src/test/resources/gawk/escapebrace.ok rename to src/it/resources/gawk/escapebrace.ok diff --git a/src/test/resources/gawk/exit.ok b/src/it/resources/gawk/exit.ok similarity index 100% rename from src/test/resources/gawk/exit.ok rename to src/it/resources/gawk/exit.ok diff --git a/src/test/resources/gawk/exit.sh b/src/it/resources/gawk/exit.sh similarity index 100% rename from src/test/resources/gawk/exit.sh rename to src/it/resources/gawk/exit.sh diff --git a/src/test/resources/gawk/exit2.awk b/src/it/resources/gawk/exit2.awk similarity index 100% rename from src/test/resources/gawk/exit2.awk rename to src/it/resources/gawk/exit2.awk diff --git a/src/test/resources/gawk/filefuncs.ok b/src/it/resources/gawk/exit2.ok similarity index 100% rename from src/test/resources/gawk/filefuncs.ok rename to src/it/resources/gawk/exit2.ok diff --git a/src/test/resources/gawk/exitval1.awk b/src/it/resources/gawk/exitval1.awk similarity index 100% rename from src/test/resources/gawk/exitval1.awk rename to src/it/resources/gawk/exitval1.awk diff --git a/src/test/resources/gawk/exitval1.ok b/src/it/resources/gawk/exitval1.ok similarity index 100% rename from src/test/resources/gawk/exitval1.ok rename to src/it/resources/gawk/exitval1.ok diff --git a/src/test/resources/gawk/exitval2.awk b/src/it/resources/gawk/exitval2.awk similarity index 100% rename from src/test/resources/gawk/exitval2.awk rename to src/it/resources/gawk/exitval2.awk diff --git a/src/test/resources/gawk/exitval2.ok b/src/it/resources/gawk/exitval2.ok similarity index 100% rename from src/test/resources/gawk/exitval2.ok rename to src/it/resources/gawk/exitval2.ok diff --git a/src/test/resources/gawk/exitval2.w32 b/src/it/resources/gawk/exitval2.w32 similarity index 100% rename from src/test/resources/gawk/exitval2.w32 rename to src/it/resources/gawk/exitval2.w32 diff --git a/src/test/resources/gawk/exitval3.awk b/src/it/resources/gawk/exitval3.awk similarity index 100% rename from src/test/resources/gawk/exitval3.awk rename to src/it/resources/gawk/exitval3.awk diff --git a/src/test/resources/gawk/exitval3.ok b/src/it/resources/gawk/exitval3.ok similarity index 100% rename from src/test/resources/gawk/exitval3.ok rename to src/it/resources/gawk/exitval3.ok diff --git a/src/test/resources/gawk/fcall_exit.awk b/src/it/resources/gawk/fcall_exit.awk similarity index 100% rename from src/test/resources/gawk/fcall_exit.awk rename to src/it/resources/gawk/fcall_exit.awk diff --git a/src/test/resources/gawk/fcall_exit.ok b/src/it/resources/gawk/fcall_exit.ok similarity index 100% rename from src/test/resources/gawk/fcall_exit.ok rename to src/it/resources/gawk/fcall_exit.ok diff --git a/src/test/resources/gawk/fcall_exit2.awk b/src/it/resources/gawk/fcall_exit2.awk similarity index 100% rename from src/test/resources/gawk/fcall_exit2.awk rename to src/it/resources/gawk/fcall_exit2.awk diff --git a/src/test/resources/gawk/fcall_exit2.in b/src/it/resources/gawk/fcall_exit2.in similarity index 100% rename from src/test/resources/gawk/fcall_exit2.in rename to src/it/resources/gawk/fcall_exit2.in diff --git a/src/test/resources/gawk/fcall_exit2.ok b/src/it/resources/gawk/fcall_exit2.ok similarity index 100% rename from src/test/resources/gawk/fcall_exit2.ok rename to src/it/resources/gawk/fcall_exit2.ok diff --git a/src/test/resources/gawk/fflush.ok b/src/it/resources/gawk/fflush.ok similarity index 100% rename from src/test/resources/gawk/fflush.ok rename to src/it/resources/gawk/fflush.ok diff --git a/src/test/resources/gawk/fflush.sh b/src/it/resources/gawk/fflush.sh similarity index 100% rename from src/test/resources/gawk/fflush.sh rename to src/it/resources/gawk/fflush.sh diff --git a/src/test/resources/gawk/fieldassign.awk b/src/it/resources/gawk/fieldassign.awk similarity index 100% rename from src/test/resources/gawk/fieldassign.awk rename to src/it/resources/gawk/fieldassign.awk diff --git a/src/test/resources/gawk/fieldassign.in b/src/it/resources/gawk/fieldassign.in similarity index 100% rename from src/test/resources/gawk/fieldassign.in rename to src/it/resources/gawk/fieldassign.in diff --git a/src/test/resources/gawk/fieldassign.ok b/src/it/resources/gawk/fieldassign.ok similarity index 100% rename from src/test/resources/gawk/fieldassign.ok rename to src/it/resources/gawk/fieldassign.ok diff --git a/src/test/resources/gawk/fieldwdth.awk b/src/it/resources/gawk/fieldwdth.awk similarity index 100% rename from src/test/resources/gawk/fieldwdth.awk rename to src/it/resources/gawk/fieldwdth.awk diff --git a/src/test/resources/gawk/fieldwdth.in b/src/it/resources/gawk/fieldwdth.in similarity index 100% rename from src/test/resources/gawk/fieldwdth.in rename to src/it/resources/gawk/fieldwdth.in diff --git a/src/test/resources/gawk/fieldwdth.ok b/src/it/resources/gawk/fieldwdth.ok similarity index 100% rename from src/test/resources/gawk/fieldwdth.ok rename to src/it/resources/gawk/fieldwdth.ok diff --git a/src/test/resources/gawk/filefuncs.awk b/src/it/resources/gawk/filefuncs.awk similarity index 100% rename from src/test/resources/gawk/filefuncs.awk rename to src/it/resources/gawk/filefuncs.awk diff --git a/src/test/resources/gawk/fmtspcl-mpfr.ok b/src/it/resources/gawk/filefuncs.ok similarity index 100% rename from src/test/resources/gawk/fmtspcl-mpfr.ok rename to src/it/resources/gawk/filefuncs.ok diff --git a/src/it/resources/gawk/fix-fmtspcl.awk b/src/it/resources/gawk/fix-fmtspcl.awk new file mode 100644 index 00000000..018f519d --- /dev/null +++ b/src/it/resources/gawk/fix-fmtspcl.awk @@ -0,0 +1,23 @@ +BEGIN { + pnan = sprintf("%g",sqrt(-1)) + nnan = sprintf("%g",-sqrt(-1)) + pinf = sprintf("%g",-log(0)) + ninf = sprintf("%g",log(0)) + + pnanu = toupper(pnan) + nnanu = toupper(nnan) + pinfu = toupper(pinf) + ninfu = toupper(ninf) +} +{ + sub(/positive_nan/, pnan) + sub(/negative_nan/, nnan) + sub(/positive_infinity/, pinf) + sub(/negative_infinity/, ninf) + sub(/POSITIVE_NAN/, pnanu) + sub(/NEGATIVE_NAN/, nnanu) + sub(/POSITIVE_INFINITY/, pinfu) + sub(/NEGATIVE_INFINITY/, ninfu) + sub(/fmtspcl/,(sd "/fmtspcl")) + print +} diff --git a/src/test/resources/gawk/fldchg.awk b/src/it/resources/gawk/fldchg.awk similarity index 100% rename from src/test/resources/gawk/fldchg.awk rename to src/it/resources/gawk/fldchg.awk diff --git a/src/test/resources/gawk/fldchg.in b/src/it/resources/gawk/fldchg.in similarity index 100% rename from src/test/resources/gawk/fldchg.in rename to src/it/resources/gawk/fldchg.in diff --git a/src/test/resources/gawk/fldchg.ok b/src/it/resources/gawk/fldchg.ok similarity index 100% rename from src/test/resources/gawk/fldchg.ok rename to src/it/resources/gawk/fldchg.ok diff --git a/src/test/resources/gawk/fldchgnf.awk b/src/it/resources/gawk/fldchgnf.awk similarity index 100% rename from src/test/resources/gawk/fldchgnf.awk rename to src/it/resources/gawk/fldchgnf.awk diff --git a/src/test/resources/gawk/fldchgnf.in b/src/it/resources/gawk/fldchgnf.in similarity index 100% rename from src/test/resources/gawk/fldchgnf.in rename to src/it/resources/gawk/fldchgnf.in diff --git a/src/test/resources/gawk/fldchgnf.ok b/src/it/resources/gawk/fldchgnf.ok similarity index 100% rename from src/test/resources/gawk/fldchgnf.ok rename to src/it/resources/gawk/fldchgnf.ok diff --git a/src/test/resources/gawk/fldterm.awk b/src/it/resources/gawk/fldterm.awk similarity index 100% rename from src/test/resources/gawk/fldterm.awk rename to src/it/resources/gawk/fldterm.awk diff --git a/src/test/resources/gawk/fldterm.in b/src/it/resources/gawk/fldterm.in similarity index 100% rename from src/test/resources/gawk/fldterm.in rename to src/it/resources/gawk/fldterm.in diff --git a/src/test/resources/gawk/fldterm.ok b/src/it/resources/gawk/fldterm.ok similarity index 100% rename from src/test/resources/gawk/fldterm.ok rename to src/it/resources/gawk/fldterm.ok diff --git a/src/test/resources/gawk/fordel.ok b/src/it/resources/gawk/fmtspcl-mpfr.ok similarity index 100% rename from src/test/resources/gawk/fordel.ok rename to src/it/resources/gawk/fmtspcl-mpfr.ok diff --git a/src/test/resources/gawk/fmtspcl.awk b/src/it/resources/gawk/fmtspcl.awk similarity index 100% rename from src/test/resources/gawk/fmtspcl.awk rename to src/it/resources/gawk/fmtspcl.awk diff --git a/src/test/resources/gawk/fmtspcl.tok b/src/it/resources/gawk/fmtspcl.tok similarity index 100% rename from src/test/resources/gawk/fmtspcl.tok rename to src/it/resources/gawk/fmtspcl.tok diff --git a/src/test/resources/gawk/fmttest.awk b/src/it/resources/gawk/fmttest.awk similarity index 100% rename from src/test/resources/gawk/fmttest.awk rename to src/it/resources/gawk/fmttest.awk diff --git a/src/test/resources/gawk/fmttest.ok b/src/it/resources/gawk/fmttest.ok similarity index 100% rename from src/test/resources/gawk/fmttest.ok rename to src/it/resources/gawk/fmttest.ok diff --git a/src/test/resources/gawk/fnamedat.awk b/src/it/resources/gawk/fnamedat.awk similarity index 100% rename from src/test/resources/gawk/fnamedat.awk rename to src/it/resources/gawk/fnamedat.awk diff --git a/src/test/resources/gawk/fnamedat.in b/src/it/resources/gawk/fnamedat.in similarity index 100% rename from src/test/resources/gawk/fnamedat.in rename to src/it/resources/gawk/fnamedat.in diff --git a/src/test/resources/gawk/fnamedat.ok b/src/it/resources/gawk/fnamedat.ok similarity index 100% rename from src/test/resources/gawk/fnamedat.ok rename to src/it/resources/gawk/fnamedat.ok diff --git a/src/test/resources/gawk/fnarray.awk b/src/it/resources/gawk/fnarray.awk similarity index 100% rename from src/test/resources/gawk/fnarray.awk rename to src/it/resources/gawk/fnarray.awk diff --git a/src/test/resources/gawk/fnarray.ok b/src/it/resources/gawk/fnarray.ok similarity index 100% rename from src/test/resources/gawk/fnarray.ok rename to src/it/resources/gawk/fnarray.ok diff --git a/src/test/resources/gawk/fnarray2.awk b/src/it/resources/gawk/fnarray2.awk similarity index 100% rename from src/test/resources/gawk/fnarray2.awk rename to src/it/resources/gawk/fnarray2.awk diff --git a/src/test/resources/gawk/fnarray2.in b/src/it/resources/gawk/fnarray2.in similarity index 100% rename from src/test/resources/gawk/fnarray2.in rename to src/it/resources/gawk/fnarray2.in diff --git a/src/test/resources/gawk/fnarray2.ok b/src/it/resources/gawk/fnarray2.ok similarity index 100% rename from src/test/resources/gawk/fnarray2.ok rename to src/it/resources/gawk/fnarray2.ok diff --git a/src/test/resources/gawk/fnarydel-mpfr.ok b/src/it/resources/gawk/fnarydel-mpfr.ok similarity index 100% rename from src/test/resources/gawk/fnarydel-mpfr.ok rename to src/it/resources/gawk/fnarydel-mpfr.ok diff --git a/src/test/resources/gawk/fnarydel.awk b/src/it/resources/gawk/fnarydel.awk similarity index 100% rename from src/test/resources/gawk/fnarydel.awk rename to src/it/resources/gawk/fnarydel.awk diff --git a/src/test/resources/gawk/fnarydel.ok b/src/it/resources/gawk/fnarydel.ok similarity index 100% rename from src/test/resources/gawk/fnarydel.ok rename to src/it/resources/gawk/fnarydel.ok diff --git a/src/test/resources/gawk/fnaryscl.awk b/src/it/resources/gawk/fnaryscl.awk similarity index 100% rename from src/test/resources/gawk/fnaryscl.awk rename to src/it/resources/gawk/fnaryscl.awk diff --git a/src/test/resources/gawk/fnaryscl.ok b/src/it/resources/gawk/fnaryscl.ok similarity index 100% rename from src/test/resources/gawk/fnaryscl.ok rename to src/it/resources/gawk/fnaryscl.ok diff --git a/src/test/resources/gawk/fnasgnm.awk b/src/it/resources/gawk/fnasgnm.awk similarity index 100% rename from src/test/resources/gawk/fnasgnm.awk rename to src/it/resources/gawk/fnasgnm.awk diff --git a/src/test/resources/gawk/fnasgnm.in b/src/it/resources/gawk/fnasgnm.in similarity index 100% rename from src/test/resources/gawk/fnasgnm.in rename to src/it/resources/gawk/fnasgnm.in diff --git a/src/test/resources/gawk/fnasgnm.ok b/src/it/resources/gawk/fnasgnm.ok similarity index 100% rename from src/test/resources/gawk/fnasgnm.ok rename to src/it/resources/gawk/fnasgnm.ok diff --git a/src/test/resources/gawk/fnmatch.awk b/src/it/resources/gawk/fnmatch.awk similarity index 100% rename from src/test/resources/gawk/fnmatch.awk rename to src/it/resources/gawk/fnmatch.awk diff --git a/src/test/resources/gawk/fnmatch.ok b/src/it/resources/gawk/fnmatch.ok similarity index 100% rename from src/test/resources/gawk/fnmatch.ok rename to src/it/resources/gawk/fnmatch.ok diff --git a/src/test/resources/gawk/fnmisc.awk b/src/it/resources/gawk/fnmisc.awk similarity index 100% rename from src/test/resources/gawk/fnmisc.awk rename to src/it/resources/gawk/fnmisc.awk diff --git a/src/test/resources/gawk/fnmisc.ok b/src/it/resources/gawk/fnmisc.ok similarity index 100% rename from src/test/resources/gawk/fnmisc.ok rename to src/it/resources/gawk/fnmisc.ok diff --git a/src/test/resources/gawk/fnparydl-mpfr.ok b/src/it/resources/gawk/fnparydl-mpfr.ok similarity index 100% rename from src/test/resources/gawk/fnparydl-mpfr.ok rename to src/it/resources/gawk/fnparydl-mpfr.ok diff --git a/src/test/resources/gawk/fnparydl.awk b/src/it/resources/gawk/fnparydl.awk similarity index 100% rename from src/test/resources/gawk/fnparydl.awk rename to src/it/resources/gawk/fnparydl.awk diff --git a/src/test/resources/gawk/fnparydl.ok b/src/it/resources/gawk/fnparydl.ok similarity index 100% rename from src/test/resources/gawk/fnparydl.ok rename to src/it/resources/gawk/fnparydl.ok diff --git a/src/test/resources/gawk/forcenum.awk b/src/it/resources/gawk/forcenum.awk similarity index 100% rename from src/test/resources/gawk/forcenum.awk rename to src/it/resources/gawk/forcenum.awk diff --git a/src/test/resources/gawk/forcenum.ok b/src/it/resources/gawk/forcenum.ok similarity index 100% rename from src/test/resources/gawk/forcenum.ok rename to src/it/resources/gawk/forcenum.ok diff --git a/src/test/resources/gawk/fordel.awk b/src/it/resources/gawk/fordel.awk similarity index 100% rename from src/test/resources/gawk/fordel.awk rename to src/it/resources/gawk/fordel.awk diff --git a/src/test/resources/gawk/fork.ok b/src/it/resources/gawk/fordel.ok similarity index 100% rename from src/test/resources/gawk/fork.ok rename to src/it/resources/gawk/fordel.ok diff --git a/src/test/resources/gawk/fork.awk b/src/it/resources/gawk/fork.awk similarity index 100% rename from src/test/resources/gawk/fork.awk rename to src/it/resources/gawk/fork.awk diff --git a/src/test/resources/gawk/fork2.ok b/src/it/resources/gawk/fork.ok similarity index 100% rename from src/test/resources/gawk/fork2.ok rename to src/it/resources/gawk/fork.ok diff --git a/src/test/resources/gawk/fork2.awk b/src/it/resources/gawk/fork2.awk similarity index 100% rename from src/test/resources/gawk/fork2.awk rename to src/it/resources/gawk/fork2.awk diff --git a/src/test/resources/gawk/indirectcall3.ok b/src/it/resources/gawk/fork2.ok similarity index 100% rename from src/test/resources/gawk/indirectcall3.ok rename to src/it/resources/gawk/fork2.ok diff --git a/src/test/resources/gawk/forref.awk b/src/it/resources/gawk/forref.awk similarity index 100% rename from src/test/resources/gawk/forref.awk rename to src/it/resources/gawk/forref.awk diff --git a/src/test/resources/gawk/forref.ok b/src/it/resources/gawk/forref.ok similarity index 100% rename from src/test/resources/gawk/forref.ok rename to src/it/resources/gawk/forref.ok diff --git a/src/test/resources/gawk/forsimp.awk b/src/it/resources/gawk/forsimp.awk similarity index 100% rename from src/test/resources/gawk/forsimp.awk rename to src/it/resources/gawk/forsimp.awk diff --git a/src/test/resources/gawk/forsimp.ok b/src/it/resources/gawk/forsimp.ok similarity index 100% rename from src/test/resources/gawk/forsimp.ok rename to src/it/resources/gawk/forsimp.ok diff --git a/src/test/resources/gawk/fpat1.awk b/src/it/resources/gawk/fpat1.awk similarity index 100% rename from src/test/resources/gawk/fpat1.awk rename to src/it/resources/gawk/fpat1.awk diff --git a/src/test/resources/gawk/fpat1.in b/src/it/resources/gawk/fpat1.in similarity index 100% rename from src/test/resources/gawk/fpat1.in rename to src/it/resources/gawk/fpat1.in diff --git a/src/test/resources/gawk/fpat1.ok b/src/it/resources/gawk/fpat1.ok similarity index 100% rename from src/test/resources/gawk/fpat1.ok rename to src/it/resources/gawk/fpat1.ok diff --git a/src/test/resources/gawk/fpat2.awk b/src/it/resources/gawk/fpat2.awk similarity index 100% rename from src/test/resources/gawk/fpat2.awk rename to src/it/resources/gawk/fpat2.awk diff --git a/src/test/resources/gawk/fpat2.ok b/src/it/resources/gawk/fpat2.ok similarity index 100% rename from src/test/resources/gawk/fpat2.ok rename to src/it/resources/gawk/fpat2.ok diff --git a/src/test/resources/gawk/fpat3.awk b/src/it/resources/gawk/fpat3.awk similarity index 100% rename from src/test/resources/gawk/fpat3.awk rename to src/it/resources/gawk/fpat3.awk diff --git a/src/test/resources/gawk/fpat3.in b/src/it/resources/gawk/fpat3.in similarity index 100% rename from src/test/resources/gawk/fpat3.in rename to src/it/resources/gawk/fpat3.in diff --git a/src/test/resources/gawk/fpat3.ok b/src/it/resources/gawk/fpat3.ok similarity index 100% rename from src/test/resources/gawk/fpat3.ok rename to src/it/resources/gawk/fpat3.ok diff --git a/src/test/resources/gawk/fpat4.awk b/src/it/resources/gawk/fpat4.awk similarity index 100% rename from src/test/resources/gawk/fpat4.awk rename to src/it/resources/gawk/fpat4.awk diff --git a/src/test/resources/gawk/fpat4.ok b/src/it/resources/gawk/fpat4.ok similarity index 100% rename from src/test/resources/gawk/fpat4.ok rename to src/it/resources/gawk/fpat4.ok diff --git a/src/test/resources/gawk/fpat5.awk b/src/it/resources/gawk/fpat5.awk similarity index 100% rename from src/test/resources/gawk/fpat5.awk rename to src/it/resources/gawk/fpat5.awk diff --git a/src/test/resources/gawk/fpat5.in b/src/it/resources/gawk/fpat5.in similarity index 100% rename from src/test/resources/gawk/fpat5.in rename to src/it/resources/gawk/fpat5.in diff --git a/src/test/resources/gawk/fpat5.ok b/src/it/resources/gawk/fpat5.ok similarity index 100% rename from src/test/resources/gawk/fpat5.ok rename to src/it/resources/gawk/fpat5.ok diff --git a/src/test/resources/gawk/fpat6.awk b/src/it/resources/gawk/fpat6.awk similarity index 100% rename from src/test/resources/gawk/fpat6.awk rename to src/it/resources/gawk/fpat6.awk diff --git a/src/test/resources/gawk/fpat6.in b/src/it/resources/gawk/fpat6.in similarity index 100% rename from src/test/resources/gawk/fpat6.in rename to src/it/resources/gawk/fpat6.in diff --git a/src/test/resources/gawk/fpat6.ok b/src/it/resources/gawk/fpat6.ok similarity index 100% rename from src/test/resources/gawk/fpat6.ok rename to src/it/resources/gawk/fpat6.ok diff --git a/src/test/resources/gawk/fpat7.awk b/src/it/resources/gawk/fpat7.awk similarity index 100% rename from src/test/resources/gawk/fpat7.awk rename to src/it/resources/gawk/fpat7.awk diff --git a/src/test/resources/gawk/fpat7.in b/src/it/resources/gawk/fpat7.in similarity index 100% rename from src/test/resources/gawk/fpat7.in rename to src/it/resources/gawk/fpat7.in diff --git a/src/test/resources/gawk/fpat7.ok b/src/it/resources/gawk/fpat7.ok similarity index 100% rename from src/test/resources/gawk/fpat7.ok rename to src/it/resources/gawk/fpat7.ok diff --git a/src/test/resources/gawk/fpat8.awk b/src/it/resources/gawk/fpat8.awk similarity index 100% rename from src/test/resources/gawk/fpat8.awk rename to src/it/resources/gawk/fpat8.awk diff --git a/src/test/resources/gawk/fpat8.in b/src/it/resources/gawk/fpat8.in similarity index 100% rename from src/test/resources/gawk/fpat8.in rename to src/it/resources/gawk/fpat8.in diff --git a/src/test/resources/gawk/fpat8.ok b/src/it/resources/gawk/fpat8.ok similarity index 100% rename from src/test/resources/gawk/fpat8.ok rename to src/it/resources/gawk/fpat8.ok diff --git a/src/test/resources/gawk/fpat9.awk b/src/it/resources/gawk/fpat9.awk similarity index 100% rename from src/test/resources/gawk/fpat9.awk rename to src/it/resources/gawk/fpat9.awk diff --git a/src/test/resources/gawk/fpat9.in b/src/it/resources/gawk/fpat9.in similarity index 100% rename from src/test/resources/gawk/fpat9.in rename to src/it/resources/gawk/fpat9.in diff --git a/src/test/resources/gawk/fpat9.ok b/src/it/resources/gawk/fpat9.ok similarity index 100% rename from src/test/resources/gawk/fpat9.ok rename to src/it/resources/gawk/fpat9.ok diff --git a/src/test/resources/gawk/fpatnull.awk b/src/it/resources/gawk/fpatnull.awk similarity index 100% rename from src/test/resources/gawk/fpatnull.awk rename to src/it/resources/gawk/fpatnull.awk diff --git a/src/test/resources/gawk/fpatnull.in b/src/it/resources/gawk/fpatnull.in similarity index 100% rename from src/test/resources/gawk/fpatnull.in rename to src/it/resources/gawk/fpatnull.in diff --git a/src/test/resources/gawk/fpatnull.ok b/src/it/resources/gawk/fpatnull.ok similarity index 100% rename from src/test/resources/gawk/fpatnull.ok rename to src/it/resources/gawk/fpatnull.ok diff --git a/src/it/resources/gawk/fr/LC_MESSAGES/nlstringtest.mo b/src/it/resources/gawk/fr/LC_MESSAGES/nlstringtest.mo new file mode 100644 index 0000000000000000000000000000000000000000..72af97e7d0ae7a8a94d1238248c48a06b1dd5a11 GIT binary patch literal 304 zcmYk$!Ab)$5C-6=?WIS>TMtucK!sJdSZKSf7eNpNg%)~k%#ONrH@hTRY#+pfFXub- z4f 0) { print } } +BEGIN { while( getline > 0) { print } } diff --git a/src/test/resources/gawk/getline3.awk b/src/it/resources/gawk/getline3.awk similarity index 100% rename from src/test/resources/gawk/getline3.awk rename to src/it/resources/gawk/getline3.awk diff --git a/src/test/resources/gawk/getline3.ok b/src/it/resources/gawk/getline3.ok similarity index 100% rename from src/test/resources/gawk/getline3.ok rename to src/it/resources/gawk/getline3.ok diff --git a/src/test/resources/gawk/getline4.awk b/src/it/resources/gawk/getline4.awk similarity index 100% rename from src/test/resources/gawk/getline4.awk rename to src/it/resources/gawk/getline4.awk diff --git a/src/test/resources/gawk/getline4.in b/src/it/resources/gawk/getline4.in similarity index 100% rename from src/test/resources/gawk/getline4.in rename to src/it/resources/gawk/getline4.in diff --git a/src/test/resources/gawk/getline4.ok b/src/it/resources/gawk/getline4.ok similarity index 100% rename from src/test/resources/gawk/getline4.ok rename to src/it/resources/gawk/getline4.ok diff --git a/src/test/resources/gawk/getline5.awk b/src/it/resources/gawk/getline5.awk similarity index 100% rename from src/test/resources/gawk/getline5.awk rename to src/it/resources/gawk/getline5.awk diff --git a/src/test/resources/gawk/getline5.ok b/src/it/resources/gawk/getline5.ok similarity index 100% rename from src/test/resources/gawk/getline5.ok rename to src/it/resources/gawk/getline5.ok diff --git a/src/test/resources/gawk/getlnbuf.awk b/src/it/resources/gawk/getlnbuf.awk similarity index 100% rename from src/test/resources/gawk/getlnbuf.awk rename to src/it/resources/gawk/getlnbuf.awk diff --git a/src/test/resources/gawk/getlnbuf.in b/src/it/resources/gawk/getlnbuf.in similarity index 100% rename from src/test/resources/gawk/getlnbuf.in rename to src/it/resources/gawk/getlnbuf.in diff --git a/src/test/resources/gawk/getlnbuf.ok b/src/it/resources/gawk/getlnbuf.ok similarity index 100% rename from src/test/resources/gawk/getlnbuf.ok rename to src/it/resources/gawk/getlnbuf.ok diff --git a/src/test/resources/gawk/getlndir.awk b/src/it/resources/gawk/getlndir.awk similarity index 100% rename from src/test/resources/gawk/getlndir.awk rename to src/it/resources/gawk/getlndir.awk diff --git a/src/test/resources/gawk/getlndir.ok b/src/it/resources/gawk/getlndir.ok similarity index 100% rename from src/test/resources/gawk/getlndir.ok rename to src/it/resources/gawk/getlndir.ok diff --git a/src/test/resources/gawk/getlnfa.awk b/src/it/resources/gawk/getlnfa.awk similarity index 100% rename from src/test/resources/gawk/getlnfa.awk rename to src/it/resources/gawk/getlnfa.awk diff --git a/src/test/resources/gawk/getlnfa.ok b/src/it/resources/gawk/getlnfa.ok similarity index 100% rename from src/test/resources/gawk/getlnfa.ok rename to src/it/resources/gawk/getlnfa.ok diff --git a/src/test/resources/gawk/getlnhd.awk b/src/it/resources/gawk/getlnhd.awk similarity index 100% rename from src/test/resources/gawk/getlnhd.awk rename to src/it/resources/gawk/getlnhd.awk diff --git a/src/test/resources/gawk/getlnhd.ok b/src/it/resources/gawk/getlnhd.ok similarity index 100% rename from src/test/resources/gawk/getlnhd.ok rename to src/it/resources/gawk/getlnhd.ok diff --git a/src/test/resources/gawk/getnr2tb.awk b/src/it/resources/gawk/getnr2tb.awk similarity index 100% rename from src/test/resources/gawk/getnr2tb.awk rename to src/it/resources/gawk/getnr2tb.awk diff --git a/src/test/resources/gawk/getnr2tb.in b/src/it/resources/gawk/getnr2tb.in similarity index 100% rename from src/test/resources/gawk/getnr2tb.in rename to src/it/resources/gawk/getnr2tb.in diff --git a/src/test/resources/gawk/getnr2tb.ok b/src/it/resources/gawk/getnr2tb.ok similarity index 100% rename from src/test/resources/gawk/getnr2tb.ok rename to src/it/resources/gawk/getnr2tb.ok diff --git a/src/test/resources/gawk/getnr2tm.awk b/src/it/resources/gawk/getnr2tm.awk similarity index 100% rename from src/test/resources/gawk/getnr2tm.awk rename to src/it/resources/gawk/getnr2tm.awk diff --git a/src/test/resources/gawk/getnr2tm.in b/src/it/resources/gawk/getnr2tm.in similarity index 100% rename from src/test/resources/gawk/getnr2tm.in rename to src/it/resources/gawk/getnr2tm.in diff --git a/src/test/resources/gawk/getnr2tm.ok b/src/it/resources/gawk/getnr2tm.ok similarity index 100% rename from src/test/resources/gawk/getnr2tm.ok rename to src/it/resources/gawk/getnr2tm.ok diff --git a/src/test/resources/gawk/gnuops2.awk b/src/it/resources/gawk/gnuops2.awk similarity index 100% rename from src/test/resources/gawk/gnuops2.awk rename to src/it/resources/gawk/gnuops2.awk diff --git a/src/test/resources/gawk/gnuops2.ok b/src/it/resources/gawk/gnuops2.ok similarity index 100% rename from src/test/resources/gawk/gnuops2.ok rename to src/it/resources/gawk/gnuops2.ok diff --git a/src/test/resources/gawk/gnuops3.awk b/src/it/resources/gawk/gnuops3.awk similarity index 100% rename from src/test/resources/gawk/gnuops3.awk rename to src/it/resources/gawk/gnuops3.awk diff --git a/src/test/resources/gawk/gnuops3.ok b/src/it/resources/gawk/gnuops3.ok similarity index 100% rename from src/test/resources/gawk/gnuops3.ok rename to src/it/resources/gawk/gnuops3.ok diff --git a/src/test/resources/gawk/gnureops.awk b/src/it/resources/gawk/gnureops.awk similarity index 100% rename from src/test/resources/gawk/gnureops.awk rename to src/it/resources/gawk/gnureops.awk diff --git a/src/test/resources/gawk/gnureops.ok b/src/it/resources/gawk/gnureops.ok similarity index 100% rename from src/test/resources/gawk/gnureops.ok rename to src/it/resources/gawk/gnureops.ok diff --git a/src/test/resources/gawk/gsubasgn.awk b/src/it/resources/gawk/gsubasgn.awk similarity index 100% rename from src/test/resources/gawk/gsubasgn.awk rename to src/it/resources/gawk/gsubasgn.awk diff --git a/src/test/resources/gawk/gsubasgn.ok b/src/it/resources/gawk/gsubasgn.ok similarity index 100% rename from src/test/resources/gawk/gsubasgn.ok rename to src/it/resources/gawk/gsubasgn.ok diff --git a/src/test/resources/gawk/gsubind.awk b/src/it/resources/gawk/gsubind.awk similarity index 100% rename from src/test/resources/gawk/gsubind.awk rename to src/it/resources/gawk/gsubind.awk diff --git a/src/test/resources/gawk/gsubind.ok b/src/it/resources/gawk/gsubind.ok similarity index 100% rename from src/test/resources/gawk/gsubind.ok rename to src/it/resources/gawk/gsubind.ok diff --git a/src/test/resources/gawk/gsubtest.awk b/src/it/resources/gawk/gsubtest.awk similarity index 100% rename from src/test/resources/gawk/gsubtest.awk rename to src/it/resources/gawk/gsubtest.awk diff --git a/src/test/resources/gawk/gsubtest.ok b/src/it/resources/gawk/gsubtest.ok similarity index 100% rename from src/test/resources/gawk/gsubtest.ok rename to src/it/resources/gawk/gsubtest.ok diff --git a/src/test/resources/gawk/gsubtst2.awk b/src/it/resources/gawk/gsubtst2.awk similarity index 100% rename from src/test/resources/gawk/gsubtst2.awk rename to src/it/resources/gawk/gsubtst2.awk diff --git a/src/test/resources/gawk/gsubtst2.ok b/src/it/resources/gawk/gsubtst2.ok similarity index 100% rename from src/test/resources/gawk/gsubtst2.ok rename to src/it/resources/gawk/gsubtst2.ok diff --git a/src/test/resources/gawk/gsubtst3.awk b/src/it/resources/gawk/gsubtst3.awk similarity index 100% rename from src/test/resources/gawk/gsubtst3.awk rename to src/it/resources/gawk/gsubtst3.awk diff --git a/src/test/resources/gawk/gsubtst3.in b/src/it/resources/gawk/gsubtst3.in similarity index 100% rename from src/test/resources/gawk/gsubtst3.in rename to src/it/resources/gawk/gsubtst3.in diff --git a/src/test/resources/gawk/gsubtst3.ok b/src/it/resources/gawk/gsubtst3.ok similarity index 100% rename from src/test/resources/gawk/gsubtst3.ok rename to src/it/resources/gawk/gsubtst3.ok diff --git a/src/test/resources/gawk/gsubtst4.awk b/src/it/resources/gawk/gsubtst4.awk similarity index 100% rename from src/test/resources/gawk/gsubtst4.awk rename to src/it/resources/gawk/gsubtst4.awk diff --git a/src/test/resources/gawk/gsubtst4.ok b/src/it/resources/gawk/gsubtst4.ok similarity index 100% rename from src/test/resources/gawk/gsubtst4.ok rename to src/it/resources/gawk/gsubtst4.ok diff --git a/src/test/resources/gawk/gsubtst5.awk b/src/it/resources/gawk/gsubtst5.awk similarity index 100% rename from src/test/resources/gawk/gsubtst5.awk rename to src/it/resources/gawk/gsubtst5.awk diff --git a/src/test/resources/gawk/gsubtst5.in b/src/it/resources/gawk/gsubtst5.in similarity index 100% rename from src/test/resources/gawk/gsubtst5.in rename to src/it/resources/gawk/gsubtst5.in diff --git a/src/test/resources/gawk/gsubtst5.ok b/src/it/resources/gawk/gsubtst5.ok similarity index 100% rename from src/test/resources/gawk/gsubtst5.ok rename to src/it/resources/gawk/gsubtst5.ok diff --git a/src/test/resources/gawk/gsubtst6.awk b/src/it/resources/gawk/gsubtst6.awk similarity index 100% rename from src/test/resources/gawk/gsubtst6.awk rename to src/it/resources/gawk/gsubtst6.awk diff --git a/src/test/resources/gawk/gsubtst6.ok b/src/it/resources/gawk/gsubtst6.ok similarity index 100% rename from src/test/resources/gawk/gsubtst6.ok rename to src/it/resources/gawk/gsubtst6.ok diff --git a/src/test/resources/gawk/gsubtst7.awk b/src/it/resources/gawk/gsubtst7.awk similarity index 100% rename from src/test/resources/gawk/gsubtst7.awk rename to src/it/resources/gawk/gsubtst7.awk diff --git a/src/test/resources/gawk/gsubtst7.in b/src/it/resources/gawk/gsubtst7.in similarity index 100% rename from src/test/resources/gawk/gsubtst7.in rename to src/it/resources/gawk/gsubtst7.in diff --git a/src/test/resources/gawk/gsubtst7.ok b/src/it/resources/gawk/gsubtst7.ok similarity index 100% rename from src/test/resources/gawk/gsubtst7.ok rename to src/it/resources/gawk/gsubtst7.ok diff --git a/src/test/resources/gawk/gsubtst8.awk b/src/it/resources/gawk/gsubtst8.awk similarity index 100% rename from src/test/resources/gawk/gsubtst8.awk rename to src/it/resources/gawk/gsubtst8.awk diff --git a/src/test/resources/gawk/gsubtst8.in b/src/it/resources/gawk/gsubtst8.in similarity index 100% rename from src/test/resources/gawk/gsubtst8.in rename to src/it/resources/gawk/gsubtst8.in diff --git a/src/test/resources/gawk/gsubtst8.ok b/src/it/resources/gawk/gsubtst8.ok similarity index 100% rename from src/test/resources/gawk/gsubtst8.ok rename to src/it/resources/gawk/gsubtst8.ok diff --git a/src/test/resources/gawk/gtlnbufv.awk b/src/it/resources/gawk/gtlnbufv.awk similarity index 100% rename from src/test/resources/gawk/gtlnbufv.awk rename to src/it/resources/gawk/gtlnbufv.awk diff --git a/src/test/resources/gawk/hello.awk b/src/it/resources/gawk/hello.awk similarity index 100% rename from src/test/resources/gawk/hello.awk rename to src/it/resources/gawk/hello.awk diff --git a/src/test/resources/gawk/hex.awk b/src/it/resources/gawk/hex.awk similarity index 100% rename from src/test/resources/gawk/hex.awk rename to src/it/resources/gawk/hex.awk diff --git a/src/test/resources/gawk/hex.ok b/src/it/resources/gawk/hex.ok similarity index 100% rename from src/test/resources/gawk/hex.ok rename to src/it/resources/gawk/hex.ok diff --git a/src/test/resources/gawk/hex2.awk b/src/it/resources/gawk/hex2.awk similarity index 100% rename from src/test/resources/gawk/hex2.awk rename to src/it/resources/gawk/hex2.awk diff --git a/src/test/resources/gawk/hex2.in b/src/it/resources/gawk/hex2.in similarity index 100% rename from src/test/resources/gawk/hex2.in rename to src/it/resources/gawk/hex2.in diff --git a/src/test/resources/gawk/hex2.ok b/src/it/resources/gawk/hex2.ok similarity index 100% rename from src/test/resources/gawk/hex2.ok rename to src/it/resources/gawk/hex2.ok diff --git a/src/test/resources/gawk/hsprint.awk b/src/it/resources/gawk/hsprint.awk similarity index 100% rename from src/test/resources/gawk/hsprint.awk rename to src/it/resources/gawk/hsprint.awk diff --git a/src/test/resources/gawk/hsprint.ok b/src/it/resources/gawk/hsprint.ok similarity index 100% rename from src/test/resources/gawk/hsprint.ok rename to src/it/resources/gawk/hsprint.ok diff --git a/src/test/resources/gawk/icasefs.awk b/src/it/resources/gawk/icasefs.awk similarity index 100% rename from src/test/resources/gawk/icasefs.awk rename to src/it/resources/gawk/icasefs.awk diff --git a/src/test/resources/gawk/icasefs.ok b/src/it/resources/gawk/icasefs.ok similarity index 100% rename from src/test/resources/gawk/icasefs.ok rename to src/it/resources/gawk/icasefs.ok diff --git a/src/test/resources/gawk/icasers.awk b/src/it/resources/gawk/icasers.awk similarity index 100% rename from src/test/resources/gawk/icasers.awk rename to src/it/resources/gawk/icasers.awk diff --git a/src/test/resources/gawk/icasers.in b/src/it/resources/gawk/icasers.in similarity index 100% rename from src/test/resources/gawk/icasers.in rename to src/it/resources/gawk/icasers.in diff --git a/src/test/resources/gawk/icasers.ok b/src/it/resources/gawk/icasers.ok similarity index 100% rename from src/test/resources/gawk/icasers.ok rename to src/it/resources/gawk/icasers.ok diff --git a/src/test/resources/gawk/id.awk b/src/it/resources/gawk/id.awk similarity index 100% rename from src/test/resources/gawk/id.awk rename to src/it/resources/gawk/id.awk diff --git a/src/test/resources/gawk/id.ok b/src/it/resources/gawk/id.ok similarity index 100% rename from src/test/resources/gawk/id.ok rename to src/it/resources/gawk/id.ok diff --git a/src/test/resources/gawk/igncdym.awk b/src/it/resources/gawk/igncdym.awk similarity index 100% rename from src/test/resources/gawk/igncdym.awk rename to src/it/resources/gawk/igncdym.awk diff --git a/src/test/resources/gawk/igncdym.in b/src/it/resources/gawk/igncdym.in similarity index 100% rename from src/test/resources/gawk/igncdym.in rename to src/it/resources/gawk/igncdym.in diff --git a/src/test/resources/gawk/igncdym.ok b/src/it/resources/gawk/igncdym.ok similarity index 100% rename from src/test/resources/gawk/igncdym.ok rename to src/it/resources/gawk/igncdym.ok diff --git a/src/test/resources/gawk/igncfs.awk b/src/it/resources/gawk/igncfs.awk similarity index 100% rename from src/test/resources/gawk/igncfs.awk rename to src/it/resources/gawk/igncfs.awk diff --git a/src/test/resources/gawk/igncfs.in b/src/it/resources/gawk/igncfs.in similarity index 100% rename from src/test/resources/gawk/igncfs.in rename to src/it/resources/gawk/igncfs.in diff --git a/src/test/resources/gawk/igncfs.ok b/src/it/resources/gawk/igncfs.ok similarity index 100% rename from src/test/resources/gawk/igncfs.ok rename to src/it/resources/gawk/igncfs.ok diff --git a/src/test/resources/gawk/ignrcas2.awk b/src/it/resources/gawk/ignrcas2.awk similarity index 100% rename from src/test/resources/gawk/ignrcas2.awk rename to src/it/resources/gawk/ignrcas2.awk diff --git a/src/test/resources/gawk/ignrcas2.ok b/src/it/resources/gawk/ignrcas2.ok similarity index 100% rename from src/test/resources/gawk/ignrcas2.ok rename to src/it/resources/gawk/ignrcas2.ok diff --git a/src/test/resources/gawk/ignrcas3.awk b/src/it/resources/gawk/ignrcas3.awk similarity index 100% rename from src/test/resources/gawk/ignrcas3.awk rename to src/it/resources/gawk/ignrcas3.awk diff --git a/src/test/resources/gawk/ignrcas3.ok b/src/it/resources/gawk/ignrcas3.ok similarity index 100% rename from src/test/resources/gawk/ignrcas3.ok rename to src/it/resources/gawk/ignrcas3.ok diff --git a/src/test/resources/gawk/ignrcas4.awk b/src/it/resources/gawk/ignrcas4.awk similarity index 100% rename from src/test/resources/gawk/ignrcas4.awk rename to src/it/resources/gawk/ignrcas4.awk diff --git a/src/test/resources/gawk/ignrcas4.ok b/src/it/resources/gawk/ignrcas4.ok similarity index 100% rename from src/test/resources/gawk/ignrcas4.ok rename to src/it/resources/gawk/ignrcas4.ok diff --git a/src/test/resources/gawk/ignrcase.awk b/src/it/resources/gawk/ignrcase.awk similarity index 100% rename from src/test/resources/gawk/ignrcase.awk rename to src/it/resources/gawk/ignrcase.awk diff --git a/src/test/resources/gawk/ignrcase.in b/src/it/resources/gawk/ignrcase.in similarity index 100% rename from src/test/resources/gawk/ignrcase.in rename to src/it/resources/gawk/ignrcase.in diff --git a/src/test/resources/gawk/ignrcase.ok b/src/it/resources/gawk/ignrcase.ok similarity index 100% rename from src/test/resources/gawk/ignrcase.ok rename to src/it/resources/gawk/ignrcase.ok diff --git a/src/test/resources/gawk/incdupe.ok b/src/it/resources/gawk/incdupe.ok similarity index 100% rename from src/test/resources/gawk/incdupe.ok rename to src/it/resources/gawk/incdupe.ok diff --git a/src/test/resources/gawk/incdupe2.ok b/src/it/resources/gawk/incdupe2.ok similarity index 100% rename from src/test/resources/gawk/incdupe2.ok rename to src/it/resources/gawk/incdupe2.ok diff --git a/src/test/resources/gawk/incdupe3.ok b/src/it/resources/gawk/incdupe3.ok similarity index 100% rename from src/test/resources/gawk/incdupe3.ok rename to src/it/resources/gawk/incdupe3.ok diff --git a/src/test/resources/gawk/incdupe4.ok b/src/it/resources/gawk/incdupe4.ok similarity index 100% rename from src/test/resources/gawk/incdupe4.ok rename to src/it/resources/gawk/incdupe4.ok diff --git a/src/test/resources/gawk/incdupe5.ok b/src/it/resources/gawk/incdupe5.ok similarity index 100% rename from src/test/resources/gawk/incdupe5.ok rename to src/it/resources/gawk/incdupe5.ok diff --git a/src/test/resources/gawk/incdupe6.ok b/src/it/resources/gawk/incdupe6.ok similarity index 100% rename from src/test/resources/gawk/incdupe6.ok rename to src/it/resources/gawk/incdupe6.ok diff --git a/src/test/resources/gawk/incdupe7.ok b/src/it/resources/gawk/incdupe7.ok similarity index 100% rename from src/test/resources/gawk/incdupe7.ok rename to src/it/resources/gawk/incdupe7.ok diff --git a/src/test/resources/gawk/inchello.awk b/src/it/resources/gawk/inchello.awk similarity index 100% rename from src/test/resources/gawk/inchello.awk rename to src/it/resources/gawk/inchello.awk diff --git a/src/test/resources/gawk/inclib.awk b/src/it/resources/gawk/inclib.awk similarity index 100% rename from src/test/resources/gawk/inclib.awk rename to src/it/resources/gawk/inclib.awk diff --git a/src/test/resources/gawk/include.awk b/src/it/resources/gawk/include.awk similarity index 100% rename from src/test/resources/gawk/include.awk rename to src/it/resources/gawk/include.awk diff --git a/src/test/resources/gawk/include.ok b/src/it/resources/gawk/include.ok similarity index 100% rename from src/test/resources/gawk/include.ok rename to src/it/resources/gawk/include.ok diff --git a/src/test/resources/gawk/include2.ok b/src/it/resources/gawk/include2.ok similarity index 100% rename from src/test/resources/gawk/include2.ok rename to src/it/resources/gawk/include2.ok diff --git a/src/test/resources/gawk/indirectbuiltin.awk b/src/it/resources/gawk/indirectbuiltin.awk similarity index 100% rename from src/test/resources/gawk/indirectbuiltin.awk rename to src/it/resources/gawk/indirectbuiltin.awk diff --git a/src/test/resources/gawk/indirectbuiltin.ok b/src/it/resources/gawk/indirectbuiltin.ok similarity index 100% rename from src/test/resources/gawk/indirectbuiltin.ok rename to src/it/resources/gawk/indirectbuiltin.ok diff --git a/src/test/resources/gawk/indirectbuiltin2.awk b/src/it/resources/gawk/indirectbuiltin2.awk similarity index 100% rename from src/test/resources/gawk/indirectbuiltin2.awk rename to src/it/resources/gawk/indirectbuiltin2.awk diff --git a/src/test/resources/gawk/indirectbuiltin2.ok b/src/it/resources/gawk/indirectbuiltin2.ok similarity index 100% rename from src/test/resources/gawk/indirectbuiltin2.ok rename to src/it/resources/gawk/indirectbuiltin2.ok diff --git a/src/test/resources/gawk/indirectcall.awk b/src/it/resources/gawk/indirectcall.awk similarity index 100% rename from src/test/resources/gawk/indirectcall.awk rename to src/it/resources/gawk/indirectcall.awk diff --git a/src/test/resources/gawk/indirectcall.in b/src/it/resources/gawk/indirectcall.in similarity index 100% rename from src/test/resources/gawk/indirectcall.in rename to src/it/resources/gawk/indirectcall.in diff --git a/src/test/resources/gawk/indirectcall.ok b/src/it/resources/gawk/indirectcall.ok similarity index 100% rename from src/test/resources/gawk/indirectcall.ok rename to src/it/resources/gawk/indirectcall.ok diff --git a/src/test/resources/gawk/indirectcall2.awk b/src/it/resources/gawk/indirectcall2.awk similarity index 100% rename from src/test/resources/gawk/indirectcall2.awk rename to src/it/resources/gawk/indirectcall2.awk diff --git a/src/test/resources/gawk/indirectcall2.ok b/src/it/resources/gawk/indirectcall2.ok similarity index 100% rename from src/test/resources/gawk/indirectcall2.ok rename to src/it/resources/gawk/indirectcall2.ok diff --git a/src/test/resources/gawk/indirectcall3.awk b/src/it/resources/gawk/indirectcall3.awk similarity index 100% rename from src/test/resources/gawk/indirectcall3.awk rename to src/it/resources/gawk/indirectcall3.awk diff --git a/src/test/resources/gawk/intarray.ok b/src/it/resources/gawk/indirectcall3.ok similarity index 100% rename from src/test/resources/gawk/intarray.ok rename to src/it/resources/gawk/indirectcall3.ok diff --git a/src/test/resources/gawk/inf-nan-torture.awk b/src/it/resources/gawk/inf-nan-torture.awk similarity index 100% rename from src/test/resources/gawk/inf-nan-torture.awk rename to src/it/resources/gawk/inf-nan-torture.awk diff --git a/src/test/resources/gawk/inf-nan-torture.in b/src/it/resources/gawk/inf-nan-torture.in similarity index 100% rename from src/test/resources/gawk/inf-nan-torture.in rename to src/it/resources/gawk/inf-nan-torture.in diff --git a/src/test/resources/gawk/inf-nan-torture.ok b/src/it/resources/gawk/inf-nan-torture.ok similarity index 100% rename from src/test/resources/gawk/inf-nan-torture.ok rename to src/it/resources/gawk/inf-nan-torture.ok diff --git a/src/test/resources/gawk/inftest.awk b/src/it/resources/gawk/inftest.awk similarity index 100% rename from src/test/resources/gawk/inftest.awk rename to src/it/resources/gawk/inftest.awk diff --git a/src/test/resources/gawk/inftest.ok b/src/it/resources/gawk/inftest.ok similarity index 100% rename from src/test/resources/gawk/inftest.ok rename to src/it/resources/gawk/inftest.ok diff --git a/src/test/resources/gawk/inplace.1.in b/src/it/resources/gawk/inplace.1.in similarity index 100% rename from src/test/resources/gawk/inplace.1.in rename to src/it/resources/gawk/inplace.1.in diff --git a/src/test/resources/gawk/inplace.2.in b/src/it/resources/gawk/inplace.2.in similarity index 100% rename from src/test/resources/gawk/inplace.2.in rename to src/it/resources/gawk/inplace.2.in diff --git a/src/test/resources/gawk/inplace.in b/src/it/resources/gawk/inplace.in similarity index 100% rename from src/test/resources/gawk/inplace.in rename to src/it/resources/gawk/inplace.in diff --git a/src/test/resources/gawk/inplace1.1.ok b/src/it/resources/gawk/inplace1.1.ok similarity index 100% rename from src/test/resources/gawk/inplace1.1.ok rename to src/it/resources/gawk/inplace1.1.ok diff --git a/src/test/resources/gawk/inplace1.2.ok b/src/it/resources/gawk/inplace1.2.ok similarity index 100% rename from src/test/resources/gawk/inplace1.2.ok rename to src/it/resources/gawk/inplace1.2.ok diff --git a/src/test/resources/gawk/inplace1.ok b/src/it/resources/gawk/inplace1.ok similarity index 100% rename from src/test/resources/gawk/inplace1.ok rename to src/it/resources/gawk/inplace1.ok diff --git a/src/test/resources/gawk/inplace2.1.bak.ok b/src/it/resources/gawk/inplace2.1.bak.ok similarity index 100% rename from src/test/resources/gawk/inplace2.1.bak.ok rename to src/it/resources/gawk/inplace2.1.bak.ok diff --git a/src/test/resources/gawk/inplace2.1.ok b/src/it/resources/gawk/inplace2.1.ok similarity index 100% rename from src/test/resources/gawk/inplace2.1.ok rename to src/it/resources/gawk/inplace2.1.ok diff --git a/src/test/resources/gawk/inplace2.2.bak.ok b/src/it/resources/gawk/inplace2.2.bak.ok similarity index 100% rename from src/test/resources/gawk/inplace2.2.bak.ok rename to src/it/resources/gawk/inplace2.2.bak.ok diff --git a/src/test/resources/gawk/inplace2.2.ok b/src/it/resources/gawk/inplace2.2.ok similarity index 100% rename from src/test/resources/gawk/inplace2.2.ok rename to src/it/resources/gawk/inplace2.2.ok diff --git a/src/test/resources/gawk/inplace2.ok b/src/it/resources/gawk/inplace2.ok similarity index 100% rename from src/test/resources/gawk/inplace2.ok rename to src/it/resources/gawk/inplace2.ok diff --git a/src/test/resources/gawk/inplace2bcomp.1.ok b/src/it/resources/gawk/inplace2bcomp.1.ok similarity index 100% rename from src/test/resources/gawk/inplace2bcomp.1.ok rename to src/it/resources/gawk/inplace2bcomp.1.ok diff --git a/src/test/resources/gawk/inplace2bcomp.1.orig.ok b/src/it/resources/gawk/inplace2bcomp.1.orig.ok similarity index 100% rename from src/test/resources/gawk/inplace2bcomp.1.orig.ok rename to src/it/resources/gawk/inplace2bcomp.1.orig.ok diff --git a/src/test/resources/gawk/inplace2bcomp.2.ok b/src/it/resources/gawk/inplace2bcomp.2.ok similarity index 100% rename from src/test/resources/gawk/inplace2bcomp.2.ok rename to src/it/resources/gawk/inplace2bcomp.2.ok diff --git a/src/test/resources/gawk/inplace2bcomp.2.orig.ok b/src/it/resources/gawk/inplace2bcomp.2.orig.ok similarity index 100% rename from src/test/resources/gawk/inplace2bcomp.2.orig.ok rename to src/it/resources/gawk/inplace2bcomp.2.orig.ok diff --git a/src/test/resources/gawk/inplace2bcomp.ok b/src/it/resources/gawk/inplace2bcomp.ok similarity index 100% rename from src/test/resources/gawk/inplace2bcomp.ok rename to src/it/resources/gawk/inplace2bcomp.ok diff --git a/src/test/resources/gawk/inplace3.1.bak.ok b/src/it/resources/gawk/inplace3.1.bak.ok similarity index 100% rename from src/test/resources/gawk/inplace3.1.bak.ok rename to src/it/resources/gawk/inplace3.1.bak.ok diff --git a/src/test/resources/gawk/inplace3.1.ok b/src/it/resources/gawk/inplace3.1.ok similarity index 100% rename from src/test/resources/gawk/inplace3.1.ok rename to src/it/resources/gawk/inplace3.1.ok diff --git a/src/test/resources/gawk/inplace3.2.bak.ok b/src/it/resources/gawk/inplace3.2.bak.ok similarity index 100% rename from src/test/resources/gawk/inplace3.2.bak.ok rename to src/it/resources/gawk/inplace3.2.bak.ok diff --git a/src/test/resources/gawk/inplace3.2.ok b/src/it/resources/gawk/inplace3.2.ok similarity index 100% rename from src/test/resources/gawk/inplace3.2.ok rename to src/it/resources/gawk/inplace3.2.ok diff --git a/src/test/resources/gawk/inplace3.ok b/src/it/resources/gawk/inplace3.ok similarity index 100% rename from src/test/resources/gawk/inplace3.ok rename to src/it/resources/gawk/inplace3.ok diff --git a/src/test/resources/gawk/inplace3bcomp.1.ok b/src/it/resources/gawk/inplace3bcomp.1.ok similarity index 100% rename from src/test/resources/gawk/inplace3bcomp.1.ok rename to src/it/resources/gawk/inplace3bcomp.1.ok diff --git a/src/test/resources/gawk/inplace3bcomp.1.orig.ok b/src/it/resources/gawk/inplace3bcomp.1.orig.ok similarity index 100% rename from src/test/resources/gawk/inplace3bcomp.1.orig.ok rename to src/it/resources/gawk/inplace3bcomp.1.orig.ok diff --git a/src/test/resources/gawk/inplace3bcomp.2.ok b/src/it/resources/gawk/inplace3bcomp.2.ok similarity index 100% rename from src/test/resources/gawk/inplace3bcomp.2.ok rename to src/it/resources/gawk/inplace3bcomp.2.ok diff --git a/src/test/resources/gawk/inplace3bcomp.2.orig.ok b/src/it/resources/gawk/inplace3bcomp.2.orig.ok similarity index 100% rename from src/test/resources/gawk/inplace3bcomp.2.orig.ok rename to src/it/resources/gawk/inplace3bcomp.2.orig.ok diff --git a/src/test/resources/gawk/inplace3bcomp.ok b/src/it/resources/gawk/inplace3bcomp.ok similarity index 100% rename from src/test/resources/gawk/inplace3bcomp.ok rename to src/it/resources/gawk/inplace3bcomp.ok diff --git a/src/test/resources/gawk/inpref.awk b/src/it/resources/gawk/inpref.awk similarity index 100% rename from src/test/resources/gawk/inpref.awk rename to src/it/resources/gawk/inpref.awk diff --git a/src/test/resources/gawk/inpref.in b/src/it/resources/gawk/inpref.in similarity index 100% rename from src/test/resources/gawk/inpref.in rename to src/it/resources/gawk/inpref.in diff --git a/src/test/resources/gawk/inpref.ok b/src/it/resources/gawk/inpref.ok similarity index 100% rename from src/test/resources/gawk/inpref.ok rename to src/it/resources/gawk/inpref.ok diff --git a/src/test/resources/gawk/inputred.awk b/src/it/resources/gawk/inputred.awk similarity index 100% rename from src/test/resources/gawk/inputred.awk rename to src/it/resources/gawk/inputred.awk diff --git a/src/test/resources/gawk/inputred.ok b/src/it/resources/gawk/inputred.ok similarity index 100% rename from src/test/resources/gawk/inputred.ok rename to src/it/resources/gawk/inputred.ok diff --git a/src/test/resources/gawk/intarray.awk b/src/it/resources/gawk/intarray.awk similarity index 100% rename from src/test/resources/gawk/intarray.awk rename to src/it/resources/gawk/intarray.awk diff --git a/src/test/resources/gawk/iobug1.ok b/src/it/resources/gawk/intarray.ok similarity index 100% rename from src/test/resources/gawk/iobug1.ok rename to src/it/resources/gawk/intarray.ok diff --git a/src/test/resources/gawk/intest.awk b/src/it/resources/gawk/intest.awk similarity index 100% rename from src/test/resources/gawk/intest.awk rename to src/it/resources/gawk/intest.awk diff --git a/src/test/resources/gawk/intest.ok b/src/it/resources/gawk/intest.ok similarity index 100% rename from src/test/resources/gawk/intest.ok rename to src/it/resources/gawk/intest.ok diff --git a/src/test/resources/gawk/intformat.awk b/src/it/resources/gawk/intformat.awk similarity index 100% rename from src/test/resources/gawk/intformat.awk rename to src/it/resources/gawk/intformat.awk diff --git a/src/test/resources/gawk/intformat.ok b/src/it/resources/gawk/intformat.ok similarity index 100% rename from src/test/resources/gawk/intformat.ok rename to src/it/resources/gawk/intformat.ok diff --git a/src/test/resources/gawk/intprec.awk b/src/it/resources/gawk/intprec.awk similarity index 100% rename from src/test/resources/gawk/intprec.awk rename to src/it/resources/gawk/intprec.awk diff --git a/src/test/resources/gawk/intprec.ok b/src/it/resources/gawk/intprec.ok similarity index 100% rename from src/test/resources/gawk/intprec.ok rename to src/it/resources/gawk/intprec.ok diff --git a/src/test/resources/gawk/iobug1.awk b/src/it/resources/gawk/iobug1.awk similarity index 100% rename from src/test/resources/gawk/iobug1.awk rename to src/it/resources/gawk/iobug1.awk diff --git a/src/test/resources/gawk/mdim5.ok b/src/it/resources/gawk/iobug1.ok similarity index 100% rename from src/test/resources/gawk/mdim5.ok rename to src/it/resources/gawk/iobug1.ok diff --git a/src/test/resources/gawk/iolint.awk b/src/it/resources/gawk/iolint.awk similarity index 100% rename from src/test/resources/gawk/iolint.awk rename to src/it/resources/gawk/iolint.awk diff --git a/src/test/resources/gawk/iolint.ok b/src/it/resources/gawk/iolint.ok similarity index 100% rename from src/test/resources/gawk/iolint.ok rename to src/it/resources/gawk/iolint.ok diff --git a/src/test/resources/gawk/isarrayunset.awk b/src/it/resources/gawk/isarrayunset.awk similarity index 100% rename from src/test/resources/gawk/isarrayunset.awk rename to src/it/resources/gawk/isarrayunset.awk diff --git a/src/test/resources/gawk/isarrayunset.ok b/src/it/resources/gawk/isarrayunset.ok similarity index 100% rename from src/test/resources/gawk/isarrayunset.ok rename to src/it/resources/gawk/isarrayunset.ok diff --git a/src/test/resources/gawk/jarebug.awk b/src/it/resources/gawk/jarebug.awk similarity index 100% rename from src/test/resources/gawk/jarebug.awk rename to src/it/resources/gawk/jarebug.awk diff --git a/src/test/resources/gawk/jarebug.in b/src/it/resources/gawk/jarebug.in similarity index 100% rename from src/test/resources/gawk/jarebug.in rename to src/it/resources/gawk/jarebug.in diff --git a/src/test/resources/gawk/jarebug.ok b/src/it/resources/gawk/jarebug.ok similarity index 100% rename from src/test/resources/gawk/jarebug.ok rename to src/it/resources/gawk/jarebug.ok diff --git a/src/test/resources/gawk/jarebug.sh b/src/it/resources/gawk/jarebug.sh similarity index 100% rename from src/test/resources/gawk/jarebug.sh rename to src/it/resources/gawk/jarebug.sh diff --git a/src/test/resources/gawk/lc_num1.awk b/src/it/resources/gawk/lc_num1.awk similarity index 100% rename from src/test/resources/gawk/lc_num1.awk rename to src/it/resources/gawk/lc_num1.awk diff --git a/src/test/resources/gawk/lc_num1.ok b/src/it/resources/gawk/lc_num1.ok similarity index 100% rename from src/test/resources/gawk/lc_num1.ok rename to src/it/resources/gawk/lc_num1.ok diff --git a/src/test/resources/gawk/leaddig.awk b/src/it/resources/gawk/leaddig.awk similarity index 100% rename from src/test/resources/gawk/leaddig.awk rename to src/it/resources/gawk/leaddig.awk diff --git a/src/test/resources/gawk/leaddig.ok b/src/it/resources/gawk/leaddig.ok similarity index 100% rename from src/test/resources/gawk/leaddig.ok rename to src/it/resources/gawk/leaddig.ok diff --git a/src/test/resources/gawk/leadnl.awk b/src/it/resources/gawk/leadnl.awk similarity index 100% rename from src/test/resources/gawk/leadnl.awk rename to src/it/resources/gawk/leadnl.awk diff --git a/src/test/resources/gawk/leadnl.in b/src/it/resources/gawk/leadnl.in similarity index 100% rename from src/test/resources/gawk/leadnl.in rename to src/it/resources/gawk/leadnl.in diff --git a/src/test/resources/gawk/leadnl.ok b/src/it/resources/gawk/leadnl.ok similarity index 100% rename from src/test/resources/gawk/leadnl.ok rename to src/it/resources/gawk/leadnl.ok diff --git a/src/it/resources/gawk/lib/awkpath.awk b/src/it/resources/gawk/lib/awkpath.awk new file mode 100644 index 00000000..6663ca4b --- /dev/null +++ b/src/it/resources/gawk/lib/awkpath.awk @@ -0,0 +1 @@ +BEGIN { print "Found it." } diff --git a/src/test/resources/gawk/lint.awk b/src/it/resources/gawk/lint.awk similarity index 100% rename from src/test/resources/gawk/lint.awk rename to src/it/resources/gawk/lint.awk diff --git a/src/test/resources/gawk/lint.ok b/src/it/resources/gawk/lint.ok similarity index 100% rename from src/test/resources/gawk/lint.ok rename to src/it/resources/gawk/lint.ok diff --git a/src/test/resources/gawk/lintexp.awk b/src/it/resources/gawk/lintexp.awk similarity index 100% rename from src/test/resources/gawk/lintexp.awk rename to src/it/resources/gawk/lintexp.awk diff --git a/src/test/resources/gawk/lintexp.ok b/src/it/resources/gawk/lintexp.ok similarity index 100% rename from src/test/resources/gawk/lintexp.ok rename to src/it/resources/gawk/lintexp.ok diff --git a/src/test/resources/gawk/lintindex.awk b/src/it/resources/gawk/lintindex.awk similarity index 100% rename from src/test/resources/gawk/lintindex.awk rename to src/it/resources/gawk/lintindex.awk diff --git a/src/test/resources/gawk/lintindex.ok b/src/it/resources/gawk/lintindex.ok similarity index 100% rename from src/test/resources/gawk/lintindex.ok rename to src/it/resources/gawk/lintindex.ok diff --git a/src/test/resources/gawk/lintint.awk b/src/it/resources/gawk/lintint.awk similarity index 100% rename from src/test/resources/gawk/lintint.awk rename to src/it/resources/gawk/lintint.awk diff --git a/src/test/resources/gawk/lintint.ok b/src/it/resources/gawk/lintint.ok similarity index 100% rename from src/test/resources/gawk/lintint.ok rename to src/it/resources/gawk/lintint.ok diff --git a/src/test/resources/gawk/lintlength.awk b/src/it/resources/gawk/lintlength.awk similarity index 100% rename from src/test/resources/gawk/lintlength.awk rename to src/it/resources/gawk/lintlength.awk diff --git a/src/test/resources/gawk/lintlength.ok b/src/it/resources/gawk/lintlength.ok similarity index 100% rename from src/test/resources/gawk/lintlength.ok rename to src/it/resources/gawk/lintlength.ok diff --git a/src/test/resources/gawk/lintold.awk b/src/it/resources/gawk/lintold.awk similarity index 100% rename from src/test/resources/gawk/lintold.awk rename to src/it/resources/gawk/lintold.awk diff --git a/src/test/resources/gawk/lintold.in b/src/it/resources/gawk/lintold.in similarity index 100% rename from src/test/resources/gawk/lintold.in rename to src/it/resources/gawk/lintold.in diff --git a/src/test/resources/gawk/lintold.ok b/src/it/resources/gawk/lintold.ok similarity index 100% rename from src/test/resources/gawk/lintold.ok rename to src/it/resources/gawk/lintold.ok diff --git a/src/test/resources/gawk/lintplus.awk b/src/it/resources/gawk/lintplus.awk similarity index 100% rename from src/test/resources/gawk/lintplus.awk rename to src/it/resources/gawk/lintplus.awk diff --git a/src/test/resources/gawk/lintplus.ok b/src/it/resources/gawk/lintplus.ok similarity index 100% rename from src/test/resources/gawk/lintplus.ok rename to src/it/resources/gawk/lintplus.ok diff --git a/src/test/resources/gawk/lintset.awk b/src/it/resources/gawk/lintset.awk similarity index 100% rename from src/test/resources/gawk/lintset.awk rename to src/it/resources/gawk/lintset.awk diff --git a/src/test/resources/gawk/lintset.ok b/src/it/resources/gawk/lintset.ok similarity index 100% rename from src/test/resources/gawk/lintset.ok rename to src/it/resources/gawk/lintset.ok diff --git a/src/test/resources/gawk/lintwarn.awk b/src/it/resources/gawk/lintwarn.awk similarity index 100% rename from src/test/resources/gawk/lintwarn.awk rename to src/it/resources/gawk/lintwarn.awk diff --git a/src/test/resources/gawk/lintwarn.ok b/src/it/resources/gawk/lintwarn.ok similarity index 100% rename from src/test/resources/gawk/lintwarn.ok rename to src/it/resources/gawk/lintwarn.ok diff --git a/src/test/resources/gawk/litoct.awk b/src/it/resources/gawk/litoct.awk similarity index 100% rename from src/test/resources/gawk/litoct.awk rename to src/it/resources/gawk/litoct.awk diff --git a/src/test/resources/gawk/litoct.in b/src/it/resources/gawk/litoct.in similarity index 100% rename from src/test/resources/gawk/litoct.in rename to src/it/resources/gawk/litoct.in diff --git a/src/test/resources/gawk/litoct.ok b/src/it/resources/gawk/litoct.ok similarity index 100% rename from src/test/resources/gawk/litoct.ok rename to src/it/resources/gawk/litoct.ok diff --git a/src/test/resources/gawk/localenl.ok b/src/it/resources/gawk/localenl.ok similarity index 100% rename from src/test/resources/gawk/localenl.ok rename to src/it/resources/gawk/localenl.ok diff --git a/src/test/resources/gawk/localenl.sh b/src/it/resources/gawk/localenl.sh similarity index 100% rename from src/test/resources/gawk/localenl.sh rename to src/it/resources/gawk/localenl.sh diff --git a/src/test/resources/gawk/longsub.awk b/src/it/resources/gawk/longsub.awk similarity index 100% rename from src/test/resources/gawk/longsub.awk rename to src/it/resources/gawk/longsub.awk diff --git a/src/test/resources/gawk/longsub.in b/src/it/resources/gawk/longsub.in similarity index 100% rename from src/test/resources/gawk/longsub.in rename to src/it/resources/gawk/longsub.in diff --git a/src/test/resources/gawk/longsub.ok b/src/it/resources/gawk/longsub.ok similarity index 100% rename from src/test/resources/gawk/longsub.ok rename to src/it/resources/gawk/longsub.ok diff --git a/src/test/resources/gawk/longwrds.awk b/src/it/resources/gawk/longwrds.awk similarity index 100% rename from src/test/resources/gawk/longwrds.awk rename to src/it/resources/gawk/longwrds.awk diff --git a/src/test/resources/gawk/longwrds.in b/src/it/resources/gawk/longwrds.in similarity index 100% rename from src/test/resources/gawk/longwrds.in rename to src/it/resources/gawk/longwrds.in diff --git a/src/test/resources/gawk/longwrds.ok b/src/it/resources/gawk/longwrds.ok similarity index 100% rename from src/test/resources/gawk/longwrds.ok rename to src/it/resources/gawk/longwrds.ok diff --git a/src/test/resources/gawk/makepmafile.c b/src/it/resources/gawk/makepmafile.c similarity index 100% rename from src/test/resources/gawk/makepmafile.c rename to src/it/resources/gawk/makepmafile.c diff --git a/src/test/resources/gawk/manglprm.awk b/src/it/resources/gawk/manglprm.awk similarity index 100% rename from src/test/resources/gawk/manglprm.awk rename to src/it/resources/gawk/manglprm.awk diff --git a/src/test/resources/gawk/manglprm.in b/src/it/resources/gawk/manglprm.in similarity index 100% rename from src/test/resources/gawk/manglprm.in rename to src/it/resources/gawk/manglprm.in diff --git a/src/test/resources/gawk/manglprm.ok b/src/it/resources/gawk/manglprm.ok similarity index 100% rename from src/test/resources/gawk/manglprm.ok rename to src/it/resources/gawk/manglprm.ok diff --git a/src/it/resources/gawk/manyfiles.awk b/src/it/resources/gawk/manyfiles.awk new file mode 100644 index 00000000..8651a3a4 --- /dev/null +++ b/src/it/resources/gawk/manyfiles.awk @@ -0,0 +1 @@ +{ print $2 > ("junk/" $1) } diff --git a/src/test/resources/gawk/manyfiles.ok b/src/it/resources/gawk/manyfiles.ok similarity index 100% rename from src/test/resources/gawk/manyfiles.ok rename to src/it/resources/gawk/manyfiles.ok diff --git a/src/test/resources/gawk/match1.awk b/src/it/resources/gawk/match1.awk similarity index 100% rename from src/test/resources/gawk/match1.awk rename to src/it/resources/gawk/match1.awk diff --git a/src/test/resources/gawk/match1.ok b/src/it/resources/gawk/match1.ok similarity index 100% rename from src/test/resources/gawk/match1.ok rename to src/it/resources/gawk/match1.ok diff --git a/src/test/resources/gawk/match2.awk b/src/it/resources/gawk/match2.awk similarity index 100% rename from src/test/resources/gawk/match2.awk rename to src/it/resources/gawk/match2.awk diff --git a/src/test/resources/gawk/match2.ok b/src/it/resources/gawk/match2.ok similarity index 100% rename from src/test/resources/gawk/match2.ok rename to src/it/resources/gawk/match2.ok diff --git a/src/test/resources/gawk/match3.awk b/src/it/resources/gawk/match3.awk similarity index 100% rename from src/test/resources/gawk/match3.awk rename to src/it/resources/gawk/match3.awk diff --git a/src/test/resources/gawk/match3.in b/src/it/resources/gawk/match3.in similarity index 100% rename from src/test/resources/gawk/match3.in rename to src/it/resources/gawk/match3.in diff --git a/src/test/resources/gawk/match3.ok b/src/it/resources/gawk/match3.ok similarity index 100% rename from src/test/resources/gawk/match3.ok rename to src/it/resources/gawk/match3.ok diff --git a/src/test/resources/gawk/math.awk b/src/it/resources/gawk/math.awk similarity index 100% rename from src/test/resources/gawk/math.awk rename to src/it/resources/gawk/math.awk diff --git a/src/test/resources/gawk/math.ok b/src/it/resources/gawk/math.ok similarity index 100% rename from src/test/resources/gawk/math.ok rename to src/it/resources/gawk/math.ok diff --git a/src/test/resources/gawk/mbfw1.awk b/src/it/resources/gawk/mbfw1.awk similarity index 100% rename from src/test/resources/gawk/mbfw1.awk rename to src/it/resources/gawk/mbfw1.awk diff --git a/src/test/resources/gawk/mbfw1.in b/src/it/resources/gawk/mbfw1.in similarity index 100% rename from src/test/resources/gawk/mbfw1.in rename to src/it/resources/gawk/mbfw1.in diff --git a/src/test/resources/gawk/mbfw1.ok b/src/it/resources/gawk/mbfw1.ok similarity index 100% rename from src/test/resources/gawk/mbfw1.ok rename to src/it/resources/gawk/mbfw1.ok diff --git a/src/test/resources/gawk/mbprintf1.awk b/src/it/resources/gawk/mbprintf1.awk similarity index 100% rename from src/test/resources/gawk/mbprintf1.awk rename to src/it/resources/gawk/mbprintf1.awk diff --git a/src/test/resources/gawk/mbprintf1.in b/src/it/resources/gawk/mbprintf1.in similarity index 100% rename from src/test/resources/gawk/mbprintf1.in rename to src/it/resources/gawk/mbprintf1.in diff --git a/src/test/resources/gawk/mbprintf1.ok b/src/it/resources/gawk/mbprintf1.ok similarity index 100% rename from src/test/resources/gawk/mbprintf1.ok rename to src/it/resources/gawk/mbprintf1.ok diff --git a/src/test/resources/gawk/mbprintf2.awk b/src/it/resources/gawk/mbprintf2.awk similarity index 100% rename from src/test/resources/gawk/mbprintf2.awk rename to src/it/resources/gawk/mbprintf2.awk diff --git a/src/test/resources/gawk/mbprintf2.ok b/src/it/resources/gawk/mbprintf2.ok similarity index 100% rename from src/test/resources/gawk/mbprintf2.ok rename to src/it/resources/gawk/mbprintf2.ok diff --git a/src/test/resources/gawk/mbprintf3.awk b/src/it/resources/gawk/mbprintf3.awk similarity index 100% rename from src/test/resources/gawk/mbprintf3.awk rename to src/it/resources/gawk/mbprintf3.awk diff --git a/src/test/resources/gawk/mbprintf3.in b/src/it/resources/gawk/mbprintf3.in similarity index 100% rename from src/test/resources/gawk/mbprintf3.in rename to src/it/resources/gawk/mbprintf3.in diff --git a/src/test/resources/gawk/mbprintf3.ok b/src/it/resources/gawk/mbprintf3.ok similarity index 100% rename from src/test/resources/gawk/mbprintf3.ok rename to src/it/resources/gawk/mbprintf3.ok diff --git a/src/test/resources/gawk/mbprintf4.awk b/src/it/resources/gawk/mbprintf4.awk similarity index 100% rename from src/test/resources/gawk/mbprintf4.awk rename to src/it/resources/gawk/mbprintf4.awk diff --git a/src/test/resources/gawk/mbprintf4.in b/src/it/resources/gawk/mbprintf4.in similarity index 100% rename from src/test/resources/gawk/mbprintf4.in rename to src/it/resources/gawk/mbprintf4.in diff --git a/src/test/resources/gawk/mbprintf4.ok b/src/it/resources/gawk/mbprintf4.ok similarity index 100% rename from src/test/resources/gawk/mbprintf4.ok rename to src/it/resources/gawk/mbprintf4.ok diff --git a/src/test/resources/gawk/mbprintf5.awk b/src/it/resources/gawk/mbprintf5.awk similarity index 100% rename from src/test/resources/gawk/mbprintf5.awk rename to src/it/resources/gawk/mbprintf5.awk diff --git a/src/test/resources/gawk/mbprintf5.in b/src/it/resources/gawk/mbprintf5.in similarity index 100% rename from src/test/resources/gawk/mbprintf5.in rename to src/it/resources/gawk/mbprintf5.in diff --git a/src/test/resources/gawk/mbprintf5.ok b/src/it/resources/gawk/mbprintf5.ok similarity index 100% rename from src/test/resources/gawk/mbprintf5.ok rename to src/it/resources/gawk/mbprintf5.ok diff --git a/src/test/resources/gawk/mbstr1.awk b/src/it/resources/gawk/mbstr1.awk similarity index 100% rename from src/test/resources/gawk/mbstr1.awk rename to src/it/resources/gawk/mbstr1.awk diff --git a/src/test/resources/gawk/mbstr1.ok b/src/it/resources/gawk/mbstr1.ok similarity index 100% rename from src/test/resources/gawk/mbstr1.ok rename to src/it/resources/gawk/mbstr1.ok diff --git a/src/test/resources/gawk/mbstr2.awk b/src/it/resources/gawk/mbstr2.awk similarity index 100% rename from src/test/resources/gawk/mbstr2.awk rename to src/it/resources/gawk/mbstr2.awk diff --git a/src/test/resources/gawk/mbstr2.in b/src/it/resources/gawk/mbstr2.in similarity index 100% rename from src/test/resources/gawk/mbstr2.in rename to src/it/resources/gawk/mbstr2.in diff --git a/src/test/resources/gawk/mbstr2.ok b/src/it/resources/gawk/mbstr2.ok similarity index 100% rename from src/test/resources/gawk/mbstr2.ok rename to src/it/resources/gawk/mbstr2.ok diff --git a/src/test/resources/gawk/mdim1.awk b/src/it/resources/gawk/mdim1.awk similarity index 100% rename from src/test/resources/gawk/mdim1.awk rename to src/it/resources/gawk/mdim1.awk diff --git a/src/test/resources/gawk/mdim1.ok b/src/it/resources/gawk/mdim1.ok similarity index 100% rename from src/test/resources/gawk/mdim1.ok rename to src/it/resources/gawk/mdim1.ok diff --git a/src/test/resources/gawk/mdim2.awk b/src/it/resources/gawk/mdim2.awk similarity index 100% rename from src/test/resources/gawk/mdim2.awk rename to src/it/resources/gawk/mdim2.awk diff --git a/src/test/resources/gawk/mdim2.ok b/src/it/resources/gawk/mdim2.ok similarity index 100% rename from src/test/resources/gawk/mdim2.ok rename to src/it/resources/gawk/mdim2.ok diff --git a/src/test/resources/gawk/mdim3.awk b/src/it/resources/gawk/mdim3.awk similarity index 100% rename from src/test/resources/gawk/mdim3.awk rename to src/it/resources/gawk/mdim3.awk diff --git a/src/test/resources/gawk/mdim3.ok b/src/it/resources/gawk/mdim3.ok similarity index 100% rename from src/test/resources/gawk/mdim3.ok rename to src/it/resources/gawk/mdim3.ok diff --git a/src/test/resources/gawk/mdim4.awk b/src/it/resources/gawk/mdim4.awk similarity index 100% rename from src/test/resources/gawk/mdim4.awk rename to src/it/resources/gawk/mdim4.awk diff --git a/src/test/resources/gawk/mdim4.in b/src/it/resources/gawk/mdim4.in similarity index 100% rename from src/test/resources/gawk/mdim4.in rename to src/it/resources/gawk/mdim4.in diff --git a/src/test/resources/gawk/mdim4.ok b/src/it/resources/gawk/mdim4.ok similarity index 100% rename from src/test/resources/gawk/mdim4.ok rename to src/it/resources/gawk/mdim4.ok diff --git a/src/test/resources/gawk/mdim5.awk b/src/it/resources/gawk/mdim5.awk similarity index 100% rename from src/test/resources/gawk/mdim5.awk rename to src/it/resources/gawk/mdim5.awk diff --git a/src/test/resources/gawk/mdim7.ok b/src/it/resources/gawk/mdim5.ok similarity index 100% rename from src/test/resources/gawk/mdim7.ok rename to src/it/resources/gawk/mdim5.ok diff --git a/src/test/resources/gawk/mdim6.awk b/src/it/resources/gawk/mdim6.awk similarity index 100% rename from src/test/resources/gawk/mdim6.awk rename to src/it/resources/gawk/mdim6.awk diff --git a/src/test/resources/gawk/mdim6.ok b/src/it/resources/gawk/mdim6.ok similarity index 100% rename from src/test/resources/gawk/mdim6.ok rename to src/it/resources/gawk/mdim6.ok diff --git a/src/test/resources/gawk/mdim7.awk b/src/it/resources/gawk/mdim7.awk similarity index 100% rename from src/test/resources/gawk/mdim7.awk rename to src/it/resources/gawk/mdim7.awk diff --git a/src/test/resources/gawk/membug1.ok b/src/it/resources/gawk/mdim7.ok similarity index 100% rename from src/test/resources/gawk/membug1.ok rename to src/it/resources/gawk/mdim7.ok diff --git a/src/test/resources/gawk/mdim8.awk b/src/it/resources/gawk/mdim8.awk similarity index 100% rename from src/test/resources/gawk/mdim8.awk rename to src/it/resources/gawk/mdim8.awk diff --git a/src/test/resources/gawk/mdim8.in b/src/it/resources/gawk/mdim8.in similarity index 100% rename from src/test/resources/gawk/mdim8.in rename to src/it/resources/gawk/mdim8.in diff --git a/src/test/resources/gawk/mdim8.ok b/src/it/resources/gawk/mdim8.ok similarity index 100% rename from src/test/resources/gawk/mdim8.ok rename to src/it/resources/gawk/mdim8.ok diff --git a/src/test/resources/gawk/membug1.awk b/src/it/resources/gawk/membug1.awk similarity index 100% rename from src/test/resources/gawk/membug1.awk rename to src/it/resources/gawk/membug1.awk diff --git a/src/test/resources/gawk/membug1.in b/src/it/resources/gawk/membug1.in similarity index 100% rename from src/test/resources/gawk/membug1.in rename to src/it/resources/gawk/membug1.in diff --git a/src/test/resources/gawk/nfldstr.ok b/src/it/resources/gawk/membug1.ok similarity index 100% rename from src/test/resources/gawk/nfldstr.ok rename to src/it/resources/gawk/membug1.ok diff --git a/src/test/resources/gawk/memleak.awk b/src/it/resources/gawk/memleak.awk similarity index 100% rename from src/test/resources/gawk/memleak.awk rename to src/it/resources/gawk/memleak.awk diff --git a/src/test/resources/gawk/memleak.ok b/src/it/resources/gawk/memleak.ok similarity index 100% rename from src/test/resources/gawk/memleak.ok rename to src/it/resources/gawk/memleak.ok diff --git a/src/test/resources/gawk/messages.awk b/src/it/resources/gawk/messages.awk similarity index 100% rename from src/test/resources/gawk/messages.awk rename to src/it/resources/gawk/messages.awk diff --git a/src/test/resources/gawk/minusstr.awk b/src/it/resources/gawk/minusstr.awk similarity index 100% rename from src/test/resources/gawk/minusstr.awk rename to src/it/resources/gawk/minusstr.awk diff --git a/src/test/resources/gawk/minusstr.ok b/src/it/resources/gawk/minusstr.ok similarity index 100% rename from src/test/resources/gawk/minusstr.ok rename to src/it/resources/gawk/minusstr.ok diff --git a/src/test/resources/gawk/mixed1.ok b/src/it/resources/gawk/mixed1.ok similarity index 100% rename from src/test/resources/gawk/mixed1.ok rename to src/it/resources/gawk/mixed1.ok diff --git a/src/test/resources/gawk/mktime.awk b/src/it/resources/gawk/mktime.awk similarity index 100% rename from src/test/resources/gawk/mktime.awk rename to src/it/resources/gawk/mktime.awk diff --git a/src/test/resources/gawk/mktime.in b/src/it/resources/gawk/mktime.in similarity index 100% rename from src/test/resources/gawk/mktime.in rename to src/it/resources/gawk/mktime.in diff --git a/src/test/resources/gawk/mktime.ok b/src/it/resources/gawk/mktime.ok similarity index 100% rename from src/test/resources/gawk/mktime.ok rename to src/it/resources/gawk/mktime.ok diff --git a/src/test/resources/gawk/mmap8k.awk b/src/it/resources/gawk/mmap8k.awk similarity index 100% rename from src/test/resources/gawk/mmap8k.awk rename to src/it/resources/gawk/mmap8k.awk diff --git a/src/test/resources/gawk/mmap8k.in b/src/it/resources/gawk/mmap8k.in similarity index 100% rename from src/test/resources/gawk/mmap8k.in rename to src/it/resources/gawk/mmap8k.in diff --git a/src/test/resources/gawk/mmap8k.ok b/src/it/resources/gawk/mmap8k.ok similarity index 100% rename from src/test/resources/gawk/mmap8k.ok rename to src/it/resources/gawk/mmap8k.ok diff --git a/src/test/resources/gawk/modifiers.ok b/src/it/resources/gawk/modifiers.ok similarity index 100% rename from src/test/resources/gawk/modifiers.ok rename to src/it/resources/gawk/modifiers.ok diff --git a/src/test/resources/gawk/modifiers.sh b/src/it/resources/gawk/modifiers.sh similarity index 100% rename from src/test/resources/gawk/modifiers.sh rename to src/it/resources/gawk/modifiers.sh diff --git a/src/test/resources/gawk/mpfranswer42.awk b/src/it/resources/gawk/mpfranswer42.awk similarity index 100% rename from src/test/resources/gawk/mpfranswer42.awk rename to src/it/resources/gawk/mpfranswer42.awk diff --git a/src/test/resources/gawk/mpfranswer42.ok b/src/it/resources/gawk/mpfranswer42.ok similarity index 100% rename from src/test/resources/gawk/mpfranswer42.ok rename to src/it/resources/gawk/mpfranswer42.ok diff --git a/src/test/resources/gawk/mpfrbigint.awk b/src/it/resources/gawk/mpfrbigint.awk similarity index 100% rename from src/test/resources/gawk/mpfrbigint.awk rename to src/it/resources/gawk/mpfrbigint.awk diff --git a/src/test/resources/gawk/mpfrbigint.ok b/src/it/resources/gawk/mpfrbigint.ok similarity index 100% rename from src/test/resources/gawk/mpfrbigint.ok rename to src/it/resources/gawk/mpfrbigint.ok diff --git a/src/test/resources/gawk/mpfrbigint2.awk b/src/it/resources/gawk/mpfrbigint2.awk similarity index 100% rename from src/test/resources/gawk/mpfrbigint2.awk rename to src/it/resources/gawk/mpfrbigint2.awk diff --git a/src/test/resources/gawk/mpfrbigint2.in b/src/it/resources/gawk/mpfrbigint2.in similarity index 100% rename from src/test/resources/gawk/mpfrbigint2.in rename to src/it/resources/gawk/mpfrbigint2.in diff --git a/src/test/resources/gawk/mpfrbigint2.ok b/src/it/resources/gawk/mpfrbigint2.ok similarity index 100% rename from src/test/resources/gawk/mpfrbigint2.ok rename to src/it/resources/gawk/mpfrbigint2.ok diff --git a/src/test/resources/gawk/mpfrcase.awk b/src/it/resources/gawk/mpfrcase.awk similarity index 100% rename from src/test/resources/gawk/mpfrcase.awk rename to src/it/resources/gawk/mpfrcase.awk diff --git a/src/test/resources/gawk/mpfrcase.in b/src/it/resources/gawk/mpfrcase.in similarity index 100% rename from src/test/resources/gawk/mpfrcase.in rename to src/it/resources/gawk/mpfrcase.in diff --git a/src/test/resources/gawk/mpfrcase.ok b/src/it/resources/gawk/mpfrcase.ok similarity index 100% rename from src/test/resources/gawk/mpfrcase.ok rename to src/it/resources/gawk/mpfrcase.ok diff --git a/src/test/resources/gawk/mpfrcase2.awk b/src/it/resources/gawk/mpfrcase2.awk similarity index 100% rename from src/test/resources/gawk/mpfrcase2.awk rename to src/it/resources/gawk/mpfrcase2.awk diff --git a/src/test/resources/gawk/mpfrcase2.in b/src/it/resources/gawk/mpfrcase2.in similarity index 100% rename from src/test/resources/gawk/mpfrcase2.in rename to src/it/resources/gawk/mpfrcase2.in diff --git a/src/test/resources/gawk/mpfrcase2.ok b/src/it/resources/gawk/mpfrcase2.ok similarity index 100% rename from src/test/resources/gawk/mpfrcase2.ok rename to src/it/resources/gawk/mpfrcase2.ok diff --git a/src/test/resources/gawk/mpfrexprange.awk b/src/it/resources/gawk/mpfrexprange.awk similarity index 100% rename from src/test/resources/gawk/mpfrexprange.awk rename to src/it/resources/gawk/mpfrexprange.awk diff --git a/src/test/resources/gawk/mpfrexprange.ok b/src/it/resources/gawk/mpfrexprange.ok similarity index 100% rename from src/test/resources/gawk/mpfrexprange.ok rename to src/it/resources/gawk/mpfrexprange.ok diff --git a/src/test/resources/gawk/mpfrfield.awk b/src/it/resources/gawk/mpfrfield.awk similarity index 100% rename from src/test/resources/gawk/mpfrfield.awk rename to src/it/resources/gawk/mpfrfield.awk diff --git a/src/test/resources/gawk/mpfrfield.in b/src/it/resources/gawk/mpfrfield.in similarity index 100% rename from src/test/resources/gawk/mpfrfield.in rename to src/it/resources/gawk/mpfrfield.in diff --git a/src/test/resources/gawk/mpfrfield.ok b/src/it/resources/gawk/mpfrfield.ok similarity index 100% rename from src/test/resources/gawk/mpfrfield.ok rename to src/it/resources/gawk/mpfrfield.ok diff --git a/src/test/resources/gawk/mpfrieee.awk b/src/it/resources/gawk/mpfrieee.awk similarity index 100% rename from src/test/resources/gawk/mpfrieee.awk rename to src/it/resources/gawk/mpfrieee.awk diff --git a/src/test/resources/gawk/mpfrieee.ok b/src/it/resources/gawk/mpfrieee.ok similarity index 100% rename from src/test/resources/gawk/mpfrieee.ok rename to src/it/resources/gawk/mpfrieee.ok diff --git a/src/test/resources/gawk/mpfrmemok1.awk b/src/it/resources/gawk/mpfrmemok1.awk similarity index 100% rename from src/test/resources/gawk/mpfrmemok1.awk rename to src/it/resources/gawk/mpfrmemok1.awk diff --git a/src/test/resources/gawk/mpfrmemok1.ok b/src/it/resources/gawk/mpfrmemok1.ok similarity index 100% rename from src/test/resources/gawk/mpfrmemok1.ok rename to src/it/resources/gawk/mpfrmemok1.ok diff --git a/src/test/resources/gawk/mpfrnegzero.awk b/src/it/resources/gawk/mpfrnegzero.awk similarity index 100% rename from src/test/resources/gawk/mpfrnegzero.awk rename to src/it/resources/gawk/mpfrnegzero.awk diff --git a/src/test/resources/gawk/mpfrnegzero.ok b/src/it/resources/gawk/mpfrnegzero.ok similarity index 100% rename from src/test/resources/gawk/mpfrnegzero.ok rename to src/it/resources/gawk/mpfrnegzero.ok diff --git a/src/test/resources/gawk/mpfrnegzero2.awk b/src/it/resources/gawk/mpfrnegzero2.awk similarity index 100% rename from src/test/resources/gawk/mpfrnegzero2.awk rename to src/it/resources/gawk/mpfrnegzero2.awk diff --git a/src/test/resources/gawk/mpfrnegzero2.ok b/src/it/resources/gawk/mpfrnegzero2.ok similarity index 100% rename from src/test/resources/gawk/mpfrnegzero2.ok rename to src/it/resources/gawk/mpfrnegzero2.ok diff --git a/src/test/resources/gawk/mpfrnonum.awk b/src/it/resources/gawk/mpfrnonum.awk similarity index 100% rename from src/test/resources/gawk/mpfrnonum.awk rename to src/it/resources/gawk/mpfrnonum.awk diff --git a/src/test/resources/gawk/mpfrnonum.in b/src/it/resources/gawk/mpfrnonum.in similarity index 100% rename from src/test/resources/gawk/mpfrnonum.in rename to src/it/resources/gawk/mpfrnonum.in diff --git a/src/test/resources/gawk/mpfrnonum.ok b/src/it/resources/gawk/mpfrnonum.ok similarity index 100% rename from src/test/resources/gawk/mpfrnonum.ok rename to src/it/resources/gawk/mpfrnonum.ok diff --git a/src/test/resources/gawk/mpfrnr.awk b/src/it/resources/gawk/mpfrnr.awk similarity index 100% rename from src/test/resources/gawk/mpfrnr.awk rename to src/it/resources/gawk/mpfrnr.awk diff --git a/src/test/resources/gawk/mpfrnr.in b/src/it/resources/gawk/mpfrnr.in similarity index 100% rename from src/test/resources/gawk/mpfrnr.in rename to src/it/resources/gawk/mpfrnr.in diff --git a/src/test/resources/gawk/mpfrnr.ok b/src/it/resources/gawk/mpfrnr.ok similarity index 100% rename from src/test/resources/gawk/mpfrnr.ok rename to src/it/resources/gawk/mpfrnr.ok diff --git a/src/test/resources/gawk/mpfrrem.awk b/src/it/resources/gawk/mpfrrem.awk similarity index 100% rename from src/test/resources/gawk/mpfrrem.awk rename to src/it/resources/gawk/mpfrrem.awk diff --git a/src/test/resources/gawk/mpfrrem.ok b/src/it/resources/gawk/mpfrrem.ok similarity index 100% rename from src/test/resources/gawk/mpfrrem.ok rename to src/it/resources/gawk/mpfrrem.ok diff --git a/src/test/resources/gawk/mpfrrnd.awk b/src/it/resources/gawk/mpfrrnd.awk similarity index 100% rename from src/test/resources/gawk/mpfrrnd.awk rename to src/it/resources/gawk/mpfrrnd.awk diff --git a/src/test/resources/gawk/mpfrrnd.ok b/src/it/resources/gawk/mpfrrnd.ok similarity index 100% rename from src/test/resources/gawk/mpfrrnd.ok rename to src/it/resources/gawk/mpfrrnd.ok diff --git a/src/test/resources/gawk/mpfrrndeval.awk b/src/it/resources/gawk/mpfrrndeval.awk similarity index 100% rename from src/test/resources/gawk/mpfrrndeval.awk rename to src/it/resources/gawk/mpfrrndeval.awk diff --git a/src/test/resources/gawk/mpfrrndeval.ok b/src/it/resources/gawk/mpfrrndeval.ok similarity index 100% rename from src/test/resources/gawk/mpfrrndeval.ok rename to src/it/resources/gawk/mpfrrndeval.ok diff --git a/src/test/resources/gawk/mpfrsort.awk b/src/it/resources/gawk/mpfrsort.awk similarity index 100% rename from src/test/resources/gawk/mpfrsort.awk rename to src/it/resources/gawk/mpfrsort.awk diff --git a/src/test/resources/gawk/mpfrsort.ok b/src/it/resources/gawk/mpfrsort.ok similarity index 100% rename from src/test/resources/gawk/mpfrsort.ok rename to src/it/resources/gawk/mpfrsort.ok diff --git a/src/test/resources/gawk/mpfrsqrt.awk b/src/it/resources/gawk/mpfrsqrt.awk similarity index 100% rename from src/test/resources/gawk/mpfrsqrt.awk rename to src/it/resources/gawk/mpfrsqrt.awk diff --git a/src/test/resources/gawk/mpfrsqrt.ok b/src/it/resources/gawk/mpfrsqrt.ok similarity index 100% rename from src/test/resources/gawk/mpfrsqrt.ok rename to src/it/resources/gawk/mpfrsqrt.ok diff --git a/src/test/resources/gawk/mpfrstrtonum.awk b/src/it/resources/gawk/mpfrstrtonum.awk similarity index 100% rename from src/test/resources/gawk/mpfrstrtonum.awk rename to src/it/resources/gawk/mpfrstrtonum.awk diff --git a/src/test/resources/gawk/mpfrstrtonum.ok b/src/it/resources/gawk/mpfrstrtonum.ok similarity index 100% rename from src/test/resources/gawk/mpfrstrtonum.ok rename to src/it/resources/gawk/mpfrstrtonum.ok diff --git a/src/test/resources/gawk/mpfruplus.ok b/src/it/resources/gawk/mpfruplus.ok similarity index 100% rename from src/test/resources/gawk/mpfruplus.ok rename to src/it/resources/gawk/mpfruplus.ok diff --git a/src/test/resources/gawk/mpgforcenum.awk b/src/it/resources/gawk/mpgforcenum.awk similarity index 100% rename from src/test/resources/gawk/mpgforcenum.awk rename to src/it/resources/gawk/mpgforcenum.awk diff --git a/src/test/resources/gawk/mpgforcenum.ok b/src/it/resources/gawk/mpgforcenum.ok similarity index 100% rename from src/test/resources/gawk/mpgforcenum.ok rename to src/it/resources/gawk/mpgforcenum.ok diff --git a/src/test/resources/gawk/mtchi18n.awk b/src/it/resources/gawk/mtchi18n.awk similarity index 100% rename from src/test/resources/gawk/mtchi18n.awk rename to src/it/resources/gawk/mtchi18n.awk diff --git a/src/test/resources/gawk/mtchi18n.in b/src/it/resources/gawk/mtchi18n.in similarity index 100% rename from src/test/resources/gawk/mtchi18n.in rename to src/it/resources/gawk/mtchi18n.in diff --git a/src/test/resources/gawk/mtchi18n.ok b/src/it/resources/gawk/mtchi18n.ok similarity index 100% rename from src/test/resources/gawk/mtchi18n.ok rename to src/it/resources/gawk/mtchi18n.ok diff --git a/src/test/resources/gawk/muldimposix.awk b/src/it/resources/gawk/muldimposix.awk similarity index 100% rename from src/test/resources/gawk/muldimposix.awk rename to src/it/resources/gawk/muldimposix.awk diff --git a/src/test/resources/gawk/muldimposix.ok b/src/it/resources/gawk/muldimposix.ok similarity index 100% rename from src/test/resources/gawk/muldimposix.ok rename to src/it/resources/gawk/muldimposix.ok diff --git a/src/test/resources/gawk/nasty.awk b/src/it/resources/gawk/nasty.awk similarity index 100% rename from src/test/resources/gawk/nasty.awk rename to src/it/resources/gawk/nasty.awk diff --git a/src/test/resources/gawk/nasty.ok b/src/it/resources/gawk/nasty.ok similarity index 100% rename from src/test/resources/gawk/nasty.ok rename to src/it/resources/gawk/nasty.ok diff --git a/src/test/resources/gawk/nasty2.awk b/src/it/resources/gawk/nasty2.awk similarity index 100% rename from src/test/resources/gawk/nasty2.awk rename to src/it/resources/gawk/nasty2.awk diff --git a/src/test/resources/gawk/nasty2.ok b/src/it/resources/gawk/nasty2.ok similarity index 100% rename from src/test/resources/gawk/nasty2.ok rename to src/it/resources/gawk/nasty2.ok diff --git a/src/test/resources/gawk/nastyparm.awk b/src/it/resources/gawk/nastyparm.awk similarity index 100% rename from src/test/resources/gawk/nastyparm.awk rename to src/it/resources/gawk/nastyparm.awk diff --git a/src/test/resources/gawk/nastyparm.ok b/src/it/resources/gawk/nastyparm.ok similarity index 100% rename from src/test/resources/gawk/nastyparm.ok rename to src/it/resources/gawk/nastyparm.ok diff --git a/src/test/resources/gawk/negexp.awk b/src/it/resources/gawk/negexp.awk similarity index 100% rename from src/test/resources/gawk/negexp.awk rename to src/it/resources/gawk/negexp.awk diff --git a/src/test/resources/gawk/negexp.ok b/src/it/resources/gawk/negexp.ok similarity index 100% rename from src/test/resources/gawk/negexp.ok rename to src/it/resources/gawk/negexp.ok diff --git a/src/test/resources/gawk/negrange.awk b/src/it/resources/gawk/negrange.awk similarity index 100% rename from src/test/resources/gawk/negrange.awk rename to src/it/resources/gawk/negrange.awk diff --git a/src/test/resources/gawk/negrange.ok b/src/it/resources/gawk/negrange.ok similarity index 100% rename from src/test/resources/gawk/negrange.ok rename to src/it/resources/gawk/negrange.ok diff --git a/src/test/resources/gawk/negtime.awk b/src/it/resources/gawk/negtime.awk similarity index 100% rename from src/test/resources/gawk/negtime.awk rename to src/it/resources/gawk/negtime.awk diff --git a/src/test/resources/gawk/negtime.ok b/src/it/resources/gawk/negtime.ok similarity index 100% rename from src/test/resources/gawk/negtime.ok rename to src/it/resources/gawk/negtime.ok diff --git a/src/test/resources/gawk/nested.awk b/src/it/resources/gawk/nested.awk similarity index 100% rename from src/test/resources/gawk/nested.awk rename to src/it/resources/gawk/nested.awk diff --git a/src/test/resources/gawk/nested.in b/src/it/resources/gawk/nested.in similarity index 100% rename from src/test/resources/gawk/nested.in rename to src/it/resources/gawk/nested.in diff --git a/src/test/resources/gawk/nested.ok b/src/it/resources/gawk/nested.ok similarity index 100% rename from src/test/resources/gawk/nested.ok rename to src/it/resources/gawk/nested.ok diff --git a/src/test/resources/gawk/next.ok b/src/it/resources/gawk/next.ok similarity index 100% rename from src/test/resources/gawk/next.ok rename to src/it/resources/gawk/next.ok diff --git a/src/test/resources/gawk/next.sh b/src/it/resources/gawk/next.sh similarity index 100% rename from src/test/resources/gawk/next.sh rename to src/it/resources/gawk/next.sh diff --git a/src/test/resources/gawk/nfldstr.awk b/src/it/resources/gawk/nfldstr.awk similarity index 100% rename from src/test/resources/gawk/nfldstr.awk rename to src/it/resources/gawk/nfldstr.awk diff --git a/src/test/resources/gawk/nfldstr.in b/src/it/resources/gawk/nfldstr.in similarity index 100% rename from src/test/resources/gawk/nfldstr.in rename to src/it/resources/gawk/nfldstr.in diff --git a/src/test/resources/gawk/noloop1.ok b/src/it/resources/gawk/nfldstr.ok similarity index 100% rename from src/test/resources/gawk/noloop1.ok rename to src/it/resources/gawk/nfldstr.ok diff --git a/src/test/resources/gawk/nfloop.awk b/src/it/resources/gawk/nfloop.awk similarity index 100% rename from src/test/resources/gawk/nfloop.awk rename to src/it/resources/gawk/nfloop.awk diff --git a/src/test/resources/gawk/nfloop.ok b/src/it/resources/gawk/nfloop.ok similarity index 100% rename from src/test/resources/gawk/nfloop.ok rename to src/it/resources/gawk/nfloop.ok diff --git a/src/test/resources/gawk/nfneg.awk b/src/it/resources/gawk/nfneg.awk similarity index 100% rename from src/test/resources/gawk/nfneg.awk rename to src/it/resources/gawk/nfneg.awk diff --git a/src/test/resources/gawk/nfneg.ok b/src/it/resources/gawk/nfneg.ok similarity index 100% rename from src/test/resources/gawk/nfneg.ok rename to src/it/resources/gawk/nfneg.ok diff --git a/src/test/resources/gawk/nfset.awk b/src/it/resources/gawk/nfset.awk similarity index 100% rename from src/test/resources/gawk/nfset.awk rename to src/it/resources/gawk/nfset.awk diff --git a/src/test/resources/gawk/nfset.in b/src/it/resources/gawk/nfset.in similarity index 100% rename from src/test/resources/gawk/nfset.in rename to src/it/resources/gawk/nfset.in diff --git a/src/test/resources/gawk/nfset.ok b/src/it/resources/gawk/nfset.ok similarity index 100% rename from src/test/resources/gawk/nfset.ok rename to src/it/resources/gawk/nfset.ok diff --git a/src/test/resources/gawk/nlfldsep.awk b/src/it/resources/gawk/nlfldsep.awk similarity index 100% rename from src/test/resources/gawk/nlfldsep.awk rename to src/it/resources/gawk/nlfldsep.awk diff --git a/src/test/resources/gawk/nlfldsep.in b/src/it/resources/gawk/nlfldsep.in similarity index 100% rename from src/test/resources/gawk/nlfldsep.in rename to src/it/resources/gawk/nlfldsep.in diff --git a/src/test/resources/gawk/nlfldsep.ok b/src/it/resources/gawk/nlfldsep.ok similarity index 100% rename from src/test/resources/gawk/nlfldsep.ok rename to src/it/resources/gawk/nlfldsep.ok diff --git a/src/test/resources/gawk/nlinstr.awk b/src/it/resources/gawk/nlinstr.awk similarity index 100% rename from src/test/resources/gawk/nlinstr.awk rename to src/it/resources/gawk/nlinstr.awk diff --git a/src/test/resources/gawk/nlinstr.in b/src/it/resources/gawk/nlinstr.in similarity index 100% rename from src/test/resources/gawk/nlinstr.in rename to src/it/resources/gawk/nlinstr.in diff --git a/src/test/resources/gawk/nlinstr.ok b/src/it/resources/gawk/nlinstr.ok similarity index 100% rename from src/test/resources/gawk/nlinstr.ok rename to src/it/resources/gawk/nlinstr.ok diff --git a/src/test/resources/gawk/nlstrina.awk b/src/it/resources/gawk/nlstrina.awk similarity index 100% rename from src/test/resources/gawk/nlstrina.awk rename to src/it/resources/gawk/nlstrina.awk diff --git a/src/test/resources/gawk/nlstrina.ok b/src/it/resources/gawk/nlstrina.ok similarity index 100% rename from src/test/resources/gawk/nlstrina.ok rename to src/it/resources/gawk/nlstrina.ok diff --git a/src/test/resources/gawk/nlstringtest-nogettext.ok b/src/it/resources/gawk/nlstringtest-nogettext.ok similarity index 100% rename from src/test/resources/gawk/nlstringtest-nogettext.ok rename to src/it/resources/gawk/nlstringtest-nogettext.ok diff --git a/src/test/resources/gawk/nlstringtest.awk b/src/it/resources/gawk/nlstringtest.awk similarity index 100% rename from src/test/resources/gawk/nlstringtest.awk rename to src/it/resources/gawk/nlstringtest.awk diff --git a/src/test/resources/gawk/nlstringtest.ok b/src/it/resources/gawk/nlstringtest.ok similarity index 100% rename from src/test/resources/gawk/nlstringtest.ok rename to src/it/resources/gawk/nlstringtest.ok diff --git a/src/test/resources/gawk/nlstringtest.po b/src/it/resources/gawk/nlstringtest.po similarity index 100% rename from src/test/resources/gawk/nlstringtest.po rename to src/it/resources/gawk/nlstringtest.po diff --git a/src/test/resources/gawk/noeffect.awk b/src/it/resources/gawk/noeffect.awk similarity index 100% rename from src/test/resources/gawk/noeffect.awk rename to src/it/resources/gawk/noeffect.awk diff --git a/src/test/resources/gawk/noeffect.ok b/src/it/resources/gawk/noeffect.ok similarity index 100% rename from src/test/resources/gawk/noeffect.ok rename to src/it/resources/gawk/noeffect.ok diff --git a/src/test/resources/gawk/nofile.ok b/src/it/resources/gawk/nofile.ok similarity index 100% rename from src/test/resources/gawk/nofile.ok rename to src/it/resources/gawk/nofile.ok diff --git a/src/test/resources/gawk/nofmtch.awk b/src/it/resources/gawk/nofmtch.awk similarity index 100% rename from src/test/resources/gawk/nofmtch.awk rename to src/it/resources/gawk/nofmtch.awk diff --git a/src/test/resources/gawk/nofmtch.ok b/src/it/resources/gawk/nofmtch.ok similarity index 100% rename from src/test/resources/gawk/nofmtch.ok rename to src/it/resources/gawk/nofmtch.ok diff --git a/src/test/resources/gawk/noloop1.awk b/src/it/resources/gawk/noloop1.awk similarity index 100% rename from src/test/resources/gawk/noloop1.awk rename to src/it/resources/gawk/noloop1.awk diff --git a/src/test/resources/gawk/noloop1.in b/src/it/resources/gawk/noloop1.in similarity index 100% rename from src/test/resources/gawk/noloop1.in rename to src/it/resources/gawk/noloop1.in diff --git a/src/test/resources/gawk/noloop2.ok b/src/it/resources/gawk/noloop1.ok similarity index 100% rename from src/test/resources/gawk/noloop2.ok rename to src/it/resources/gawk/noloop1.ok diff --git a/src/test/resources/gawk/noloop2.awk b/src/it/resources/gawk/noloop2.awk similarity index 100% rename from src/test/resources/gawk/noloop2.awk rename to src/it/resources/gawk/noloop2.awk diff --git a/src/test/resources/gawk/noloop2.in b/src/it/resources/gawk/noloop2.in similarity index 100% rename from src/test/resources/gawk/noloop2.in rename to src/it/resources/gawk/noloop2.in diff --git a/src/test/resources/gawk/nsawk1a.ok b/src/it/resources/gawk/noloop2.ok similarity index 100% rename from src/test/resources/gawk/nsawk1a.ok rename to src/it/resources/gawk/noloop2.ok diff --git a/src/test/resources/gawk/nondec.awk b/src/it/resources/gawk/nondec.awk similarity index 100% rename from src/test/resources/gawk/nondec.awk rename to src/it/resources/gawk/nondec.awk diff --git a/src/test/resources/gawk/nondec.ok b/src/it/resources/gawk/nondec.ok similarity index 100% rename from src/test/resources/gawk/nondec.ok rename to src/it/resources/gawk/nondec.ok diff --git a/src/test/resources/gawk/nondec2.awk b/src/it/resources/gawk/nondec2.awk similarity index 100% rename from src/test/resources/gawk/nondec2.awk rename to src/it/resources/gawk/nondec2.awk diff --git a/src/test/resources/gawk/nondec2.ok b/src/it/resources/gawk/nondec2.ok similarity index 100% rename from src/test/resources/gawk/nondec2.ok rename to src/it/resources/gawk/nondec2.ok diff --git a/src/test/resources/gawk/nonfatal1.awk b/src/it/resources/gawk/nonfatal1.awk similarity index 100% rename from src/test/resources/gawk/nonfatal1.awk rename to src/it/resources/gawk/nonfatal1.awk diff --git a/src/test/resources/gawk/nonfatal1.ok b/src/it/resources/gawk/nonfatal1.ok similarity index 100% rename from src/test/resources/gawk/nonfatal1.ok rename to src/it/resources/gawk/nonfatal1.ok diff --git a/src/test/resources/gawk/nonfatal2.awk b/src/it/resources/gawk/nonfatal2.awk similarity index 100% rename from src/test/resources/gawk/nonfatal2.awk rename to src/it/resources/gawk/nonfatal2.awk diff --git a/src/test/resources/gawk/nonfatal2.ok b/src/it/resources/gawk/nonfatal2.ok similarity index 100% rename from src/test/resources/gawk/nonfatal2.ok rename to src/it/resources/gawk/nonfatal2.ok diff --git a/src/test/resources/gawk/nonfatal3.awk b/src/it/resources/gawk/nonfatal3.awk similarity index 100% rename from src/test/resources/gawk/nonfatal3.awk rename to src/it/resources/gawk/nonfatal3.awk diff --git a/src/test/resources/gawk/nonfatal3.ok b/src/it/resources/gawk/nonfatal3.ok similarity index 100% rename from src/test/resources/gawk/nonfatal3.ok rename to src/it/resources/gawk/nonfatal3.ok diff --git a/src/test/resources/gawk/nonl.awk b/src/it/resources/gawk/nonl.awk similarity index 100% rename from src/test/resources/gawk/nonl.awk rename to src/it/resources/gawk/nonl.awk diff --git a/src/test/resources/gawk/nonl.in b/src/it/resources/gawk/nonl.in similarity index 100% rename from src/test/resources/gawk/nonl.in rename to src/it/resources/gawk/nonl.in diff --git a/src/test/resources/gawk/nonl.ok b/src/it/resources/gawk/nonl.ok similarity index 100% rename from src/test/resources/gawk/nonl.ok rename to src/it/resources/gawk/nonl.ok diff --git a/src/test/resources/gawk/noparms.awk b/src/it/resources/gawk/noparms.awk similarity index 100% rename from src/test/resources/gawk/noparms.awk rename to src/it/resources/gawk/noparms.awk diff --git a/src/test/resources/gawk/noparms.ok b/src/it/resources/gawk/noparms.ok similarity index 100% rename from src/test/resources/gawk/noparms.ok rename to src/it/resources/gawk/noparms.ok diff --git a/src/test/resources/gawk/nors.in b/src/it/resources/gawk/nors.in similarity index 100% rename from src/test/resources/gawk/nors.in rename to src/it/resources/gawk/nors.in diff --git a/src/test/resources/gawk/nors.ok b/src/it/resources/gawk/nors.ok similarity index 100% rename from src/test/resources/gawk/nors.ok rename to src/it/resources/gawk/nors.ok diff --git a/src/test/resources/gawk/nsawk1.awk b/src/it/resources/gawk/nsawk1.awk similarity index 100% rename from src/test/resources/gawk/nsawk1.awk rename to src/it/resources/gawk/nsawk1.awk diff --git a/src/test/resources/gawk/nsawk1b.ok b/src/it/resources/gawk/nsawk1a.ok similarity index 100% rename from src/test/resources/gawk/nsawk1b.ok rename to src/it/resources/gawk/nsawk1a.ok diff --git a/src/test/resources/gawk/nsawk1c.ok b/src/it/resources/gawk/nsawk1b.ok similarity index 100% rename from src/test/resources/gawk/nsawk1c.ok rename to src/it/resources/gawk/nsawk1b.ok diff --git a/src/test/resources/gawk/onlynl.ok b/src/it/resources/gawk/nsawk1c.ok similarity index 100% rename from src/test/resources/gawk/onlynl.ok rename to src/it/resources/gawk/nsawk1c.ok diff --git a/src/test/resources/gawk/nsawk2.awk b/src/it/resources/gawk/nsawk2.awk similarity index 100% rename from src/test/resources/gawk/nsawk2.awk rename to src/it/resources/gawk/nsawk2.awk diff --git a/src/test/resources/gawk/nsawk2a.ok b/src/it/resources/gawk/nsawk2a.ok similarity index 100% rename from src/test/resources/gawk/nsawk2a.ok rename to src/it/resources/gawk/nsawk2a.ok diff --git a/src/test/resources/gawk/nsawk2b.ok b/src/it/resources/gawk/nsawk2b.ok similarity index 100% rename from src/test/resources/gawk/nsawk2b.ok rename to src/it/resources/gawk/nsawk2b.ok diff --git a/src/test/resources/gawk/nsbad.awk b/src/it/resources/gawk/nsbad.awk similarity index 100% rename from src/test/resources/gawk/nsbad.awk rename to src/it/resources/gawk/nsbad.awk diff --git a/src/test/resources/gawk/nsbad.ok b/src/it/resources/gawk/nsbad.ok similarity index 100% rename from src/test/resources/gawk/nsbad.ok rename to src/it/resources/gawk/nsbad.ok diff --git a/src/test/resources/gawk/nsbad2.awk b/src/it/resources/gawk/nsbad2.awk similarity index 100% rename from src/test/resources/gawk/nsbad2.awk rename to src/it/resources/gawk/nsbad2.awk diff --git a/src/test/resources/gawk/nsbad2.ok b/src/it/resources/gawk/nsbad2.ok similarity index 100% rename from src/test/resources/gawk/nsbad2.ok rename to src/it/resources/gawk/nsbad2.ok diff --git a/src/test/resources/gawk/nsbad3.awk b/src/it/resources/gawk/nsbad3.awk similarity index 100% rename from src/test/resources/gawk/nsbad3.awk rename to src/it/resources/gawk/nsbad3.awk diff --git a/src/test/resources/gawk/nsbad3.ok b/src/it/resources/gawk/nsbad3.ok similarity index 100% rename from src/test/resources/gawk/nsbad3.ok rename to src/it/resources/gawk/nsbad3.ok diff --git a/src/test/resources/gawk/nsbad_cmd.ok b/src/it/resources/gawk/nsbad_cmd.ok similarity index 100% rename from src/test/resources/gawk/nsbad_cmd.ok rename to src/it/resources/gawk/nsbad_cmd.ok diff --git a/src/test/resources/gawk/nsforloop.awk b/src/it/resources/gawk/nsforloop.awk similarity index 100% rename from src/test/resources/gawk/nsforloop.awk rename to src/it/resources/gawk/nsforloop.awk diff --git a/src/test/resources/gawk/nsforloop.ok b/src/it/resources/gawk/nsforloop.ok similarity index 100% rename from src/test/resources/gawk/nsforloop.ok rename to src/it/resources/gawk/nsforloop.ok diff --git a/src/test/resources/gawk/nsfuncrecurse.awk b/src/it/resources/gawk/nsfuncrecurse.awk similarity index 100% rename from src/test/resources/gawk/nsfuncrecurse.awk rename to src/it/resources/gawk/nsfuncrecurse.awk diff --git a/src/test/resources/gawk/nsfuncrecurse.ok b/src/it/resources/gawk/nsfuncrecurse.ok similarity index 100% rename from src/test/resources/gawk/nsfuncrecurse.ok rename to src/it/resources/gawk/nsfuncrecurse.ok diff --git a/src/test/resources/gawk/nsidentifier.awk b/src/it/resources/gawk/nsidentifier.awk similarity index 100% rename from src/test/resources/gawk/nsidentifier.awk rename to src/it/resources/gawk/nsidentifier.awk diff --git a/src/test/resources/gawk/nsidentifier.ok b/src/it/resources/gawk/nsidentifier.ok similarity index 100% rename from src/test/resources/gawk/nsidentifier.ok rename to src/it/resources/gawk/nsidentifier.ok diff --git a/src/test/resources/gawk/nsindirect1.awk b/src/it/resources/gawk/nsindirect1.awk similarity index 100% rename from src/test/resources/gawk/nsindirect1.awk rename to src/it/resources/gawk/nsindirect1.awk diff --git a/src/test/resources/gawk/nsindirect1.ok b/src/it/resources/gawk/nsindirect1.ok similarity index 100% rename from src/test/resources/gawk/nsindirect1.ok rename to src/it/resources/gawk/nsindirect1.ok diff --git a/src/test/resources/gawk/nsindirect2.awk b/src/it/resources/gawk/nsindirect2.awk similarity index 100% rename from src/test/resources/gawk/nsindirect2.awk rename to src/it/resources/gawk/nsindirect2.awk diff --git a/src/test/resources/gawk/nsindirect2.ok b/src/it/resources/gawk/nsindirect2.ok similarity index 100% rename from src/test/resources/gawk/nsindirect2.ok rename to src/it/resources/gawk/nsindirect2.ok diff --git a/src/test/resources/gawk/nsprof1.awk b/src/it/resources/gawk/nsprof1.awk similarity index 100% rename from src/test/resources/gawk/nsprof1.awk rename to src/it/resources/gawk/nsprof1.awk diff --git a/src/test/resources/gawk/nsprof1.ok b/src/it/resources/gawk/nsprof1.ok similarity index 100% rename from src/test/resources/gawk/nsprof1.ok rename to src/it/resources/gawk/nsprof1.ok diff --git a/src/test/resources/gawk/nsprof2.awk b/src/it/resources/gawk/nsprof2.awk similarity index 100% rename from src/test/resources/gawk/nsprof2.awk rename to src/it/resources/gawk/nsprof2.awk diff --git a/src/test/resources/gawk/nsprof2.ok b/src/it/resources/gawk/nsprof2.ok similarity index 100% rename from src/test/resources/gawk/nsprof2.ok rename to src/it/resources/gawk/nsprof2.ok diff --git a/src/test/resources/gawk/nulinsrc.awk b/src/it/resources/gawk/nulinsrc.awk similarity index 100% rename from src/test/resources/gawk/nulinsrc.awk rename to src/it/resources/gawk/nulinsrc.awk diff --git a/src/test/resources/gawk/nulinsrc.ok b/src/it/resources/gawk/nulinsrc.ok similarity index 100% rename from src/test/resources/gawk/nulinsrc.ok rename to src/it/resources/gawk/nulinsrc.ok diff --git a/src/test/resources/gawk/nulrsend.awk b/src/it/resources/gawk/nulrsend.awk similarity index 100% rename from src/test/resources/gawk/nulrsend.awk rename to src/it/resources/gawk/nulrsend.awk diff --git a/src/test/resources/gawk/nulrsend.in b/src/it/resources/gawk/nulrsend.in similarity index 100% rename from src/test/resources/gawk/nulrsend.in rename to src/it/resources/gawk/nulrsend.in diff --git a/src/test/resources/gawk/nulrsend.ok b/src/it/resources/gawk/nulrsend.ok similarity index 100% rename from src/test/resources/gawk/nulrsend.ok rename to src/it/resources/gawk/nulrsend.ok diff --git a/src/test/resources/gawk/numindex.awk b/src/it/resources/gawk/numindex.awk similarity index 100% rename from src/test/resources/gawk/numindex.awk rename to src/it/resources/gawk/numindex.awk diff --git a/src/test/resources/gawk/numindex.in b/src/it/resources/gawk/numindex.in similarity index 100% rename from src/test/resources/gawk/numindex.in rename to src/it/resources/gawk/numindex.in diff --git a/src/test/resources/gawk/numindex.ok b/src/it/resources/gawk/numindex.ok similarity index 100% rename from src/test/resources/gawk/numindex.ok rename to src/it/resources/gawk/numindex.ok diff --git a/src/test/resources/gawk/numrange-mpfr.ok b/src/it/resources/gawk/numrange-mpfr.ok similarity index 100% rename from src/test/resources/gawk/numrange-mpfr.ok rename to src/it/resources/gawk/numrange-mpfr.ok diff --git a/src/test/resources/gawk/numrange.awk b/src/it/resources/gawk/numrange.awk similarity index 100% rename from src/test/resources/gawk/numrange.awk rename to src/it/resources/gawk/numrange.awk diff --git a/src/test/resources/gawk/numrange.ok b/src/it/resources/gawk/numrange.ok similarity index 100% rename from src/test/resources/gawk/numrange.ok rename to src/it/resources/gawk/numrange.ok diff --git a/src/test/resources/gawk/numstr1.awk b/src/it/resources/gawk/numstr1.awk similarity index 100% rename from src/test/resources/gawk/numstr1.awk rename to src/it/resources/gawk/numstr1.awk diff --git a/src/test/resources/gawk/numstr1.ok b/src/it/resources/gawk/numstr1.ok similarity index 100% rename from src/test/resources/gawk/numstr1.ok rename to src/it/resources/gawk/numstr1.ok diff --git a/src/test/resources/gawk/numsubstr.awk b/src/it/resources/gawk/numsubstr.awk similarity index 100% rename from src/test/resources/gawk/numsubstr.awk rename to src/it/resources/gawk/numsubstr.awk diff --git a/src/test/resources/gawk/numsubstr.in b/src/it/resources/gawk/numsubstr.in similarity index 100% rename from src/test/resources/gawk/numsubstr.in rename to src/it/resources/gawk/numsubstr.in diff --git a/src/test/resources/gawk/numsubstr.ok b/src/it/resources/gawk/numsubstr.ok similarity index 100% rename from src/test/resources/gawk/numsubstr.ok rename to src/it/resources/gawk/numsubstr.ok diff --git a/src/test/resources/gawk/octdec.awk b/src/it/resources/gawk/octdec.awk similarity index 100% rename from src/test/resources/gawk/octdec.awk rename to src/it/resources/gawk/octdec.awk diff --git a/src/test/resources/gawk/octdec.ok b/src/it/resources/gawk/octdec.ok similarity index 100% rename from src/test/resources/gawk/octdec.ok rename to src/it/resources/gawk/octdec.ok diff --git a/src/test/resources/gawk/octsub.awk b/src/it/resources/gawk/octsub.awk similarity index 100% rename from src/test/resources/gawk/octsub.awk rename to src/it/resources/gawk/octsub.awk diff --git a/src/test/resources/gawk/octsub.ok b/src/it/resources/gawk/octsub.ok similarity index 100% rename from src/test/resources/gawk/octsub.ok rename to src/it/resources/gawk/octsub.ok diff --git a/src/test/resources/gawk/ofmt.awk b/src/it/resources/gawk/ofmt.awk similarity index 100% rename from src/test/resources/gawk/ofmt.awk rename to src/it/resources/gawk/ofmt.awk diff --git a/src/test/resources/gawk/ofmt.in b/src/it/resources/gawk/ofmt.in similarity index 100% rename from src/test/resources/gawk/ofmt.in rename to src/it/resources/gawk/ofmt.in diff --git a/src/test/resources/gawk/ofmt.ok b/src/it/resources/gawk/ofmt.ok similarity index 100% rename from src/test/resources/gawk/ofmt.ok rename to src/it/resources/gawk/ofmt.ok diff --git a/src/test/resources/gawk/ofmta.awk b/src/it/resources/gawk/ofmta.awk similarity index 100% rename from src/test/resources/gawk/ofmta.awk rename to src/it/resources/gawk/ofmta.awk diff --git a/src/test/resources/gawk/ofmta.ok b/src/it/resources/gawk/ofmta.ok similarity index 100% rename from src/test/resources/gawk/ofmta.ok rename to src/it/resources/gawk/ofmta.ok diff --git a/src/test/resources/gawk/ofmtbig.awk b/src/it/resources/gawk/ofmtbig.awk similarity index 100% rename from src/test/resources/gawk/ofmtbig.awk rename to src/it/resources/gawk/ofmtbig.awk diff --git a/src/test/resources/gawk/ofmtbig.in b/src/it/resources/gawk/ofmtbig.in similarity index 100% rename from src/test/resources/gawk/ofmtbig.in rename to src/it/resources/gawk/ofmtbig.in diff --git a/src/test/resources/gawk/ofmtbig.ok b/src/it/resources/gawk/ofmtbig.ok similarity index 100% rename from src/test/resources/gawk/ofmtbig.ok rename to src/it/resources/gawk/ofmtbig.ok diff --git a/src/test/resources/gawk/ofmtfidl.awk b/src/it/resources/gawk/ofmtfidl.awk similarity index 100% rename from src/test/resources/gawk/ofmtfidl.awk rename to src/it/resources/gawk/ofmtfidl.awk diff --git a/src/test/resources/gawk/ofmtfidl.in b/src/it/resources/gawk/ofmtfidl.in similarity index 100% rename from src/test/resources/gawk/ofmtfidl.in rename to src/it/resources/gawk/ofmtfidl.in diff --git a/src/test/resources/gawk/ofmtfidl.ok b/src/it/resources/gawk/ofmtfidl.ok similarity index 100% rename from src/test/resources/gawk/ofmtfidl.ok rename to src/it/resources/gawk/ofmtfidl.ok diff --git a/src/test/resources/gawk/ofmts.awk b/src/it/resources/gawk/ofmts.awk similarity index 100% rename from src/test/resources/gawk/ofmts.awk rename to src/it/resources/gawk/ofmts.awk diff --git a/src/test/resources/gawk/ofmts.in b/src/it/resources/gawk/ofmts.in similarity index 100% rename from src/test/resources/gawk/ofmts.in rename to src/it/resources/gawk/ofmts.in diff --git a/src/test/resources/gawk/ofmts.ok b/src/it/resources/gawk/ofmts.ok similarity index 100% rename from src/test/resources/gawk/ofmts.ok rename to src/it/resources/gawk/ofmts.ok diff --git a/src/test/resources/gawk/ofmtstrnum.awk b/src/it/resources/gawk/ofmtstrnum.awk similarity index 100% rename from src/test/resources/gawk/ofmtstrnum.awk rename to src/it/resources/gawk/ofmtstrnum.awk diff --git a/src/test/resources/gawk/ofmtstrnum.ok b/src/it/resources/gawk/ofmtstrnum.ok similarity index 100% rename from src/test/resources/gawk/ofmtstrnum.ok rename to src/it/resources/gawk/ofmtstrnum.ok diff --git a/src/test/resources/gawk/ofs1.awk b/src/it/resources/gawk/ofs1.awk similarity index 100% rename from src/test/resources/gawk/ofs1.awk rename to src/it/resources/gawk/ofs1.awk diff --git a/src/test/resources/gawk/ofs1.in b/src/it/resources/gawk/ofs1.in similarity index 100% rename from src/test/resources/gawk/ofs1.in rename to src/it/resources/gawk/ofs1.in diff --git a/src/test/resources/gawk/ofs1.ok b/src/it/resources/gawk/ofs1.ok similarity index 100% rename from src/test/resources/gawk/ofs1.ok rename to src/it/resources/gawk/ofs1.ok diff --git a/src/test/resources/gawk/onlynl.awk b/src/it/resources/gawk/onlynl.awk similarity index 100% rename from src/test/resources/gawk/onlynl.awk rename to src/it/resources/gawk/onlynl.awk diff --git a/src/test/resources/gawk/onlynl.in b/src/it/resources/gawk/onlynl.in similarity index 100% rename from src/test/resources/gawk/onlynl.in rename to src/it/resources/gawk/onlynl.in diff --git a/src/test/resources/gawk/prmreuse.ok b/src/it/resources/gawk/onlynl.ok similarity index 100% rename from src/test/resources/gawk/prmreuse.ok rename to src/it/resources/gawk/onlynl.ok diff --git a/src/test/resources/gawk/opasnidx.awk b/src/it/resources/gawk/opasnidx.awk similarity index 100% rename from src/test/resources/gawk/opasnidx.awk rename to src/it/resources/gawk/opasnidx.awk diff --git a/src/test/resources/gawk/opasnidx.ok b/src/it/resources/gawk/opasnidx.ok similarity index 100% rename from src/test/resources/gawk/opasnidx.ok rename to src/it/resources/gawk/opasnidx.ok diff --git a/src/test/resources/gawk/opasnslf.awk b/src/it/resources/gawk/opasnslf.awk similarity index 100% rename from src/test/resources/gawk/opasnslf.awk rename to src/it/resources/gawk/opasnslf.awk diff --git a/src/test/resources/gawk/opasnslf.ok b/src/it/resources/gawk/opasnslf.ok similarity index 100% rename from src/test/resources/gawk/opasnslf.ok rename to src/it/resources/gawk/opasnslf.ok diff --git a/src/test/resources/gawk/ordchr.awk b/src/it/resources/gawk/ordchr.awk similarity index 100% rename from src/test/resources/gawk/ordchr.awk rename to src/it/resources/gawk/ordchr.awk diff --git a/src/test/resources/gawk/ordchr.ok b/src/it/resources/gawk/ordchr.ok similarity index 100% rename from src/test/resources/gawk/ordchr.ok rename to src/it/resources/gawk/ordchr.ok diff --git a/src/test/resources/gawk/ordchr2.ok b/src/it/resources/gawk/ordchr2.ok similarity index 100% rename from src/test/resources/gawk/ordchr2.ok rename to src/it/resources/gawk/ordchr2.ok diff --git a/src/test/resources/gawk/out1.ok b/src/it/resources/gawk/out1.ok similarity index 100% rename from src/test/resources/gawk/out1.ok rename to src/it/resources/gawk/out1.ok diff --git a/src/test/resources/gawk/out2.ok b/src/it/resources/gawk/out2.ok similarity index 100% rename from src/test/resources/gawk/out2.ok rename to src/it/resources/gawk/out2.ok diff --git a/src/test/resources/gawk/out3.ok b/src/it/resources/gawk/out3.ok similarity index 100% rename from src/test/resources/gawk/out3.ok rename to src/it/resources/gawk/out3.ok diff --git a/src/test/resources/gawk/paramasfunc1.awk b/src/it/resources/gawk/paramasfunc1.awk similarity index 100% rename from src/test/resources/gawk/paramasfunc1.awk rename to src/it/resources/gawk/paramasfunc1.awk diff --git a/src/test/resources/gawk/paramasfunc1.ok b/src/it/resources/gawk/paramasfunc1.ok similarity index 100% rename from src/test/resources/gawk/paramasfunc1.ok rename to src/it/resources/gawk/paramasfunc1.ok diff --git a/src/test/resources/gawk/paramasfunc2.awk b/src/it/resources/gawk/paramasfunc2.awk similarity index 100% rename from src/test/resources/gawk/paramasfunc2.awk rename to src/it/resources/gawk/paramasfunc2.awk diff --git a/src/test/resources/gawk/paramasfunc2.ok b/src/it/resources/gawk/paramasfunc2.ok similarity index 100% rename from src/test/resources/gawk/paramasfunc2.ok rename to src/it/resources/gawk/paramasfunc2.ok diff --git a/src/test/resources/gawk/paramdup.awk b/src/it/resources/gawk/paramdup.awk similarity index 100% rename from src/test/resources/gawk/paramdup.awk rename to src/it/resources/gawk/paramdup.awk diff --git a/src/test/resources/gawk/paramdup.ok b/src/it/resources/gawk/paramdup.ok similarity index 100% rename from src/test/resources/gawk/paramdup.ok rename to src/it/resources/gawk/paramdup.ok diff --git a/src/test/resources/gawk/paramres.awk b/src/it/resources/gawk/paramres.awk similarity index 100% rename from src/test/resources/gawk/paramres.awk rename to src/it/resources/gawk/paramres.awk diff --git a/src/test/resources/gawk/paramres.ok b/src/it/resources/gawk/paramres.ok similarity index 100% rename from src/test/resources/gawk/paramres.ok rename to src/it/resources/gawk/paramres.ok diff --git a/src/test/resources/gawk/paramtyp.awk b/src/it/resources/gawk/paramtyp.awk similarity index 100% rename from src/test/resources/gawk/paramtyp.awk rename to src/it/resources/gawk/paramtyp.awk diff --git a/src/test/resources/gawk/paramtyp.ok b/src/it/resources/gawk/paramtyp.ok similarity index 100% rename from src/test/resources/gawk/paramtyp.ok rename to src/it/resources/gawk/paramtyp.ok diff --git a/src/test/resources/gawk/paramuninitglobal.awk b/src/it/resources/gawk/paramuninitglobal.awk similarity index 100% rename from src/test/resources/gawk/paramuninitglobal.awk rename to src/it/resources/gawk/paramuninitglobal.awk diff --git a/src/test/resources/gawk/paramuninitglobal.ok b/src/it/resources/gawk/paramuninitglobal.ok similarity index 100% rename from src/test/resources/gawk/paramuninitglobal.ok rename to src/it/resources/gawk/paramuninitglobal.ok diff --git a/src/test/resources/gawk/parse1.awk b/src/it/resources/gawk/parse1.awk similarity index 100% rename from src/test/resources/gawk/parse1.awk rename to src/it/resources/gawk/parse1.awk diff --git a/src/test/resources/gawk/parse1.in b/src/it/resources/gawk/parse1.in similarity index 100% rename from src/test/resources/gawk/parse1.in rename to src/it/resources/gawk/parse1.in diff --git a/src/test/resources/gawk/parse1.ok b/src/it/resources/gawk/parse1.ok similarity index 100% rename from src/test/resources/gawk/parse1.ok rename to src/it/resources/gawk/parse1.ok diff --git a/src/test/resources/gawk/parsefld.awk b/src/it/resources/gawk/parsefld.awk similarity index 100% rename from src/test/resources/gawk/parsefld.awk rename to src/it/resources/gawk/parsefld.awk diff --git a/src/test/resources/gawk/parsefld.in b/src/it/resources/gawk/parsefld.in similarity index 100% rename from src/test/resources/gawk/parsefld.in rename to src/it/resources/gawk/parsefld.in diff --git a/src/test/resources/gawk/parsefld.ok b/src/it/resources/gawk/parsefld.ok similarity index 100% rename from src/test/resources/gawk/parsefld.ok rename to src/it/resources/gawk/parsefld.ok diff --git a/src/test/resources/gawk/parseme.awk b/src/it/resources/gawk/parseme.awk similarity index 100% rename from src/test/resources/gawk/parseme.awk rename to src/it/resources/gawk/parseme.awk diff --git a/src/test/resources/gawk/parseme.ok b/src/it/resources/gawk/parseme.ok similarity index 100% rename from src/test/resources/gawk/parseme.ok rename to src/it/resources/gawk/parseme.ok diff --git a/src/test/resources/gawk/patsplit.awk b/src/it/resources/gawk/patsplit.awk similarity index 100% rename from src/test/resources/gawk/patsplit.awk rename to src/it/resources/gawk/patsplit.awk diff --git a/src/test/resources/gawk/patsplit.ok b/src/it/resources/gawk/patsplit.ok similarity index 100% rename from src/test/resources/gawk/patsplit.ok rename to src/it/resources/gawk/patsplit.ok diff --git a/src/test/resources/gawk/pcntplus.awk b/src/it/resources/gawk/pcntplus.awk similarity index 100% rename from src/test/resources/gawk/pcntplus.awk rename to src/it/resources/gawk/pcntplus.awk diff --git a/src/test/resources/gawk/pcntplus.ok b/src/it/resources/gawk/pcntplus.ok similarity index 100% rename from src/test/resources/gawk/pcntplus.ok rename to src/it/resources/gawk/pcntplus.ok diff --git a/src/test/resources/gawk/pid.awk b/src/it/resources/gawk/pid.awk similarity index 100% rename from src/test/resources/gawk/pid.awk rename to src/it/resources/gawk/pid.awk diff --git a/src/test/resources/gawk/pid.ok b/src/it/resources/gawk/pid.ok similarity index 100% rename from src/test/resources/gawk/pid.ok rename to src/it/resources/gawk/pid.ok diff --git a/src/test/resources/gawk/pid.sh b/src/it/resources/gawk/pid.sh similarity index 100% rename from src/test/resources/gawk/pid.sh rename to src/it/resources/gawk/pid.sh diff --git a/src/test/resources/gawk/pipeio1.awk b/src/it/resources/gawk/pipeio1.awk similarity index 100% rename from src/test/resources/gawk/pipeio1.awk rename to src/it/resources/gawk/pipeio1.awk diff --git a/src/test/resources/gawk/pipeio1.ok b/src/it/resources/gawk/pipeio1.ok similarity index 100% rename from src/test/resources/gawk/pipeio1.ok rename to src/it/resources/gawk/pipeio1.ok diff --git a/src/test/resources/gawk/pipeio2.awk b/src/it/resources/gawk/pipeio2.awk similarity index 100% rename from src/test/resources/gawk/pipeio2.awk rename to src/it/resources/gawk/pipeio2.awk diff --git a/src/test/resources/gawk/pipeio2.in b/src/it/resources/gawk/pipeio2.in similarity index 100% rename from src/test/resources/gawk/pipeio2.in rename to src/it/resources/gawk/pipeio2.in diff --git a/src/test/resources/gawk/pipeio2.ok b/src/it/resources/gawk/pipeio2.ok similarity index 100% rename from src/test/resources/gawk/pipeio2.ok rename to src/it/resources/gawk/pipeio2.ok diff --git a/src/test/resources/gawk/pma.ok b/src/it/resources/gawk/pma.ok similarity index 100% rename from src/test/resources/gawk/pma.ok rename to src/it/resources/gawk/pma.ok diff --git a/src/test/resources/gawk/posix.awk b/src/it/resources/gawk/posix.awk similarity index 100% rename from src/test/resources/gawk/posix.awk rename to src/it/resources/gawk/posix.awk diff --git a/src/test/resources/gawk/posix.in b/src/it/resources/gawk/posix.in similarity index 100% rename from src/test/resources/gawk/posix.in rename to src/it/resources/gawk/posix.in diff --git a/src/test/resources/gawk/posix.ok b/src/it/resources/gawk/posix.ok similarity index 100% rename from src/test/resources/gawk/posix.ok rename to src/it/resources/gawk/posix.ok diff --git a/src/test/resources/gawk/posix2008sub.awk b/src/it/resources/gawk/posix2008sub.awk similarity index 100% rename from src/test/resources/gawk/posix2008sub.awk rename to src/it/resources/gawk/posix2008sub.awk diff --git a/src/test/resources/gawk/posix2008sub.ok b/src/it/resources/gawk/posix2008sub.ok similarity index 100% rename from src/test/resources/gawk/posix2008sub.ok rename to src/it/resources/gawk/posix2008sub.ok diff --git a/src/test/resources/gawk/posix_compare.awk b/src/it/resources/gawk/posix_compare.awk similarity index 100% rename from src/test/resources/gawk/posix_compare.awk rename to src/it/resources/gawk/posix_compare.awk diff --git a/src/test/resources/gawk/posix_compare.ok b/src/it/resources/gawk/posix_compare.ok similarity index 100% rename from src/test/resources/gawk/posix_compare.ok rename to src/it/resources/gawk/posix_compare.ok diff --git a/src/it/resources/gawk/poundbang.awk b/src/it/resources/gawk/poundbang.awk new file mode 100644 index 00000000..a6440fff --- /dev/null +++ b/src/it/resources/gawk/poundbang.awk @@ -0,0 +1,2 @@ +#! /tmp/gawk -f +{ print } diff --git a/src/test/resources/gawk/prdupval.awk b/src/it/resources/gawk/prdupval.awk similarity index 100% rename from src/test/resources/gawk/prdupval.awk rename to src/it/resources/gawk/prdupval.awk diff --git a/src/test/resources/gawk/prdupval.in b/src/it/resources/gawk/prdupval.in similarity index 100% rename from src/test/resources/gawk/prdupval.in rename to src/it/resources/gawk/prdupval.in diff --git a/src/test/resources/gawk/prdupval.ok b/src/it/resources/gawk/prdupval.ok similarity index 100% rename from src/test/resources/gawk/prdupval.ok rename to src/it/resources/gawk/prdupval.ok diff --git a/src/test/resources/gawk/prec.awk b/src/it/resources/gawk/prec.awk similarity index 100% rename from src/test/resources/gawk/prec.awk rename to src/it/resources/gawk/prec.awk diff --git a/src/test/resources/gawk/prec.ok b/src/it/resources/gawk/prec.ok similarity index 100% rename from src/test/resources/gawk/prec.ok rename to src/it/resources/gawk/prec.ok diff --git a/src/test/resources/gawk/printf0.awk b/src/it/resources/gawk/printf0.awk similarity index 100% rename from src/test/resources/gawk/printf0.awk rename to src/it/resources/gawk/printf0.awk diff --git a/src/test/resources/gawk/printf0.ok b/src/it/resources/gawk/printf0.ok similarity index 100% rename from src/test/resources/gawk/printf0.ok rename to src/it/resources/gawk/printf0.ok diff --git a/src/test/resources/gawk/printf1.awk b/src/it/resources/gawk/printf1.awk similarity index 100% rename from src/test/resources/gawk/printf1.awk rename to src/it/resources/gawk/printf1.awk diff --git a/src/test/resources/gawk/printf1.ok b/src/it/resources/gawk/printf1.ok similarity index 100% rename from src/test/resources/gawk/printf1.ok rename to src/it/resources/gawk/printf1.ok diff --git a/src/test/resources/gawk/printfbad1.awk b/src/it/resources/gawk/printfbad1.awk similarity index 100% rename from src/test/resources/gawk/printfbad1.awk rename to src/it/resources/gawk/printfbad1.awk diff --git a/src/test/resources/gawk/printfbad1.ok b/src/it/resources/gawk/printfbad1.ok similarity index 100% rename from src/test/resources/gawk/printfbad1.ok rename to src/it/resources/gawk/printfbad1.ok diff --git a/src/test/resources/gawk/printfbad2.awk b/src/it/resources/gawk/printfbad2.awk similarity index 100% rename from src/test/resources/gawk/printfbad2.awk rename to src/it/resources/gawk/printfbad2.awk diff --git a/src/test/resources/gawk/printfbad2.in b/src/it/resources/gawk/printfbad2.in similarity index 100% rename from src/test/resources/gawk/printfbad2.in rename to src/it/resources/gawk/printfbad2.in diff --git a/src/test/resources/gawk/printfbad2.ok b/src/it/resources/gawk/printfbad2.ok similarity index 100% rename from src/test/resources/gawk/printfbad2.ok rename to src/it/resources/gawk/printfbad2.ok diff --git a/src/test/resources/gawk/printfbad3.awk b/src/it/resources/gawk/printfbad3.awk similarity index 100% rename from src/test/resources/gawk/printfbad3.awk rename to src/it/resources/gawk/printfbad3.awk diff --git a/src/test/resources/gawk/printfbad3.ok b/src/it/resources/gawk/printfbad3.ok similarity index 100% rename from src/test/resources/gawk/printfbad3.ok rename to src/it/resources/gawk/printfbad3.ok diff --git a/src/test/resources/gawk/printfbad4.awk b/src/it/resources/gawk/printfbad4.awk similarity index 100% rename from src/test/resources/gawk/printfbad4.awk rename to src/it/resources/gawk/printfbad4.awk diff --git a/src/test/resources/gawk/printfbad4.ok b/src/it/resources/gawk/printfbad4.ok similarity index 100% rename from src/test/resources/gawk/printfbad4.ok rename to src/it/resources/gawk/printfbad4.ok diff --git a/src/test/resources/gawk/printfchar.awk b/src/it/resources/gawk/printfchar.awk similarity index 100% rename from src/test/resources/gawk/printfchar.awk rename to src/it/resources/gawk/printfchar.awk diff --git a/src/test/resources/gawk/printfchar.ok b/src/it/resources/gawk/printfchar.ok similarity index 100% rename from src/test/resources/gawk/printfchar.ok rename to src/it/resources/gawk/printfchar.ok diff --git a/src/test/resources/gawk/printfloat.awk b/src/it/resources/gawk/printfloat.awk similarity index 100% rename from src/test/resources/gawk/printfloat.awk rename to src/it/resources/gawk/printfloat.awk diff --git a/src/test/resources/gawk/printhuge.awk b/src/it/resources/gawk/printhuge.awk similarity index 100% rename from src/test/resources/gawk/printhuge.awk rename to src/it/resources/gawk/printhuge.awk diff --git a/src/test/resources/gawk/printhuge.ok b/src/it/resources/gawk/printhuge.ok similarity index 100% rename from src/test/resources/gawk/printhuge.ok rename to src/it/resources/gawk/printhuge.ok diff --git a/src/test/resources/gawk/printlang.awk b/src/it/resources/gawk/printlang.awk similarity index 100% rename from src/test/resources/gawk/printlang.awk rename to src/it/resources/gawk/printlang.awk diff --git a/src/test/resources/gawk/prmarscl.awk b/src/it/resources/gawk/prmarscl.awk similarity index 100% rename from src/test/resources/gawk/prmarscl.awk rename to src/it/resources/gawk/prmarscl.awk diff --git a/src/test/resources/gawk/prmarscl.ok b/src/it/resources/gawk/prmarscl.ok similarity index 100% rename from src/test/resources/gawk/prmarscl.ok rename to src/it/resources/gawk/prmarscl.ok diff --git a/src/test/resources/gawk/prmreuse.awk b/src/it/resources/gawk/prmreuse.awk similarity index 100% rename from src/test/resources/gawk/prmreuse.awk rename to src/it/resources/gawk/prmreuse.awk diff --git a/src/test/resources/gawk/regexpbrack.in b/src/it/resources/gawk/prmreuse.ok similarity index 100% rename from src/test/resources/gawk/regexpbrack.in rename to src/it/resources/gawk/prmreuse.ok diff --git a/src/test/resources/gawk/procinfs.awk b/src/it/resources/gawk/procinfs.awk similarity index 100% rename from src/test/resources/gawk/procinfs.awk rename to src/it/resources/gawk/procinfs.awk diff --git a/src/test/resources/gawk/procinfs.ok b/src/it/resources/gawk/procinfs.ok similarity index 100% rename from src/test/resources/gawk/procinfs.ok rename to src/it/resources/gawk/procinfs.ok diff --git a/src/it/resources/gawk/profile0.awk b/src/it/resources/gawk/profile0.awk new file mode 100644 index 00000000..a42e94df --- /dev/null +++ b/src/it/resources/gawk/profile0.awk @@ -0,0 +1 @@ +NR == 1 diff --git a/src/it/resources/gawk/profile0.in b/src/it/resources/gawk/profile0.in new file mode 100644 index 00000000..7bba8c8e --- /dev/null +++ b/src/it/resources/gawk/profile0.in @@ -0,0 +1,2 @@ +line 1 +line 2 diff --git a/src/it/resources/gawk/profile0.ok b/src/it/resources/gawk/profile0.ok new file mode 100644 index 00000000..42c464ba --- /dev/null +++ b/src/it/resources/gawk/profile0.ok @@ -0,0 +1,6 @@ + # Rule(s) + + 2 NR == 1 { # 1 + 1 print + } + diff --git a/src/it/resources/gawk/profile10.awk b/src/it/resources/gawk/profile10.awk new file mode 100644 index 00000000..b78ae447 --- /dev/null +++ b/src/it/resources/gawk/profile10.awk @@ -0,0 +1,42 @@ +BEGIN { # Comment 0 + if (1) { # Comment 1 + print "ABC" # Comment2 + } else { # Comment 3 + print "XYZ" # Comment 4 + } # Comment 5 + + while (c == d) { # Comment 6 + print "DEF" # Comment 7 + } # Comment 8 + + do { # Comment 9 + print "GHI" # Comment 10 + } while (e == f) # Comment 11 + + for (i in data) { # Comment 12 + print "JKL" # Comment 13 + } # Comment 14 + + for (z = 1; z <= 10; z++) { # Comment 15 + print "MNO" # Comment 16 + } # Comment 17 + + switch (q) { # Comment 18 + case "a": # Comment 19 + case "b": + # Comment 20 + break # Comment 21 + default: # Comment 22 + break # Comment 23 + } # Comment 24 + + if (1) { + print "foo" + } # Comment 25 + + if (2) { + print "bar" + } + # Comment 26 +} +# Comment 27 diff --git a/src/it/resources/gawk/profile10.ok b/src/it/resources/gawk/profile10.ok new file mode 100644 index 00000000..09b6d238 --- /dev/null +++ b/src/it/resources/gawk/profile10.ok @@ -0,0 +1,37 @@ +BEGIN { # Comment 0 + if (1) { # Comment 1 + print "ABC" # Comment2 + } else { # Comment 3 + print "XYZ" # Comment 4 + } # Comment 5 + while (c == d) { # Comment 6 + print "DEF" # Comment 7 + } # Comment 8 + do { # Comment 9 + print "GHI" # Comment 10 + } while (e == f) # Comment 11 + for (i in data) { # Comment 12 + print "JKL" # Comment 13 + } # Comment 14 + for (z = 1; z <= 10; z++) { # Comment 15 + print "MNO" # Comment 16 + } # Comment 17 + switch (q) { # Comment 18 + case "a": # Comment 19 + case "b": + # Comment 20 + break # Comment 21 + default: # Comment 22 + break # Comment 23 + } + # Comment 24 + if (1) { + print "foo" + } # Comment 25 + if (2) { + print "bar" + } + # Comment 26 +} + +# Comment 27 diff --git a/src/it/resources/gawk/profile11.awk b/src/it/resources/gawk/profile11.awk new file mode 100644 index 00000000..06ede8ac --- /dev/null +++ b/src/it/resources/gawk/profile11.awk @@ -0,0 +1,321 @@ + +# comments/for.awk +BEGIN { + for (i = 1; i <= 10; i++) print i + + for (i = 1; i <= 10; i++) # comment 0 + print i + + for (i = 1; # comment 1a + i <= 10; i++) print i + + for (i = 1; i <= 10; # comment 2a + i++) print i + + for (i = 1; # comment 1b + i <= 10; # comment 2b + i++) print i + + for (i = 1; # comment 1c + i <= 10; # comment 2c + i++) # comment 3c + print i +} + +# comments/for0.awk +BEGIN { + for (iggy in foo) # comment 5 + # comment 6 + ; +} + +# comments/for1.awk +BEGIN { + for (iggy in foo) # comment 1 + # comment 2 + { + print iggy + } + + for (iggy in foo) # comment 3 + # comment 4 + print iggy + + for (iggy in foo) # comment 5 + # comment 6 + ; +} + +# comments/for2.awk +BEGIN { + for (;;) print i + + for (;;) # comment 0 + print i + + for (; # comment 1a + ;) print i + + for (; ; # comment 2a + ) print i + + for (; # comment 1b + ; # comment 2b + ) print i + + for (; # comment 1c + ; # comment 2c + ) # comment 3c + print i +} + +# comments/for_del.awk +BEGIN { for (iggy in foo) delete foo[iggy] } + +# comments/do.awk +BEGIN { + do # DO comment + { # LBRACE comment + # block comment + print 42 + } # rbrace comment + while (0) # WHILE comment +} + +# comments/do2.awk +BEGIN { + do # DO comment + { # LBRACE comment + # block comment + print 42 + } # rbrace comment + while (0) +} + +# comments2/do.awk +BEGIN { + do # do comment + { # lbrace comment + # block comment + print 42 + } # rbace EOL comment + # rbrace block comment + while (1) # while comment +} + +# comments2/if.awk +BEGIN { + if (a) # IF comment + print "foo" # print comment + + if (a) # IF comment 2 + { # lbrace comment + print "bar" + } + else # ELSE comment + print "baz" +} + +# comments/if0.awk +BEGIN { + if (a) + ; # nothing + else + print "b" +} + +# comments/switch.awk +BEGIN { + a = 5 + switch (a) # switch EOL comment + # switch block comment + { # lbrace EOL comment + # lbrace block comment + case 5: # comment after case + print "five!" + break + # block comment after case + default: # comment after default + print "default" # print comment + break + } # rbrace EOL comment + # rbrace block comment +} + +# comments2/switch.awk +BEGIN { + a = 5 + switch (a) # switch EOL comment + # switch block comment + { # lbrace EOL comment + # lbrace block comment + case 5: + print "five!" + break; + # block comment after case + } # rbrace EOL comment + # rbrace block comment +} + +# comments2/switch0.awk +BEGIN { + a = 5 + switch (a) + { + case 5: # case comment + print "five!" + break + default: # default comment + print "default" + break + } +} + +# comments2/switch1.awk +BEGIN { + a = 5 + switch (a) + { + case 5: + # case comment + print "five!" + break + default: # default comment + print "default" + break + } +} + +# comments2/while.awk +BEGIN { + while (1) # while comment + { # lbrace comment + # block comment + print 42 + } +} + +# comments2/while2.awk +BEGIN { + while (1) # while comment + { # lbrace comment + # block comment + } +} + +# comments2/f.awk +function bar(p1, + p2) +{ + print "foo" +} # rbrace eol bar + # rbrace block bar + +# comments2/function.awk +function baz(p1, # comment + p2) + # comment before braces +{ # lbrace eol + # lbrace block + print "foo" +} # rbrace eol baz + # rbrace block baz + +# comments/function.awk +function funny(param1, # param comment 1 + param2, param3, # param comment 2 + param4) + # Comment between header and body +{ # lbrace EOL comment + # lbrace block comment + print "funny" +} # rbrace EOL comment funny + # rbrace block comment funny + +# comments/function2.awk +function funnyhaha(param1, + param2, param3, + param4) +{ # lbrace EOL comment + # lbrace block comment + print "funny" +} # rbrace EOL comment funnyhaha + # rbrace block comment funnyhaha + +# comments/callcoma.awk +function callme(a, b, c) +{ + printf("a = %s, b = %s, c = %s\n", # format comment + a, # a2 comment + b, # b2 comment + c) +} + +BEGIN { + callme(1, # 1 comment + 2, # 2 comment + 3) +} + +# comments/exp.awk +/foo/, # range comment + # range comment 2 + +# range comment b + +# range comment c +/bar/ { print } + +# comments/load.awk +@load "filefuncs" # get file functions + +BEGIN { + stat("/etc/passwd", data) + for (i in data) + print i, data[i] +} + +# comments/andor.awk +BEGIN { + if (a && # and comment + b || # or comment + c) + print "foo" +} + +# comments/qmcol-qm.awk +BEGIN { + a = 1 ? # qm comment + 2 : + 3 + print a +} + +# comments/qmcol-colon.awk +BEGIN { + a = 1 ? + 2 : # colon comment + 3 + print a +} + +# comments/qmcolboth.awk +BEGIN { + a = 1 ? # qm comment + 2 : # colon comment + 3 + print a +} + +# test beginning of line block comments (com2.awk) +BEGIN { + print "hi" # comment 1 +# comment 2 + print "there" + + if (foo) { + print "hello" # comment 3 +# comment 4 + print "world" + } +} diff --git a/src/it/resources/gawk/profile11.ok b/src/it/resources/gawk/profile11.ok new file mode 100644 index 00000000..be6ed526 --- /dev/null +++ b/src/it/resources/gawk/profile11.ok @@ -0,0 +1,362 @@ +@load "filefuncs" # get file functions + +# comments/for.awk +BEGIN { + for (i = 1; i <= 10; i++) { + print i + } + for (i = 1; i <= 10; i++) { # comment 0 + print i + } + for (i = 1; # comment 1a + i <= 10; i++) { + print i + } + for (i = 1; i <= 10; # comment 2a + i++) { + print i + } + for (i = 1; # comment 1b + i <= 10; # comment 2b + i++) { + print i + } + for (i = 1; # comment 1c + i <= 10; # comment 2c + i++) { # comment 3c + print i + } +} + +# comments/for0.awk +BEGIN { + for (iggy in foo) { + # comment 5 + + # comment 6 + } +} + +# comments/for1.awk +BEGIN { + for (iggy in foo) { + # comment 1 + + # comment 2 + print iggy + } + for (iggy in foo) { + # comment 3 + + # comment 4 + print iggy + } + for (iggy in foo) { + # comment 5 + + # comment 6 + } +} + +# comments/for2.awk +BEGIN { + for (;;) { + print i + } + for (;;) { # comment 0 + print i + } + for (; # comment 1a + ; ) { + print i + } + for (; ; # comment 2a + ) { + print i + } + for (; # comment 1b + ; # comment 2b + ) { + print i + } + for (; # comment 1c + ; # comment 2c + ) { # comment 3c + print i + } +} + +# comments/for_del.awk +BEGIN { + for (iggy in foo) { + delete foo[iggy] + } +} + +# comments/do.awk +BEGIN { + do { # DO comment + # LBRACE comment + # block comment + print 42 + } while (0) # WHILE comment + # rbrace comment +} + +# comments/do2.awk +BEGIN { + do { # DO comment + # LBRACE comment + # block comment + print 42 + } while (0) # rbrace comment +} + +# comments2/do.awk +BEGIN { + do { # do comment + # lbrace comment + # block comment + print 42 + } while (1) # while comment + # rbace EOL comment + # rbrace block comment +} + +# comments2/if.awk +BEGIN { + if (a) { + # IF comment + print "foo" # print comment + } + if (a) { # lbrace comment + # IF comment 2 + print "bar" + } else { + # ELSE comment + print "baz" + } +} + +# comments/if0.awk +BEGIN { + if (a) { + # nothing + } else { + print "b" + } +} + +# comments/switch.awk +BEGIN { + a = 5 + switch (a) { # switch EOL comment + + # switch block comment + # lbrace EOL comment + + # lbrace block comment + case 5: # comment after case + print "five!" + break + # block comment after case + default: # comment after default + print "default" # print comment + break + } + # rbrace EOL comment + # rbrace block comment +} + +# comments2/switch.awk +BEGIN { + a = 5 + switch (a) { # switch EOL comment + + # switch block comment + # lbrace EOL comment + + # lbrace block comment + case 5: + print "five!" + break + # block comment after case + } + # rbrace EOL comment + # rbrace block comment +} + +# comments2/switch0.awk +BEGIN { + a = 5 + switch (a) { + case 5: # case comment + print "five!" + break + default: # default comment + print "default" + break + } +} + +# comments2/switch1.awk +BEGIN { + a = 5 + switch (a) { + case 5: + # case comment + print "five!" + break + default: # default comment + print "default" + break + } +} + +# comments2/while.awk +BEGIN { + while (1) { + # while comment + # lbrace comment + # block comment + print 42 + } +} + +# comments2/while2.awk +BEGIN { + while (1) { + # while comment + # lbrace comment + # block comment + } +} + +BEGIN { + callme(1, # 1 comment + 2, # 2 comment + 3) +} + +# comments/load.awk +BEGIN { + stat("/etc/passwd", data) + for (i in data) { + print i, data[i] + } +} + +# comments/andor.awk +BEGIN { + if (a && # and comment + b || # or comment + c) { + print "foo" + } +} + +# comments/qmcol-qm.awk +BEGIN { + a = 1 ? # qm comment + 2 : 3 + print a +} + +# comments/qmcol-colon.awk +BEGIN { + a = 1 ? 2 : # colon comment + 3 + print a +} + +# comments/qmcolboth.awk +BEGIN { + a = 1 ? # qm comment + 2 : # colon comment + 3 + print a +} + +# test beginning of line block comments (com2.awk) +BEGIN { + print "hi" # comment 1 + # comment 2 + print "there" + if (foo) { + print "hello" # comment 3 + # comment 4 + print "world" + } +} + +# comments/exp.awk +# range comment +# range comment 2 + +# range comment b + +# range comment c +/foo/, /bar/ { + print +} + + +# comments2/f.awk +function bar(p1, p2) +{ + print "foo" +} + +# rbrace eol bar + +# rbrace block bar + +# comments2/function.awk +# comment +# comment before braces +function baz(p1, p2) +{ + # lbrace eol + # lbrace block + print "foo" +} + +# rbrace EOL comment funnyhaha + +# rbrace block comment funnyhaha + +# comments/callcoma.awk +function callme(a, b, c) +{ + printf "a = %s, b = %s, c = %s\n", # format comment + a, # a2 comment + b, # b2 comment + c +} + +# rbrace eol baz + +# rbrace block baz + +# comments/function.awk +# param comment 1 +# param comment 2 +# Comment between header and body +function funny(param1, param2, param3, param4) +{ + # lbrace EOL comment + # lbrace block comment + print "funny" +} + +# rbrace EOL comment funny + +# rbrace block comment funny + +# comments/function2.awk +function funnyhaha(param1, param2, param3, param4) +{ + # lbrace EOL comment + # lbrace block comment + print "funny" +} diff --git a/src/it/resources/gawk/profile12.awk b/src/it/resources/gawk/profile12.awk new file mode 100644 index 00000000..6664e681 --- /dev/null +++ b/src/it/resources/gawk/profile12.awk @@ -0,0 +1,3 @@ +NR == 1 +NR == 2 { print } +NR == 3 { print $0 } diff --git a/src/it/resources/gawk/profile12.in b/src/it/resources/gawk/profile12.in new file mode 100644 index 00000000..e5791419 --- /dev/null +++ b/src/it/resources/gawk/profile12.in @@ -0,0 +1,4 @@ +Line 1 +Line 2 +Line 3 +Line 4 diff --git a/src/it/resources/gawk/profile12.ok b/src/it/resources/gawk/profile12.ok new file mode 100644 index 00000000..6ad36e52 --- /dev/null +++ b/src/it/resources/gawk/profile12.ok @@ -0,0 +1,3 @@ +Line 1 +Line 2 +Line 3 diff --git a/src/it/resources/gawk/profile13.awk b/src/it/resources/gawk/profile13.awk new file mode 100644 index 00000000..dc090ae9 --- /dev/null +++ b/src/it/resources/gawk/profile13.awk @@ -0,0 +1,4 @@ +BEGIN { + printf "hello\n" > "/dev/stderr" + printf("hello\n") > "/dev/stderr" +} diff --git a/src/it/resources/gawk/profile13.ok b/src/it/resources/gawk/profile13.ok new file mode 100644 index 00000000..258238a9 --- /dev/null +++ b/src/it/resources/gawk/profile13.ok @@ -0,0 +1,5 @@ +BEGIN { + printf("hello\n") > "/dev/stderr" + printf("hello\n") > "/dev/stderr" +} + diff --git a/src/it/resources/gawk/profile14.awk b/src/it/resources/gawk/profile14.awk new file mode 100644 index 00000000..5210fc38 --- /dev/null +++ b/src/it/resources/gawk/profile14.awk @@ -0,0 +1,21 @@ +#: 200810_ Prettyprint weirdness to show Arnold +BEGIN { + IGNORECASE = 1; + printf("\n"); + printf("test \"%s\"\tin FUNCTAB=%s (good!)\n","masterlib::libfunc","masterlib::libfunc" in FUNCTAB); + exit; +#..1.1.1............... +} # e-o-begin +#..2.2.2............. +@namespace "nlib" +function tstlib(note){ printf("Tstv1=%s; from @namespace nlib\n",Tstv1); +}# e-o-function tstlib() +#..3.3.3............. +@namespace "masterlib" +# masterlib is library of "default" user-defined functions +function libfunc(note){ printf("%s:\tHello World from @namespace masterlib\n",note);} +#..4.4.4............. +@namespace "awk" +# return to program's awk space +function overridefunc(note){ printf("%s:\tHello Lone Star state from @namespace awk\n",note);} +# --5-5-5----------- diff --git a/src/it/resources/gawk/profile14.ok b/src/it/resources/gawk/profile14.ok new file mode 100644 index 00000000..fb145616 --- /dev/null +++ b/src/it/resources/gawk/profile14.ok @@ -0,0 +1,38 @@ +#: 200810_ Prettyprint weirdness to show Arnold +BEGIN { + IGNORECASE = 1 + printf ("\n") + printf "test \"%s\"\tin FUNCTAB=%s (good!)\n", "masterlib::libfunc", "masterlib::libfunc" in FUNCTAB + exit + #..1.1.1............... +} + +# --5-5-5----------- + +#..4.4.4............. +function overridefunc(note) +{ + printf "%s:\tHello Lone Star state from @namespace awk\n", note +} + +@namespace "masterlib" # masterlib is library of "default" user-defined functions + + +# e-o-function tstlib() + +#..3.3.3............. +function libfunc(note) +{ + printf "%s:\tHello World from @namespace masterlib\n", note +} + +@namespace "nlib" + + +# e-o-begin + +#..2.2.2............. +function tstlib(note) +{ + printf "Tstv1=%s;\tfrom @namespace nlib\n", Tstv1 +} diff --git a/src/it/resources/gawk/profile15.awk b/src/it/resources/gawk/profile15.awk new file mode 100644 index 00000000..29fe9de2 --- /dev/null +++ b/src/it/resources/gawk/profile15.awk @@ -0,0 +1,24 @@ +# in namespace awk +function zzzz() +{ + return "zzz" +} + +function nnn() +{ + return "nnn" +} + +@namespace "nnn" +function abc() +{ + return "nnn::abc" +} + +@namespace "bbb" + +function zzz() +{ + return "bbb::zzz" +} + diff --git a/src/it/resources/gawk/profile15.ok b/src/it/resources/gawk/profile15.ok new file mode 100644 index 00000000..c6eea608 --- /dev/null +++ b/src/it/resources/gawk/profile15.ok @@ -0,0 +1,27 @@ +# in namespace awk + +function nnn() +{ + return "nnn" +} + +function zzzz() +{ + return "zzz" +} + +@namespace "bbb" + + +function zzz() +{ + return "bbb::zzz" +} + +@namespace "nnn" + + +function abc() +{ + return "nnn::abc" +} diff --git a/src/it/resources/gawk/profile16.awk b/src/it/resources/gawk/profile16.awk new file mode 100644 index 00000000..e0c9c42b --- /dev/null +++ b/src/it/resources/gawk/profile16.awk @@ -0,0 +1,16 @@ +BEGIN { + foo::foo_bar() + foofoo::xxx() +} + +@namespace "foo" + +function foo_bar() +{ + print "foo::foo_bar" +} + +function foofoo::xxx() +{ + print "foofoo::xxx" +} diff --git a/src/it/resources/gawk/profile16.ok b/src/it/resources/gawk/profile16.ok new file mode 100644 index 00000000..b954b1c5 --- /dev/null +++ b/src/it/resources/gawk/profile16.ok @@ -0,0 +1,18 @@ +BEGIN { + foo::foo_bar() + foofoo::xxx() +} + + +@namespace "foo" + + +function foo_bar() +{ + print "foo::foo_bar" +} + +function foofoo::xxx() +{ + print "foofoo::xxx" +} diff --git a/src/it/resources/gawk/profile17.awk b/src/it/resources/gawk/profile17.awk new file mode 100644 index 00000000..51da6627 --- /dev/null +++ b/src/it/resources/gawk/profile17.awk @@ -0,0 +1,18 @@ +BEGIN { + switch (q) { # Comment 1 + case "a": # Comment 2 + # comment 3 + a++ + case "b": + # Comment 4 + break # Comment 5 + default: # Comment 6 + break # Comment 7 + } # Comment 8 + + switch (b) # Comment A + { # Comment B + case "a": + break; + } +} diff --git a/src/it/resources/gawk/profile17.ok b/src/it/resources/gawk/profile17.ok new file mode 100644 index 00000000..5340b251 --- /dev/null +++ b/src/it/resources/gawk/profile17.ok @@ -0,0 +1,19 @@ +BEGIN { + switch (q) { # Comment 1 + case "a": # Comment 2 + # comment 3 + a++ + case "b": + # Comment 4 + break # Comment 5 + default: # Comment 6 + break # Comment 7 + } + # Comment 8 + switch (b) { # Comment A + # Comment B + case "a": + break + } +} + diff --git a/src/it/resources/gawk/profile2.ok b/src/it/resources/gawk/profile2.ok new file mode 100644 index 00000000..3369a114 --- /dev/null +++ b/src/it/resources/gawk/profile2.ok @@ -0,0 +1,144 @@ + # BEGIN rule(s) + + BEGIN { + 1 if (sortcmd == "") { + sortcmd = "sort" + } + 1 asplit("BEGIN:END:atan2:break:close:continue:cos:delete:" "do:else:exit:exp:for:getline:gsub:if:in:index:int:" "length:log:match:next:print:printf:rand:return:sin:" "split:sprintf:sqrt:srand:sub:substr:system:while", keywords, ":") + 1 split("00:00:00:00:00:00:00:00:00:00:" "20:10:10:12:12:11:07:00:00:00:" "08:08:08:08:08:33:08:00:00:00:" "08:44:08:36:08:08:08:00:00:00:" "08:44:45:42:42:41:08", machine, ":") + 1 state = 1 + 570 for (;;) { + 570 symb = lex() + 570 nextstate = substr(machine[state symb], 1, 1) + 570 act = substr(machine[state symb], 2, 1) + 570 if (act == "0") { # 12 + 558 } else if (act == "1") { # 8 + 8 if (! inarray(tok, names)) { # 3 + 3 names[++nnames] = tok + } + 8 lines[tok, ++xnames[tok]] = NR + 550 } else if (act == "2") { # 425 + 425 if (tok in local) { # 309 + 309 tok = tok "(" funcname ")" + 309 if (! inarray(tok, names)) { # 22 + 22 names[++nnames] = tok + } + 309 lines[tok, ++xnames[tok]] = NR + 116 } else { + 116 tok = tok "()" + 116 if (! inarray(tok, names)) { # 21 + 21 names[++nnames] = tok + } + 116 lines[tok, ++xnames[tok]] = NR + } + 125 } else if (act == "3") { # 4 + 4 funcname = tok + 4 flines[tok] = NR + 121 } else if (act == "4") { # 49 + 49 braces++ + 72 } else if (act == "5") { # 49 + 49 braces-- + 49 if (braces == 0) { # 4 + 22 for (temp in local) { + 22 delete local[temp] + } + 4 funcname = "" + 4 nextstate = 1 + } + 23 } else if (act == "6") { # 22 + 22 local[tok] = 1 + 1 } else if (act == "7") { # 1 + 1 break + } else if (act == "8") { + print("error: xref.awk: line " NR ": aborting") > "/dev/con" + exit 1 + } + 569 state = nextstate + } + 46 for (i = 1; i <= nnames; i++) { + 46 printf("%d ", xnames[names[i]]) | sortcmd + 46 if (index(names[i], "(") == 0) { # 3 + 3 printf("%s(%d)", names[i], flines[names[i]]) | sortcmd + 43 } else { + 43 printf("%s", names[i]) | sortcmd + } + 433 for (j = 1; j <= xnames[names[i]]; j++) { + 433 if (lines[names[i], j] != lines[names[i], j - 1]) { # 389 + 389 printf(" %d", lines[names[i], j]) | sortcmd + } + } + 46 printf("\n") | sortcmd + } + 1 close(sortcmd) + } + + + # Functions, listed alphabetically + + 1 function asplit(str, arr, fs, n) + { + 1 n = split(str, temp_asplit, fs) + 36 for (i = 1; i <= n; i++) { + 36 arr[temp_asplit[i]]++ + } + } + + 433 function inarray(val, arr, j, tmp) + { + 15872 for (j in arr) { + 15872 tmp[arr[j]]++ + } + 433 return (val in tmp) + } + + 570 function lex() + { + 1698 for (;;) { + 1698 if (tok == "(eof)") { + return 7 + } + 326 while (length(line) == 0) { + 326 if ((getline line) == 0) { # 1 + 1 tok = "(eof)" + 1 return 7 + } + } + 1697 sub(/^[ \t]+/, "", line) + 1697 sub(/^"([^"]|\\")*"/, "", line) + 1697 sub(/^\/([^\/]|\\\/)+\//, "", line) + 1697 sub(/^#.*/, "", line) + 1697 if (line ~ /^function/) { # 4 + 4 tok = "function" + 4 line = substr(line, 9) + 4 return 1 + 1693 } else if (line ~ /^{/) { # 53 + 53 tok = "{" + 53 line = substr(line, 2) + 53 return 2 + 1640 } else if (line ~ /^}/) { # 53 + 53 tok = "}" + 53 line = substr(line, 2) + 53 return 3 + 1587 } else if (match(line, /^[[:alpha:]_][[:alnum:]_]*\[/)) { # 43 + 43 tok = substr(line, 1, RLENGTH - 1) + 43 line = substr(line, RLENGTH + 1) + 43 return 5 + 1544 } else if (match(line, /^[[:alpha:]_][[:alnum:]_]*\(/)) { # 87 + 87 tok = substr(line, 1, RLENGTH - 1) + 87 line = substr(line, RLENGTH + 1) + 87 if (! (tok in keywords)) { # 12 + 12 return 6 + } + 1457 } else if (match(line, /^[[:alpha:]_][[:alnum:]_]*/)) { # 521 + 521 tok = substr(line, 1, RLENGTH) + 521 line = substr(line, RLENGTH + 1) + 521 if (! (tok in keywords)) { # 404 + 404 return 4 + } + 936 } else { + 936 match(line, /^[^[:alpha:]_{}]/) + 936 tok = substr(line, 1, RLENGTH) + 936 line = substr(line, RLENGTH + 1) + } + } + } diff --git a/src/it/resources/gawk/profile3.awk b/src/it/resources/gawk/profile3.awk new file mode 100644 index 00000000..e519374e --- /dev/null +++ b/src/it/resources/gawk/profile3.awk @@ -0,0 +1,9 @@ +BEGIN { + the_func = "p" + print @the_func("Hello") +} + +function p(str) +{ + print "! " str " !" +} diff --git a/src/it/resources/gawk/profile3.ok b/src/it/resources/gawk/profile3.ok new file mode 100644 index 00000000..bbf06541 --- /dev/null +++ b/src/it/resources/gawk/profile3.ok @@ -0,0 +1,14 @@ + # BEGIN rule(s) + + BEGIN { + 1 the_func = "p" + 1 print @the_func("Hello") + } + + + # Functions, listed alphabetically + + 1 function p(str) + { + 1 print "! " str " !" + } diff --git a/src/it/resources/gawk/profile4.awk b/src/it/resources/gawk/profile4.awk new file mode 100644 index 00000000..11a3dbd4 --- /dev/null +++ b/src/it/resources/gawk/profile4.awk @@ -0,0 +1,8 @@ +BEGIN { + a = ("foo" (c = "bar")) + a = (b - c) "foo" + a = "foo" (b - c) + q = (d = "x") (e = "y") + a = ((c = tolower("FOO")) in JUNK) + x = (y == 0 && z == 2 && q == 45) +} diff --git a/src/it/resources/gawk/profile4.ok b/src/it/resources/gawk/profile4.ok new file mode 100644 index 00000000..06b31bc1 --- /dev/null +++ b/src/it/resources/gawk/profile4.ok @@ -0,0 +1,9 @@ +BEGIN { + a = ("foo" (c = "bar")) + a = (b - c) "foo" + a = "foo" (b - c) + q = (d = "x") (e = "y") + a = ((c = tolower("FOO")) in JUNK) + x = (y == 0 && z == 2 && q == 45) +} + diff --git a/src/it/resources/gawk/profile5.awk b/src/it/resources/gawk/profile5.awk new file mode 100644 index 00000000..4e962b4b --- /dev/null +++ b/src/it/resources/gawk/profile5.awk @@ -0,0 +1,5179 @@ + + + + + + +BEGIN{ _addlib("_BASE") } ########################################################## + +func _BASE(c,t,P, A) { + switch ( c ) { + case "_lib_CMDLN": + if ( match(t,/^((--([Vv])ersion)|(-([Vv])))[ \t]*/,A) ) { t=substr(t,RLENGTH+1); _cmdln_version=A[3] A[5] } + else if ( match(t,/^((-?\?)|(--help))[ \t]*/) ) { t=substr(t,RLENGTH+1); _cmdln_help=1 } + else if ( match(t,/^--[ \t]*/) ) return _endpass(substr(t,RLENGTH+1)) + return t + #___________________________________________________________ + + case "_lib_APPLY": + if ( _cmdln_help ) { match(_fbaccr(_LIBAPI,"_lib_HELP"),/^([^\x00]*)\x00([^\x01]*)\x01(.*)/,A) + _out(A[2] A[1] A[3]); return _endpass(_basexit_fl=1) } + if ( _cmdln_version ) { _out( _ln(_PRODUCT_NAME " v" _PRODUCT_VERSION) _ln(_PRODUCT_COPYRIGHT) _ln() (_cmdln_version=="v" ? "" : _lib_NAMEVER())); return _endpass(_basexit_fl=1) } + return + #___________________________________________________________ + + case "_lib_HELP": + return "\x00" _ln(_PRODUCT_NAME " v" _PRODUCT_VERSION) _ln(_PRODUCT_COPYRIGHT) _ln() _ln(" Usage:") _ln() _ln(" " _PRODUCT_FILENAME " [/key1 /key2...] [-- cmdline]") _ln() _ln(" keys:") _ln() "\x01" _ln(" -v -V --version - output product version and (if /V) all modules") _ln(" ? -? --help - output this help page") _ln(" -- - command line string edge") + #___________________________________________________________ + + case "_lib_NAMEVER": + return _ln("_BASE 3.0") + #___________________________________________________________ + + case "_lib_BEGIN": + return + #___________________________________________________________ + + case "_lib_END": + return } } +#_____________________________________________________________________________ +func _addlib(f) { ########################################################### + _addf(_LIBAPI,f) } +#_______________________________________________________________________ +func _lib_CMDLN(t) { + return _pass(_LIBAPI["F"],"_lib_CMDLN",t) } +#_________________________________________________________________ +func _lib_APPLY() { + return _ffaccr(_LIBAPI,"_lib_APPLY") } +#_________________________________________________________________ +func _lib_HELP() { + return _fbaccr(_LIBAPI,"_lib_HELP") } +#_________________________________________________________________ +func _lib_NAMEVER() { + return _fbaccr(_LIBAPI,"_lib_NAMEVER") } +#_________________________________________________________________ +func _lib_BEGIN(A) { + return _ffaccr(_LIBAPI,"_lib_BEGIN","",A) } +#_________________________________________________________________ +func _lib_END(A) { + return _ffaccr(_LIBAPI,"_lib_END","",A) } +#___________________________________________________________________________________ +BEGIN { ############################################################################ + + BINMODE="rw" + SUBSEP="\x00" + _NULARR[""]; delete _NULARR[""] + _INITBASE() } +#_____________________________________________________________________________ +END { ######################################################################## + + _EXIT() } + + +BEGIN { _addlib("_sYS") } ################################################################ +#_____________________________________________________________________________ +func _sYS(c,t,P, a,A) { ##################################################### + switch ( c ) { + #___________________________________________________________ + case "_lib_CMDLN": return t + #_____________________________________________________ + case "_lib_APPLY": return + #_____________________________________________________ + case "_lib_HELP": return + #_____________________________________________________ + case "_lib_NAMEVER": return + #_____________________________________________________ + case "_lib_BEGIN": return + #_____________________________________________________ + case "_lib_END": return } } + +BEGIN { _addlib("_rEG") } ################################################################ +#_____________________________________________________________________________ +func _rEG(c,t,P, a,A) { ##################################################### + switch ( c ) { + #___________________________________________________________ + case "_lib_CMDLN": return t + #_____________________________________________________ + case "_lib_APPLY": return + #_____________________________________________________ + case "_lib_HELP": return + #_____________________________________________________ + case "_lib_NAMEVER": return _ln("_reg 0.001") + #_____________________________________________________ + case "_lib_BEGIN": return + #_____________________________________________________ + case "_lib_END": return } } + + + + + +BEGIN { _addlib("_INSTRUC") } ###################################################### + +func _INSTRUC(c,t,P) { + switch ( c ) { + case "_lib_CMDLN": + return t + #___________________________________________________________ + + case "_lib_APPLY": + return + #___________________________________________________________ + + case "_lib_HELP": + return + #___________________________________________________________ + + case "_lib_NAMEVER": + return _ln("_INSTRUC 1.0") + #___________________________________________________________ + + case "_lib_BEGIN": + return + #___________________________________________________________ + + case "_lib_END": + return } } +#___________________________________________________________________________________ +BEGIN{ ############################################################################# + + _delay_perfmsdelay =11500 } + + + + + + +BEGIN { _addlib("_ARR") } ########################################################## + +func _ARR(c,t,P) { + switch ( c ) { + case "_lib_CMDLN": + return t + #___________________________________________________________ + + case "_lib_APPLY": + return + #___________________________________________________________ + + case "_lib_HELP": + return + #___________________________________________________________ + + case "_lib_NAMEVER": + return _ln("_ARR 1.0") + #___________________________________________________________ + + case "_lib_BEGIN": + return + #___________________________________________________________ + + case "_lib_END": + return } } +#___________________________________________________________________________________ +BEGIN{ } ########################################################################### + + + + + + +BEGIN { _addlib("_EXTFN") } ######################################################## + +func _EXTFN(c,t,P) { + switch ( c ) { + case "_lib_CMDLN": + return t + #___________________________________________________________ + + case "_lib_APPLY": + return + #___________________________________________________________ + + case "_lib_HELP": + return + #___________________________________________________________ + + case "_lib_NAMEVER": + return _ln("_EXTFN 1.0") + #___________________________________________________________ + + case "_lib_BEGIN": + return + #___________________________________________________________ + + case "_lib_END": + return } } +#___________________________________________________________________________________ +BEGIN{ ############################################################################# + + delete _XCHR; delete _ASC; delete _CHR; t="" + for ( i=0; i<256; i++ ) { _ASC[a=_CHR[i]=sprintf("%c",i)]=i; _QASC[a]=sprintf("%.3o",i) + _XCHR[_CHR[i]]=sprintf("%c", (i<128 ? i+128 : i-128)) } +#_____________________________________________________________________________ + + for ( i=0; i<256; i++ ) { + _QSTRQ[_CHR[i]]="\\" sprintf("%.3o",i) } +#_______________________________________________________________________ + + for ( i=0; i<32; i++ ) { + _QSTR[_CHR[i]]=_QSTRQ[_CHR[i]] } + for ( ; i<128; i++ ) { + _QSTR[_CHR[i]]=_CHR[i] } + for ( ; i<256; i++ ) { + _QSTR[_CHR[i]]=_QSTRQ[_CHR[i]] } + _QSTR["\\"]="\\\\" #; _QSTR["\""]="\\\"" +#_____________________________________________________________________________ + + _CHR["CR"] ="\015" + _CHR["EOL"] ="\015\012" + _CHR["EOF"] ="\032" + + _QSTR[_CHR["EOL"]] ="\\015\\012" +#_______________________________________________________________________ + + _CHR["MONTH"][_CHR["MONTH"]["Jan"]="01"]="Jan" + _CHR["MONTH"][_CHR["MONTH"]["Feb"]="02"]="Feb" + _CHR["MONTH"][_CHR["MONTH"]["Mar"]="03"]="Mar" + _CHR["MONTH"][_CHR["MONTH"]["Apr"]="04"]="Apr" + _CHR["MONTH"][_CHR["MONTH"]["May"]="05"]="May" + _CHR["MONTH"][_CHR["MONTH"]["Jun"]="06"]="Jun" + _CHR["MONTH"][_CHR["MONTH"]["Jul"]="07"]="Jul" + _CHR["MONTH"][_CHR["MONTH"]["Aug"]="08"]="Aug" + _CHR["MONTH"][_CHR["MONTH"]["Sep"]="09"]="Sep" + _CHR["MONTH"][_CHR["MONTH"]["Oct"]="10"]="Oct" + _CHR["MONTH"][_CHR["MONTH"]["Nov"]="11"]="Nov" + _CHR["MONTH"][_CHR["MONTH"]["Dec"]="12"]="Dec" +#_____________________________________________________________________________ + + _TAB_STEP_DEFAULT =8 +#_____________________________________________________________________________ + + for ( i=0; i<32; i++ ) _REXPSTR[_CHR[i]]=_QSTRQ[_CHR[i]] + for ( ; i<256; i++ ) _REXPSTR[_CHR[i]]=_CHR[i] + _gensubfn("\\^$.()|{,}[-]?+*",".","_rexpstr_i0") } +#_____________________________________________________________________________ +func _rexpstr_i0(t,A,p0) { + return _REXPSTR[t]="\\" t } + + + + + + +BEGIN { _addlib("_SYSIO") } ######################################################### + +func _SYSIO(c,t,P) { + switch ( c ) { + case "_lib_CMDLN": + return t + #___________________________________________________________ + + case "_lib_APPLY": + return + #___________________________________________________________ + + case "_lib_HELP": + return + #___________________________________________________________ + + case "_lib_NAMEVER": + return _ln("_SYSIO 1.0") + #___________________________________________________________ + + case "_lib_BEGIN": + return + #___________________________________________________________ + + case "_lib_END": + return } } +#___________________________________________________________________________________ +BEGIN{ ############################################################################# + + _SYS_STDCON ="CON" + _CON_WIDTH=match(_cmd("MODE "_SYS_STDCON" 2>NUL"),/Columns:[ \t]*([0-9]+)/,A) ? strtonum(A[1]) : 80 } + + + + + + +BEGIN { _addlib("_FILEIO") } ####################################################### + +func _FILEIO(c,t,P, A) { + switch ( c ) { + case "_lib_CMDLN": + if ( match(t,/^[ \t]*-[Tt]([\+-])[ \t]*/,A) ) { t=substr(t,RLENGTH+1) + if ( A[1]=="+" ) _fileio_notdeltmpflag=1 + else _fileio_notdeltmpflag="" } + return t + #___________________________________________________________ + + case "_lib_APPLY": + if ( _fileio_notdeltmpflag ) { + _info("Temporary objects deletion DISABLED (inherited)") + } + return + #___________________________________________________________ + + case "_lib_HELP": + return _ln(" -[Tt][+-] - inherited: +enable\\-disable temporary files\\dirs deletion") _ln() + #___________________________________________________________ + + case "_lib_NAMEVER": + return _ln("_FILEIO 2.1") + #___________________________________________________________ + + case "_lib_BEGIN": + P["ENVIRON"]["CD"] =ENVIRON["CD"] + P["_FILEIO_RD"] =_FILEIO_RD + P["_FILEIO_R"] =_FILEIO_R + P["_FILEIO_D"] =_FILEIO_D + if ( !("_FILEIO_TMPRD" in P) ) { + P["_FILEIO_TMPRD"] =_getmpdir(_filen(P["SOURCE"]) "." ++_egawk_subcntr _CHR["SUBDIR"]) } + return + #___________________________________________________________ + + case "_lib_END": + return } } +#___________________________________________________________________________________ +BEGIN{ ############################################################################# + + if ( _SYS_STDOUT=="" ) _SYS_STDOUT="/dev/stdout" + if ( _SYS_STDERR=="" ) _SYS_STDERR="/dev/stderr" + _CHR["SUBDIR"]="\\" + if ( _gawk_scriptlevel<1 ) { + match(b=_cmd("echo %CD% 2>NUL"),/[^\x00-\x1F]*/) + ENVIRON["CD"]=_FILEIO_RD=_filerd(substr(b,RSTART,RLENGTH) _CHR["SUBDIR"]); _FILEIO_R=_filer(_FILEIO_RD); _FILEIO_D=_filed(_FILEIO_RD) + _setmpath(_filerd(_FILEIO_RD "_tmp" _CHR["SUBDIR"])) } } + + + + + + +BEGIN { _addlib("_tOBJ") } ######################################################### + +func _tOBJ(c,t,P) { + switch ( c ) { + #___________________________________________________________ + case "_lib_CMDLN": + return t + #___________________________________________________________ + case "_lib_APPLY": + return + #___________________________________________________________ + case "_lib_HELP": + return + #___________________________________________________________ + case "_lib_NAMEVER": + return _ln("_tOBJ 3.0") + #___________________________________________________________ + case "_lib_BEGIN": + return + #___________________________________________________________ + case "_lib_END": + return + #___________________________________________________________ + case "_lib_CLEANUP": + return _tOBJ_CLEANUP() } } +#_______________________________________________________________________ +func _tOBJ_CLEANUP( p) { ############################################## + for ( p in UIDSDEL ) { + delete _ptr[p] + delete _tPREV[p]; delete _tPARENT[p]; delete _tNEXT[p] + delete _tFCHLD[p]; delete _tQCHLD[p]; delete _tLCHLD[p] + delete _TMP0[p]; delete _TMP1[p] + delete _tLINK[p]; delete _tCLASS[p] } } +#___________________________________________________________________________________ +BEGIN{ ############################################################################# + _tInBy ="\x8A._tInBy" + _tgenuid_init() + _UIDS[""]; delete _UIDS[""]; _UIDSDEL[""]; delete _UIDSDEL[""] + _tPREV[""]; _tPARENT[""]; _tNEXT[""]; _tFCHLD[""]; _tQCHLD[""]; _tLCHLD[""] + _tLINK[""]; _tCLASS[""] + _tSTR[""]; _tDLINK[""] + _[""]; delete _[""]; _ptr[""]; delete _ptr[""] + _TMP0[""]; delete _TMP0[""]; _TMP1[""]; delete _TMP1[""] } + + + + + +BEGIN{ _addlib("_ERRLOG") } ######################################################## + +func _ERRLOG(c,t,P, a,b,A) { + switch ( c ) { + case "_lib_CMDLN": + if ( match(t,/^[ \t]*-L:([TtVvIiWwEeFf]*)[ \t]*/,A) ) { t=substr(t,RLENGTH+1); _errlog_errflkey=_errlog_errflkey A[1] } + return t + #_______________________________________________________________________ + + case "_lib_APPLY": + if ( _errlog_errflkey ) { + split(_errlog_errflkey,A,"") + for ( a=1; a in A; a++ ) { + if ( A[a]==toupper(A[a]) ) b=1; else b="" + switch ( toupper(A[a]) ) { + case "T": + _ERRLOG_TF=b; break + case "V": + _ERRLOG_VF=b; break + case "I": + _ERRLOG_IF=b; break + case "W": + _ERRLOG_WF=b; break + case "E": + _ERRLOG_EF=b; break + case "F": + _ERRLOG_FF=b; break } } + if ( _ERRLOG_IF ) { + _info("Log-message types inherited acc/deny: " "TRACE " (_ERRLOG_TF ? "ON" : "OFF") "/" "VERBOSE " (_ERRLOG_VF ? "ON" : "OFF") "/" "INFO " (_ERRLOG_IF ? "ON" : "OFF") "/" "WARNING " (_ERRLOG_WF ? "ON" : "OFF") "/" "ERROR " (_ERRLOG_EF ? "ON" : "OFF") "/" "FATAL " (_ERRLOG_FF ? "ON" : "OFF") ) } } + return + #_______________________________________________________________________ + + case "_lib_HELP": + return _ln(" -L:TtVvIiWwEeFf - enable(upcase: TVIWEF) or disable(lowcase: tviwef) allowable type of") _ln(" log messages. Trace/Verbose/Informational/Warning/Error/Fatal.") _ln() + #_______________________________________________________________________ + + case "_lib_NAMEVER": + return _ln("_ERRLOG 1.0") + #_______________________________________________________________________ + + case "_lib_BEGIN": + P["_ERRLOG_TF"] =_ERRLOG_TF + P["_ERRLOG_VF"] =_ERRLOG_VF + P["_ERRLOG_IF"] =_ERRLOG_IF + P["_ERRLOG_WF"] =_ERRLOG_WF + P["_ERRLOG_EF"] =_ERRLOG_EF + P["_ERRLOG_FF"] =_ERRLOG_FF + P["_errlog_file"] ="/dev/stderr" + return } } +#___________________________________________________________________________________ +BEGIN{ ############################################################################# + + if ( _gawk_scriptlevel<1 ) { + _ERRLOG_TF =1 + _ERRLOG_VF =1 + _ERRLOG_IF =1 + _ERRLOG_WF =1 + _ERRLOG_EF =1 + _ERRLOG_FF =1 + _wrfile(_errlog_file=_getmpfile("OUTPUT.LOG"),"") } } + + + + + + +BEGIN { _addlib("_SHORTCUT") } ##################################################### + +func _SHORTCUT(c,t,P) { + switch ( c ) { + case "_lib_CMDLN": + return t + #___________________________________________________________ + + case "_lib_APPLY": + return + #___________________________________________________________ + + case "_lib_HELP": + return + #___________________________________________________________ + + case "_lib_NAMEVER": + return _ln("_shortcut 1.0") + #___________________________________________________________ + + case "_lib_BEGIN": + return + #___________________________________________________________ + + case "_lib_END": + return } } +#___________________________________________________________________________________ +BEGIN { _shortcut_init() } ######################################################### + + + +BEGIN { _addlib("_eXTFN") } ######################################################## + +func _eXTFN(c,t,P) { + switch ( c ) { + case "_lib_CMDLN": + return t + #___________________________________________________________ + + case "_lib_APPLY": + return + #___________________________________________________________ + + case "_lib_HELP": + return + #___________________________________________________________ + + case "_lib_NAMEVER": + return _ln("_extfn 1.0") + #___________________________________________________________ + + case "_lib_BEGIN": + return + #___________________________________________________________ + + case "_lib_END": + return } } +#___________________________________________________________________________________ +BEGIN { _extfn_init() } ############################################################ + + +BEGIN { _addlib("_sHARE") } ############################################################## +#_____________________________________________________________________________ +func _sHARE(c,t,P, a,A) { ################################################### + switch ( c ) { + #___________________________________________________________ + case "_lib_CMDLN": return t + #_____________________________________________________ + case "_lib_APPLY": return + #_____________________________________________________ + case "_lib_HELP": return + #_____________________________________________________ + case "_lib_NAMEVER": return _ln("_share 1.000") + #_____________________________________________________ + case "_lib_BEGIN": return + #_____________________________________________________ + case "_lib_END": return } } + +BEGIN { _addlib("_FILEVER") } ############################################################ +#_____________________________________________________________________________ +func _FILEVER(c,t,P, a,A) { ################################################# + switch ( c ) { + #___________________________________________________________ + case "_lib_CMDLN": return t + #_____________________________________________________ + case "_lib_APPLY": return + #_____________________________________________________ + case "_lib_HELP": return + #_____________________________________________________ + case "_lib_NAMEVER": return + #_____________________________________________________ + case "_lib_BEGIN": return + #_____________________________________________________ + case "_lib_END": return } } + + +BEGIN { _addlib("_DS") ############################################################################### + + _PRODUCT_NAME ="Deployment Solution Control" + _PRODUCT_VERSION ="1.0" + _PRODUCT_COPYRIGHT ="Copyright (C) 2013 by CosumoGEN" + _PRODUCT_FILENAME ="_main.ewk" +}#____________________________________________________________________________ +func _DS(c,t,P, a,A) { ###################################################### + switch ( c ) { + #___________________________________________________________ + case "_lib_CMDLN": return t + #_____________________________________________________ + case "_lib_APPLY": return + #_____________________________________________________ + case "_lib_HELP": return _ln() _ln( " Usage: " _PRODUCT_NAME " [/key1 /key2...] sourcefile [cmdline]") _ln() + #_____________________________________________________ + case "_lib_NAMEVER": return + #_____________________________________________________ + case "_lib_BEGIN": return + #_____________________________________________________ + case "_lib_END": return } } + +func _INIT(f) { } ############################################################################# + + + +func _pmap(m,s1,s2,s3,s4,s5,s6,s7,s8) { + if ( match(m,/^([^\(]+)\(([^\)]*)\)$/,_QMAP) ) { _qparamf1=_QMAP[1]; _QMAP[0]="r" (_qparamc1=split(_QMAP[2],_QMAP,"")) + _qparamf0="_p" _QMAP[_qparamc1--] + return @_qparamf0(s1,s2,s3,s4,s5,s6,s7,s8) } } + +func _p1(s1,s2,s3,s4,s5,s6,s7,s8,p1,p2,p3,p4,p5,p6,p7,p8) { + _qparamf0="_p" _QMAP[_qparamc1--] + return @_qparamf0(s1,s2,s3,s4,s5,s6,s7,s8,s1,p1,p2,p3,p4,p5,p6,p7) } + +func _p2(s1,s2,s3,s4,s5,s6,s7,s8,p1,p2,p3,p4,p5,p6,p7,p8) { + _qparamf0="_p" _QMAP[_qparamc1--] + return @_qparamf0(s1,s2,s3,s4,s5,s6,s7,s8,s2,p1,p2,p3,p4,p5,p6,p7) } + +func _p3(s1,s2,s3,s4,s5,s6,s7,s8,p1,p2,p3,p4,p5,p6,p7,p8) { + _qparamf0="_p" _QMAP[_qparamc1--] + return @_qparamf0(s1,s2,s3,s4,s5,s6,s7,s8,s3,p1,p2,p3,p4,p5,p6,p7) } + +func _p4(s1,s2,s3,s4,s5,s6,s7,s8,p1,p2,p3,p4,p5,p6,p7,p8) { + _qparamf0="_p" _QMAP[_qparamc1--] + return @_qparamf0(s1,s2,s3,s4,s5,s6,s7,s8,s4,p1,p2,p3,p4,p5,p6,p7) } + +func _p5(s1,s2,s3,s4,s5,s6,s7,s8,p1,p2,p3,p4,p5,p6,p7,p8) { + _qparamf0="_p" _QMAP[_qparamc1--] + return @_qparamf0(s1,s2,s3,s4,s5,s6,s7,s8,s5,p1,p2,p3,p4,p5,p6,p7) } + +func _p6(s1,s2,s3,s4,s5,s6,s7,s8,p1,p2,p3,p4,p5,p6,p7,p8) { + _qparamf0="_p" _QMAP[_qparamc1--] + return @_qparamf0(s1,s2,s3,s4,s5,s6,s7,s8,s6,p1,p2,p3,p4,p5,p6,p7) } + +func _p7(s1,s2,s3,s4,s5,s6,s7,s8,p1,p2,p3,p4,p5,p6,p7,p8) { + _qparamf0="_p" _QMAP[_qparamc1--] + return @_qparamf0(s1,s2,s3,s4,s5,s6,s7,s8,s7,p1,p2,p3,p4,p5,p6,p7) } + +func _p8(s1,s2,s3,s4,s5,s6,s7,s8,p1,p2,p3,p4,p5,p6,p7,p8) { + _qparamf0="_p" _QMAP[_qparamc1--] + return @_qparamf0(s1,s2,s3,s4,s5,s6,s7,s8,s8,p1,p2,p3,p4,p5,p6,p7) } + +func _pr8(s1,s2,s3,s4,s5,s6,s7,s8,p1,p2,p3,p4,p5,p6,p7,p8) { + + return @_qparamf1(p1,p2,p3,p4,p5,p6,p7,p8) } + +func _pr7(s1,s2,s3,s4,s5,s6,s7,s8,p1,p2,p3,p4,p5,p6,p7,p8) { + + return @_qparamf1(p1,p2,p3,p4,p5,p6,p7) } + +func _pr6(s1,s2,s3,s4,s5,s6,s7,s8,p1,p2,p3,p4,p5,p6,p7,p8) { + + return @_qparamf1(p1,p2,p3,p4,p5,p6) } + +func _pr5(s1,s2,s3,s4,s5,s6,s7,s8,p1,p2,p3,p4,p5,p6,p7,p8) { + + return @_qparamf1(p1,p2,p3,p4,p5) } + +func _pr4(s1,s2,s3,s4,s5,s6,s7,s8,p1,p2,p3,p4,p5,p6,p7,p8) { + + return @_qparamf1(p1,p2,p3,p4) } + +func _pr3(s1,s2,s3,s4,s5,s6,s7,s8,p1,p2,p3,p4,p5,p6,p7,p8) { + + return @_qparamf1(p1,p2,p3) } + +func _pr2(s1,s2,s3,s4,s5,s6,s7,s8,p1,p2,p3,p4,p5,p6,p7,p8) { + + return @_qparamf1(p1,p2) } + +func _pr1(s1,s2,s3,s4,s5,s6,s7,s8,p1,p2,p3,p4,p5,p6,p7,p8) { + + return @_qparamf1(p1) } + +func _pr0(s1,s2,s3,s4,s5,s6,s7,s8,p1,p2,p3,p4,p5,p6,p7,p8) { + + return @_qparamf1() } + + + + + + + + + + + +func hujf(a,b,c) { _conl("hujf(" a "," b "," c ")") } + + + + +func _qparam(qm,p0,p1,p2,p3,p4,p5,p6,p7) { + + if ( qm==qm+0 && qm>0 ) _qparamim=substr(" ",1,qm) + else if ( qm!="" ) _qparamim=qm + else _qparamim=" " + _qparamask=""; return _qparam_i0(p0,p1,p2,p3,p4,p5,p6,p7) } + +func _qparam_i0(p0,p1,p2,p3,p4,p5,p6,p7) { _qparama0=substr(_qparamim,1,1); _qparamim=substr(_qparamim,2) + switch ( _qparama0 ) { case "": gsub(/ +$/,"",_qparamask); return length(_qparamask) + default: if ( isarray(p0) ) _qparama0="A" + else if ( p0=="" && p0==0 ) _qparama0=" " + else if ( _isptr(p0) ) _qparama0="P" + else _qparama0="S" + case ".": _qparamask=_qparamask _qparama0 + return _qparam_i0(p1,p2,p3,p4,p5,p6,p7) } } +func tts(p,uidel,psfx,cnt,chr,p5,p6,p7, im) { + im=" " + im=".. .." + _conl("ret: " _qparam(im,p,uidel,psfx,cnt,chr,p5,p6,p7) "'") + _conl("mask: `" _qparamask "'") } + +func _uidcyc(p, i) { + _dumpuidgen(p) + for ( i=1; i<(64*8*6-1); i++ ) _conl(i ":" _var(_getuid(p))) + _dumpuidgen(p) } + + + +func _dumpuidgen(p, pd,pc,ps) { + _conline("#" (++cntdm) ": " p "'"); _conl() + if ( p in _tuidel ) { _conl("DEL: " _var(pd=_tuidel[p])) + _conl(_dumparr(_tUIDEL[pd]) _ln()) } + _conl("PFX: " _tUIDPFX[p] "'"); _conl("SFX: " _tUIDSFX[p] "'") + + _conl("COUNT: " (p in _tuidcnt ? (pc=_tuidcnt[p]) "'" : _th0("-",pc=-2))) + _con("CHARS: "); if ( p in _tuidchr ) { _conl((ps=_tuidchr[p]) "'") + _conl("HCHR: " (pc==-2 ? "-" : _tUIDCNTH[pc] "'")); _conl(_dumparr(_tUIDCHRH[ps]) _ln()) + _conl("LCHR: " (pc==-2 ? "-" : _tUIDCNTL[pc] "'")); _conl(_dumparr(_tUIDCHRL[ps]) _ln()) } + else _conl("-") } + + + +# prefix - +# prichr - aware character `{', `^',`]' +# sechr - aware character `.' as the first char of sechr, and character `}' +# suffix - aware character `]' +# cntptr - aware character `]' + +func _tr(n,cs, H) { + #_tuidinitcs[p]=cs + #2 uidel, 5 pfx, 7 hichr,11(10) lochr,14 suffix + _rconline(n ": " cs); _rconl() + if ( match(cs,/^((([^\xB4:\[\|\]]*\xB4.)*[^\xB4:\[\|\]]*):)?((([^\xB4\[\|\]]*\xB4.)*[^\xB4\[\|\]]*)\[)?(([^\xB4\|\]]*\xB4.)*[^\xB4\|\]]*)?(\|(\.)?(([^\xB4\]]*\xB4.)*[^\xB4\]]*))?(\](.*))?$/,H) ) { + _rconl("delptr: " _une(H[2]) "'") + _rconl("pfxstr: " _une(H[5]) "'") + _rconl("hichr: " _une(H[7]) "'") + _rconl("lochr: " _une(H[10] ? H[7] "' and " H[11] "'" : H[11] "'")) + _rconl("sfxstr: " _une(H[14]) "'") } + else _rconl("NOT MATCH!") + _rconl() } + +func _une(t) { return gensub(/\xB4(.)/,"\\1","G",t) } +func _rconl(t) { _rprt=_rprt _ln(t) } +func _rconline(t) { _rprt=_rprt _ln((t=" " t " ") _getchrln("_",_CON_WIDTH-length(t)-1)) } + + + + + + + + + + + + +func _splitpath_test() { + _conl(); _conl("########################################################################################"); _conl() + _fpp(" ") + _fpp(" fi le . ex t ") + _fpp(" di r0 / / ") + _fpp(" di r0 / / fi le . ex t ") + _fpp(" / ") + _fpp(" / fi le . ex t ") + _fpp(" / di r0 / / ") + _fpp(" / di r0 / / fi le . ex t ") + _conl(); _conl("########################################################################################"); _conl() + _fpp(" c : ") + _fpp(" c : fi le . ex t ") + _fpp(" c : di r0 / / ") + _fpp(" c : di r0 / / fi le . ex t ") + _fpp(" c : / / ") + _fpp(" c : / / fi le . ex t ") + _fpp(" c : / / di r0 / / ") + _fpp(" c : / / di r0 / / fi le . ex t ") + _conl(); _conl("########################################################################################"); _conl() + _fpp(" / / ") + _fpp(" / / ho st . hs t ") + _fpp(" / / ho st / / ") + _fpp(" / / ho st / / fi le . ex t ") + _fpp(" / / ho st / / di r0 / / ") + _fpp(" / / ho st / / di r0 / / fi le . ex t ") + _conl(); _conl("########################################################################################"); _conl() + _fpp(" / / ho st / / c : ") + _fpp(" / / ho st / / c : fi le . ex t ") + _fpp(" / / ho st / / c : di r0 / / ") + _fpp(" / / ho st / / c : di r0 / / fi le . ex t ") + _fpp(" / / ho st / / c : / / ") + _fpp(" / / ho st / / c : / / fi le . ex t ") + _fpp(" / / ho st / / c : / / di r0 / / ") + _fpp(" / / ho st / / c : / / di r0 / / fi le . ex t ") + _conl(); _conl("########################################################################################"); _conl() + _fpp(" http : / / / ") + _fpp(" http : / / / si te . ex t ") + _fpp(" http : / / / si te / / ") + _fpp(" http : / / / si te / / fi le . ex t ") + _fpp(" http : / / / si te / / di r0 / / ") + _fpp(" http : / / / si te / / di r0 / / fi le . ex t ") + _conl(); _conl("########################################################################################"); _conl() + _fpp(" ftp : / / / : po rt ") + _fpp(" ftp : / / / si te . ex t : po rt ") + _fpp(" ftp : / / / si te : po rt / / ") + _fpp(" ftp : / / / si te : po rt / / fi le . ex t ") + _fpp(" ftp : / / / si te : po rt / / di r0 / / ") + _fpp(" ftp : / / / si te : po rt / / di r0 / / fi le . ex t ") + _conl(); _conl("## //. ######################################################################################"); _conl() + _fpp(" / / . ") + _fpp(" / / . / / ") + _fpp(" / / . / / com 56 ") + _fpp(" / / . / / com 56 / / ") + _fpp(" / / . / / c : ") + _fpp(" / / . / / c : / / ") + _fpp(" / / . / / c : com 56 ") + _fpp(" / / . / / c : com 56 / / ") + _fpp(" / / . / / c : / / com 56 ") + _fpp(" / / . / / c : / / com 56 / / ") + _conl(); _conl("## //? ######################################################################################"); _conl() + _fpp(" / / ? ") + _fpp(" / / ? / / ") + _fpp(" / / ? / / com 56 ") + _fpp(" / / ? / / com 56 / / ") + _fpp(" / / ? / / c : ") + _fpp(" / / ? / / c : / / ") + _fpp(" / / ? / / c : com 56 ") + _fpp(" / / ? / / c : com 56 / / ") + _fpp(" / / ? / / c : / / com 56 ") + _fpp(" / / ? / / c : / / com 56 / / ") + _conl(); _conl("########################################################################################"); _conl() + _fpp(" / / / ") + _fpp(" / / / . hs t ") + _fpp(" / / / / fi le . ex t ") + _fpp(" / / / / di r0 / / ") + _fpp(" / / / / di r0 / / di r1 / fi le . ex t ") + _fpp(" / / / / c : ") + _fpp(" / / / / c : fi le . ex t ") + _fpp(" / / / / c : di r0 / / ") + _fpp(" / / / / c : di r0 / / fi le . ex t ") + _fpp(" / / / / c : / / ") + _fpp(" / / / / c : / / fi le . ex t ") + _fpp(" / / / / c : / / di r0 / / ") + _fpp(" / / / / c : / / di r0 / / fi le . ex t ") + _conl(); _conl("########################################################################################"); _conl() + + + return } +# this is somnitelno: that / / . / / com 56 / / - is the DEV...; what is DEV ??? this already PROBLEM +#_____________________________________________________________________________ +func _patharr0(D,q, i,h,A,B) { ############################################## + delete D; if ( 0h=length(B[1]) ) { D["type"]="FILE"; A[1]=_patharr0_i0(A[1],D,"drive"); return _patharr0_i1(D,A,1,q) } + i=gensub(/ *([\.\?]) */,"\\1","G",A[2]); IGNORECASE=1; match(A[1],/^((https?)|(ftp)):$/); IGNORECASE=0 + if ( RLENGTH>0 ) { D["type"]=toupper(substr(A[1],1,RLENGTH-1)); _patharr0_i0(i,D,"site","port") } + else if ( A[1]=="" ) { D["type"]="UNC"; if ( h>2 ) { D["host"]; A[2]=_patharr0_i0(A[2],D,"drive","","FILE"); return _patharr0_i1(D,A,2,q) } + if ( i=="" ) return 1 + D["host"]=i; A[3]=_patharr0_i0(A[3],D,"drive","","FILE") } + else { D["type"]="FILE"; A[1]=_patharr0_i0(A[1],D,"drive"); return _patharr0_i1(D,A,1,q) } return _patharr0_i1(D,A,3,q) } } + #_____________________________________________________ + func _patharr0_i0(t,D,l,r,d, i) { if ( i=index(t,":") ) { if ( d ) D["type"]=d + if ( i>1 ) D[l]=substr(t,1,i-1) + if ( (t=substr(t,i+1)) && r ) D[r]=t; return t } + else if ( t && r ) D[l]=t; return t } + #_____________________________________________________ + func _patharr0_i1(D,A,i,q, t,c) { if ( D["type"]=="UNC" ) { if ( t=A[i++] ) D[0]=(D["share"]=D[++c]=t) "/"; else return 1 } + while ( i1 ) D["name"]=substr(t,1,RSTART-1); D["ext"]=substr(t,RSTART,RLENGTH) } + else if ( t!="" ) D["name"]=t } return 1 } + + +func _fpp(q, D,S) { + _conl(); _conline(q); _conl(); + q=_patharr0(S,q) + #_arregpath(D,S) + #_conl(_dumparr(D)) + _conl( _dumparr(S)); _conl() + + return q } + + +func _rpp(q, D,S) { + _conl(); _conline(q); _conl(); + + _regpath0(D,q) + #_conl(_dumparr(D)) + + _conl(_ln("DEST:") _dumparr(D)); _conl() + return q } + +func _split_regpath() { + _rpp(" / / / / ") + _rpp(" / / / / huj ") + _rpp(" / / / / huj / ") + _rpp(" / / / / huj / pizda.TSR ") + _rpp(" / / / / hklm ") + _rpp(" / / / / hklm / ") + _rpp(" / / / / hklm / huj ") + _rpp(" / / / / hklm / huj / ") + _rpp(" / / / / hklm / huj / pizda.TSR ") + _conl(); _conl("########################################################################################"); _conl() + _rpp(" / / / / hklm / software / altiris / fi le . ex t ") + _rpp(" / / . / / hkcr / software / altiris / fi le . ex t ") + _rpp(" / / ? / / hKcU / software / altiris / fi le . ex t ") + _rpp(" / / lOcAlHoSt / / hKu / software / altiris / fi le . ex t ") + _rpp(" / / ho st / / hKcc / software / altiris / fi le . ex t ") + _rpp(" / / ho st / / hKPd / software / altiris / fi le . ex t ") + _conl(); _conl("########################################################################################"); _conl() + + + + } +# test with the different path types +# _conl(_ln("SRC:") _dumparr(S)); _conl(); + +func _ini(p,cs, dptr,pfx,sfx,hstr,lstr) { + return _inituid(p,cs, dptr,pfx,sfx,hstr,lstr,A) } + +#_______________________________________________________________________ +func _inituid(p,cs, dptr,pfx,sfx,hstr,lstr,A) { ################### 1 # + if ( cs==0 && cs=="" ) { cs=p; p=_getuid() } + + _conl(); _conl(); _conl(cs) + + if ( match(cs,/^(([^:]*):)?(([^'\xB4]*\xB4.)*[^'\xB4]*)[']/,A) ) { pfx=A[3]; dptr=A[2] } + if ( match(cs=substr(cs,1+RLENGTH),/'(([^'\xB4]*\xB4.)*[^'\xB4]*)$/,A) ) { sfx=A[1]; cs=substr(cs,1,RSTART-1) } + if ( match(cs,/^(([`\^])(.*))/,A) ) { if ( A[2]=="`" ) { hstr=A[3] "~"; lstr="" } else { lstr=A[3] "+"; hstr="" } } + else if ( match(cs,/^(([^'\xB4\|]*\xB4.)*[^'\xB4\|]*)(\|(.*))?/,A) ) { hstr=A[1]; lstr=A[4] } + else { ERRNO="_inituid(): bad parameters"; return } + + _conl(dptr ":" pfx "'" hstr "|" lstr "'" sfx) + + return _cfguid(p,dptr,pfx,sfx,hstr,lstr) } + +# dptr - morg ptr; in case if object deleted then _CLASSPTR[ptr] will be deleted(object is death), but +# _tUIDEL[_CLASSPTR[ptr]] will be created that object can be resurrected from morg +# dptr can be any string containing any characters except `:'. It's not verified +# pfx,sfx - uid prefix str, and uid suffix str; this strings specifies string that can be inserted before/after +# uid generated by uid generator: +# +# class uid: pfx uidgen sfx +# +# Both can be any string(including ""), and can contains any character with B4-escaping feature. +# Note: that this strings cannot contains "'" character: it's should be escaped by B4-escaper. +# hstr,lstr - this values configure uid-generator itself. ther is a 3 combinations regarding its: +# +# hstr lstr function +# +# `ptr * - specify pointer to external uid-generator +# All uids and chars will be generated by external uid-generator +# * ^ptr - class will have it's own uid generator using external character set +# str str - class will have it's own uid generator with it's own character set +# character set inmplemented in hstr(high-charset) and in lstr(low-charset) in 2 ways: +# 1) "AB" "AB01" - this mean that high-charset contain chars: `A' and `B' +# low-charset contains chars: `A', `B', `0', `1' +# +# 2) "Az,By" "Ax,Bw,0v,1u" - this mean that high-charset contain chars: `Az' and `By' +# low-charset contains chars: `Ax', `Bw', `0v', `1u' +# Note: both: hstr and lstr cannot contain char `,' directly, but it's can uses +# B4-escaper to escape any char including `,' + + + +# !!!! in case of using `,' in hstr/lstr - the escaped `,' will leads to interpretate hstr and lstr as divided by `,' +# if parameters error then i should be more specific about what error in parameters detected +# document _inituid(): parameters; document cs: uid initialization string format +# test with escape char +# adv hstr and lstr splitting? +# chk if hstr len==0 ? +# return _tclass & report error? +# _tapi thru function + +# additional syntax checking ??? +# implement syntax and uid srv in docs +# add _dumpuid() ???? +# make performance measurement +# protection against badchar list +# additional feature to specify _getuid() to not resurrect uid; and informative that uid was ressurected or not +# build _defclass fn + +# _tuidinitcs ???? +# _tuidchrh[p] +# _tuidchrl[p] +# _tuidchr[p] +# _tuidcnt[p] +# _tUIDPFX[p] +# _tUIDSFX[p] +# _tUIDEL +# _tUIDCNTH +# _tUIDCNTL +# _tUIDCHRL +# _tUIDCHRH + +# create default class basic `new' and `del' functions + + + +func _tstini() { + _ini("uidel:pfx'hstr|lstr'sfx") + _ini("uidel:pfx'hstr|lstr'") + _ini("uidel:'hstr|lstr'sfx") + _ini("uidel:'hstr|lstr'") + _ini("uidel:pfx'hstr'sfx") + _ini("uidel:pfx'hstr'") + _ini("uidel:'hstr'sfx") + _ini("uidel:'hstr'") + _conl(); _conl("########################################################################################"); _conl() + _ini("pfx'hstr|lstr'sfx") + _ini("pfx'hstr|lstr'") + _ini("'hstr|lstr'sfx") + _ini("'hstr|lstr'") + _ini("pfx'hstr'sfx") + _ini("pfx'hstr'") + _ini("'hstr'sfx") + _ini("'hstr'") + _conl(); _conl("########################################################################################"); _conl() + _ini("uidel:pfx'`cntptr'sfx") + _ini("uidel:pfx'`cntptr'") + _ini("uidel:'`cntptr'sfx") + _ini("uidel:'`cntptr'") + _conl(); _conl("########################################################################################"); _conl() + _ini("pfx'`cntptr'sfx") + _ini("pfx'`cntptr'") + _ini("'`cntptr'sfx") + _ini("'`cntptr'") + _conl(); _conl("########################################################################################"); _conl() + _ini("uidel:pfx'^chrptr'sfx") + _ini("uidel:pfx'^chrptr'") + _ini("uidel:'^chrptr'sfx") + _ini("uidel:'^chrptr'") + _conl(); _conl("########################################################################################"); _conl() + _ini("pfx'^chrptr'sfx") + _ini("pfx'^chrptr'") + _ini("'^chrptr'sfx") + _ini("'^chrptr'") + _conl(); _conl("########################################################################################"); _conl() + + + } + +func _rtn(v,A) { + _conl(); _conline(_val(v) " : " _val(A)); _conl() + + _rtn2(v,A) + + _conl() } + +func _rtn2(v,A, r,t) { + + r=isarray(A) ? _typa(v,A) : _typ(v) + + if ( "`">_t0 && _t0 ) _conl("ggggg") + + t=(r ? "TRUE" : "FALSE") " / " (r>0 ? r ">0" : r "!>0") " / " (r+0>0 ? r "+0>0" : r "+0!>0") " / " (r+0!=r ? r "+0!=" r : r "+0==" r) " / " (r && "`">r ? "'`'>" r " && " r : "!('`'>" r " && " r")") + + _conl("`" r "' : " t) + + return r } + + + + +func _typ(p) { + return _t0=isarray(p) ? "#" : p==0 ? p=="" ? 0 : p in _CLASSPTR ? "`" : p ? 3 : 4 : p in _CLASSPTR ? "`" : p+0==p ? 5 : p ? 3 : 2 } + +func _typa(p,A) { + + return _t0=isarray(p) ? "#" : p==0 ? p=="" ? 0 : p in A ? "`" : p ? 3 : 4 : p in A ? "`" : p+0==p ? 5 : p ? 3 : 2 } + +# # - p is array +# ` - p is ptr detected in array _CLASSPTR(for _typ); or p is ptr detected in array A(for _typa) +# 0 - p is undefined + +# 2 - p is string=="" +# 3 - p is string!="" +# 4 - p is number 0 +# 5 - p is any number except 0(positive and negative) + +# str: _typ(p)+0 !_typ(p)+0 +# str/ptr _typ(p)>0 _typ(p)<1 +# str/arr "`">_typ(p0) && _t0 +# str/ptr/arr _typ(p) !_typ(p) +# ptr _typ(p)=="`" _typ(p)<"`" ? +# ptr/arr _typ(p)+0!=_t0 +# arr _typ(p)=="#" _typ(p)>"#" ? + +func zorr(A,i, r) { + if ( i in A ) _conl("`" i "' in A"); else _conl("`" i "' not in A") + r=A[i]=="" && A[i]==0 + _conl("A[" i "] status is " r) + return + + a=a+-a + _conl("``````````````" a "''''''''''''''''") } + + + + + + + + + + + + + + + + + + + + + +func test_splitstr(A) { + + AA0[-1]="huj"; AA0["A"]="pizda"; AA0[1]="zhopa" + delete AB0[AB0[""]=""] + AC0[-1]="HUJ"; AC0["A"]="PIZDA"; AC0[1]="ZHOPA" + + _SPLITSTRB0["1"] + + + wonl="" + _tstv(0,A,0,"_tstv") + _conl(wonl) + _wrfile("wonl.out",wonl) + } + + + +func _tstv(p,A,r,f) { + + if ( f=="" ) f="tst_splitstr" + + @f(_NOP,A,p) + @f(AA0,A,p) + @f(AB0,A,p) + @f(AC0,A,p) + @f("",A,p) + @f("a",A,p) + @f("´a",A,p) + @f("´",A,p) + @f("a´´´,ba´´´,",A,p) + @f("´,",A,p) + + @f(",",A,p) + @f("´a,",A,p) + @f("ab,",A,p) + @f("ab,´",A,p) + @f("´a´,,ba",A,p) + @f(",a,,b´,c,,´a,,´,,,",A,p) + + } + +func _wonl(t) { + wonl=wonl _ln(t) } + +func _wonline(t) { + wonl=wonl _ln(substr(" _ " t " _____________________________________________________________________________________________________________________________________",1,126)) } + +func tst_splitstr(t,A,R, r) { + delete A; A["not cleared"] + _wonl() + _wonline("_splitstr(" (isarray(t) ? "ARR" (length(t)>0 ? "#" (t[1]!="zhopa" ? "U" : "l") : "") : _val0(t)) ",A" (isarray(R) ? ", ARR" (length(R)>0 ? "#" (R[1]!="zhopa" ? "U" : "l") : "") : ", " _val0(R)) "):") + + _wonl( _val0(r=_splitstr(t,A,R))) + _wonl("arrary A:"); _wonl(_dumparr(A)) + return r } + + + #_____________________________________________________________________________ + func _val(v,t) { if ( isarray(v) ) return _dumparr(v) _ln(t) + if ( v==0 && v=="" ) return _ln("- (ERRNO=" ERRNO ")") _ln(t) + return _ln(v "'") _ln(t) } + + #_____________________________________________________________________________ + func _val0(v) { if ( isarray(v) ) return _dumparr(v) + if ( v==0 && v=="" ) return "-" + return "\"" v "\"" } + +# add to _dumparr: checking that if element is undefined + + + + + + + + + + + + + + + + + + +#_______________________________________________________________________ +func _cfguid(p,optr,pfx,sfx,hstrcnt,lstrchr) { #################### 0 # + delete _UIDOBL[p] + if ( _isptr(optr) ) { if ( optr==p ) { delete _UIDOBLV[p]; delete _UIDOBLV[_UIDOBLV[_UIDOBL[p]=p][""]=p][""] } + else if ( optr in _UIDOBL ) _UIDOBL[p]=_UIDOBL[optr] } + _UIDPFX[p]=_istr(pfx) ? pfx : ""; _UIDSFX[p]=_istr(sfx) ? sfx : "" + if ( _isptr(hstrcnt) ) { if ( hstrcnt!=p ) { _UIDCHR[p]=_UIDCHR[_UIDCNT[p]=_UIDCNT[hstrcnt]]; return p } hstrcnt=_NOP } + _UIDCNTL[_UIDCNT[p]=p]=_cfguidchr(p,hstrcnt,lstrchr); return p } + #_____________________________________________________ + func _cfguidchr(p,h,l, H,L) { + if ( _isptr(l) ) { if ( l!=p ) return _UIDCHR[p]=_UIDCHR[l]; _UIDCHR[p]=p; l=_NOP } + _UIDCHR[p]=p + _splitstr(H,h,_UIDCHRH[_classys]); _splitstr(L,l,H) + delete _UIDCHRH[_UIDCHRH[p][""]=p][""]; delete _UIDCHRL[_UIDCHRL[p][""]=p][""] + _cfguidh(p,H,L); return _cfguidl(p,L,L) } + #_______________________________________________ + func _cfguidh(p,H,L, hi,h,li) { for ( hi=1; hi in H; hi++ ) { h=H[hi] + for ( li=1; li in L; li++ ) _UIDCHRH[p][h L[li]] } } + func _cfguidl(p,H,L, hi,h,hl,li) { for ( hi=1; hi in H; hi++ ) { h=H[hi] + for ( li=1; li in L; li++ ) hl=_UIDCHRL[p][hl]=h L[li] } + return hl } + +# problem configuring uid by array charset: i can' understand what format of the array: possibly - remove array support +# after removal of array format detection: there is unfinished conflicts: it is possible to totally remove array uid-gen initialization + + #_____________________________________________________ + BEGIN { _inituidefault() } + func _inituidefault( h,l,H,L) { + _classys ="" + + delete _UIDOBLV[_UIDOBLV[_UIDOBL[_classys]=_classys][""]=_classys][""] + _UIDPFX[_classys]; _UIDSFX[_classys] + _UIDCNT[_classys]=_UIDCHR[_classys]=_CLASSPTR[_classys]=_classys + + h ="AB" + l =h "01" + + _splitstr(H,h); _splitstr(L,l); + delete _UIDCHRH[_UIDCHRH[_classys][""]=_classys][""]; delete _UIDCHRL[_UIDCHRL[_classys][""]=_classys][""] + _UIDCNTH[_classys]; _cfguidh(_classys,H,L); _UIDCNTL[_classys]=_cfguidl(_classys,L,L) + + _CLASSFN[_classys]["del"] ="_tobjDEL" + _CLASSFN[_classys]["new"] ="_tobjNEW" + _drawuid(_classys) + _initspecialuid() } + #_________________________________________ + func _initspecialuid() { + _NOINDEX =_getuid() + _LEN =_getuid() + _PTR =_getuid() + _NAME =_getuid() + _TYPE =_getuid() + _FORMAT =_getuid() + + } +#_______________________________________________________________________ +func _getuid(p) { ################################################# 1 # + if ( p in _UIDOBL ) { for ( _tptr in _UIDOBLV[_getuida0=_UIDOBL[p]] ) { delete _UIDOBLV[_getuida0][_tptr]; _CLASSPTR[_tptr]=p; return _tptr } } + _CLASSPTR[_tptr=_UIDPFX[p] _getuid_i0(_UIDCNT[p],_UIDCHRL[_tptr=_UIDCHR[p]],_UIDCHRH[_tptr]) _UIDSFX[p]]=p + return _tptr } + #_____________________________________________________ + func _getuid_i0(p,UL,UH) { if ( ""==_tptr=UL[_UIDCNTL[p]] ) { for ( _tptr in UH ) { delete UH[_tptr]; return (_UIDCNTH[p]=_tptr) (_UIDCNTL[p]=UL[""]) } + _fatal("out of UID") } + return _UIDCNTH[p] (_UIDCNTL[p]=_tptr) } +#_______________________________________________________________________ +func _deluid(p) { ################################################# 1 # + if ( p in _CLASSPTR ) { _deluida0=_CLASSPTR[p] + if ( _deluida0 in _UIDOBL ) _UIDOBLV[_UIDOBL[_deluida0]][p] } + delete _CLASSPTR[p]; return _deluida0 } + +func test_uid( p,i) { + #test_cfg() + #return + + _fclass=_cfguid(p=_getuid(_classys),p,"pfx","sfx","abc") + #_fclass=_cfguid(p=_getuid(_classys),_NOP,_NOP,_NOP,"",_classys) + _conl("_fclass uid: " _getuid(_fclass)); _drawuid(_fclass) + _conl("_classys uid: " _getuid(_classys))_drawuid(_classys) + for ( i=1; i<81; i++ ) _conl(i ": " _getuid(_fclass)) + _drawuid(_fclass) + } + + +func test_cfg( p,z,AA0,a) { + AA0[1] + + _fclass=_cfguid(p=_getuid(_classys),_NOP,_NOP,_NOP,_NOP,_classys); _conl(); _conline(); _conl(); _drawuid(p) + _fclass=_cfguid(p=_getuid(_classys),AA0,AA0,AA0,AA0,_classys); _conl(); _conline(); _conl(); _drawuid(p) + a=_getuid(z=_fclass=_cfguid(p=_getuid(_classys),p,"<",">","ab","cd")); _conl("### " a "########"); _conline(); _conl(); _drawuid(p) + a=_getuid(_fclass=_cfguid(p=_getuid(_classys),z,0,0,_NOP,z)); _conl("### " a "########"); _conline(); _conl(); _drawuid(p) + a=_getuid(_fclass=_cfguid(p=_getuid(_classys),z,"^","$",z,_classys)); _conl("### " a "########"); _conline(); _conl(); _drawuid(p) + _fclass=_cfguid(p=_getuid(_classys),"oblptr","pfx","sfx","abcd"); _conl(); _conline(); _conl(); _drawuid(p) + + + _conl("```````````````````" z "'''''''''" ( _isptr(z) ? " ptr" : " not ptr")) + _drawuid(z) + } + + + + + + + + + + + + + + +func _drawuid(p, cn,ch,o) { + _conl("uid: " p) + _conl("\toblptr: " (p in _UIDOBL ? _UIDOBL[p] "'" : "-")) + if ( p in _UIDOBL ) { if ( !_isptr(o=_UIDOBL[p]) ) _conl(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> oblptr not pointer") + if ( !isarray(_UIDOBLV[o]) ) _conl(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> no OBLV array at ptr") } + + _conl("\tprefix: " (p in _UIDPFX ? _UIDPFX[p] "'" : "-")) + _conl("\tsuffix: " (p in _UIDSFX ? _UIDSFX[p] "'" : "-")) + _conl("\tcounters: " (cn=p in _UIDCNT ? _UIDCNT[p] "'" : "-")) + if ( cn!="-" ) { _conl("\t\tcntrL: " _UIDCNTL[_UIDCNT[p]] "'") + _conl("\t\tcntrH: " _UIDCNTH[_UIDCNT[p]] "'") } + _conl("\tcharset: " (ch=p in _UIDCHR ? _UIDCHR[p] "'" : "-")) + if ( ch!="-" ) { _conl("chrH: "); _conl(_dumparr(_UIDCHRH[_UIDCHR[p]])); _conl() + _conl("chrL: "); _conl(_dumparr(_UIDCHRL[_UIDCHR[p]])); _conl() } + + + } + + + + + + + + + + + + + + + + + + + + + + + + +#_______________________________________________________________________ +func _splitstr(A,t,r) { ########################################### 1 # + if ( _istr(t) ) { if ( _splitstr_i0(A,t)>0 ) return _splitstrp0 + if ( _istr(r) ) return _splitstr_i0(A,r) } + else { if ( it=="A" ) if ( length(t)>0 ) { _movarr(A,t); return 0-length(A) }; _istr(r) } + if ( it=="A" ) if ( length(r)>0 ) { _movarr(A,r); return 0-length(A) } } + #_____________________________________________________ + func _splitstr_i0(A,t, C) { + if ( 2>_splitstrq0=patsplit(t,_SPLITSTRA0,/([^,\xB4]*\xB4.)*[^,\xB4]*/) ) _splitstrq0=split(gensub(/\xB4(.)/,"\\1","G",t),_SPLITSTRA0,"") + delete A; _splitstri0=_splitstrp0=0 + while ( _splitstri0++<_splitstrq0 ) { + if ( (t=gensub(/\xB4(.)/,"\\1","G",_SPLITSTRA0[_splitstri0])) in C || t=="" ) continue + C[A[++_splitstrp0]=t] } + return _splitstrp0 } + +# there is problem with string's format: i can;t easilly merge 2 charsets: comma-divided and every-char-divided strings + +#_______________________________________________________________________ +func _isptr(p) { ################################################## 1 # + if ( isarray(p) ) { is=_NOP; it="A"; return 0 } + is=p; if ( p==0 && p=="" ) { it="-"; return 0 } + if ( p in _CLASSPTR ) return it="P" + it="S"; return 0 } +#_______________________________________________________________________ +func _istr(p) { ################################################### 1 # + if ( isarray(p) ) { is=_NOP; it="A"; return 0 } + is=p; if ( p==0 && p=="" ) { it="-"; return 0 } + return it=p=="" ? "s" : "S" } + +#______________________________________________________________________________________________ +func _START( t,i,A) { ######################################################################### + _torexp_init() + test_uid() + return + _conl(patsplit("a,b,c",A,/[^,]/,B)) + test_splitstr(); return + + + A[""]; _CLASSPTR["ptr"]; ALTARR["ptra"] + _conl(_dumparr(SYMTAB)) + BB[1]=_NOP + zorr(1,2,3,4,5,6) + zorr(BB,1) + + + _rtn() + _rtn("") + _rtn(0); _rtn("0") + _rtn(1); _rtn("1") + _rtn(-1); _rtn("-1") + _rtn("huj") + _rtn("ptr") + _rtn("ptra",ALTARR) + _rtn(ALTARR) + _rtn(ALTARR,ALTARR) + + + return + _tstini() + + return + + _splitpath_test() +# _split_regpath() + return + + hh="CPU" + _conl("go1!") + _conl(_var(_sharepath(hh,"gdfsgdsgsd sdgsdighjui teretiewrotrewut 345345345 rtjtireutireu huj"))) + _conl("go2!") + _conl(_var(_sharelist(AAA,hh),_dumparr(AAA))) + _conline() + A[1]="h" + A[3]="j" + t="pizda" + if ( match(t,/^pi(Z)da/,A) ) _conl("match") + else _conl("not match") + _conl(_dumparr(A)) + return + + + + + + + + _pathSMA="C:\\Program Files\\Altiris\\Altiris Agent\\" + + + DSPlugInPath =_pathSMA "Agents\\Deployment\\Agent\\" + DSAutoPath =_pathSMA + + if ( !_sysinfo(_SYS,_hostname) ) _fatal("_sysinfo: unknown error") + _REG[""]; delete _REG[""] + _servoutput=_CHR["EOL"] _cmd("sc query state= all") + + _dsbasepath="\\\\CPU\\CPU\\DEV\\PROJECT\\_DS\\" + _rdreg(_REG,"HKEY_LOCAL_MACHINE\\SOFTWARE\\Altiris") + _wrfile("rego.txt",_dumparr(_REG)); _conl("fF") + #_______________________________________________________________________ + + c=_getreg_i1(DDD,"HKEY_LOCAL_MACHINE\\SOFTWARE\\Altiris\\Altiris Agent\\Plugin Objects\\„~.*”Install path",_REG) +#_________________________________________________________________________________________ + pp=_n("NAME","NS") + #pp=_n() + #___________________________________________________________________________________ + p=_defsolution(pp,"DS Plug-in","HKEY_LOCAL_MACHINE\\SOFTWARE\\Altiris\\Altiris Agent\\Plugin Objects\\Agents\\") + ClientConfiguration =_defdll(p,"Client Configuration","ClientConfiguration") + ClientImagingPrep =_defdll(p,"Client Inaging Preparation","ClientImagingPrep") + ClientImaging =_defdll(p,"Client Imaging","ClientImaging") + ClientPCT =_defdll(p,"Client PCT","ClientPCT") + ClientRebootTo =_defdll(p,"Client Reboot To","ClientRebootTo") + DeploymentAgent =_defdll(p,"Deployment Agent","Deployment Agent") + DeploymentSolutionBaseAgent =_defdll(p,"Deployment Solution Base Agent","Deployment Solution Base Agent") + + ClientBCDEdit =_defile(p,"Client BCD Edit","ClientBCDEdit.dll") + ClientCopyFile =_defile(p,"Client Copy File","ClientCopyFile.dll") + ClientPreImage =_defile(p,"Client Pre Image","ClientPreImage.dll") + ClientRebootTo =_defile(p,"Client Reboot To","ClientRebootTo.dll") + _defile(p,"ConfigService.exe","ConfigService.exe","") + _defile(p,"config.dll","config.dll","") + + _defsrv(p,"DS Plug-in Service","Altiris Deployment Solution - System Configuration") + _defreg(p,"Deployment Agent Path","HKEY_LOCAL_MACHINE\\SOFTWARE\\Altiris\\Deployment\\AgentInstallPath.STR") + _defile(p,"Altiris_DeploymentSolutionAgent_7_1_x86.msi", _SYS["OSArchitecture"]=="64-bit" ? "C:\\Program Files\\Altiris\\Altiris Agent\\Agents\\SoftwareManagement\\Software Delivery\\{9D76E4CA-377A-472D-A82E-EDAD77E7E4ED}\\cache\\Altiris_DeploymentSolutionAgent_7_1_x64.msi" : "C:\\Program Files\\Altiris\\Altiris Agent\\Agents\\SoftwareManagement\\Software Delivery\\{4B747D25-612F-48FC-B6B5-9916D1BB755C}\\cache\\Altiris_DeploymentSolutionAgent_7_1_x86.msi","") + _defdir(p,"Deployment Folder",a=gensub(/[^\\]*$/,"",1,_rdsafe(_REG,"HKEY_LOCAL_MACHINE\\SOFTWARE\\Altiris\\Deployment\\AgentInstallPath.STR","C:\\Program Files\\Altiris\\Altiris Agent\\Agents\\Deployment\\Agent\\"))) + + #___________________________________________________________________________________ + p=_defsolution(pp,"DS Auto","HKEY_LOCAL_MACHINE\\SOFTWARE\\Altiris\\Altiris Agent\\Plugin Objects\\Agents\\") + _defdir(p,"C:\\Boot\\Altiris\\iso\\boot\\fonts\\","C:\\Boot\\Altiris\\iso\\boot\\fonts\\") + _defdir(p,"C:\\Boot\\Altiris\\iso\\sources\\","C:\\Boot\\Altiris\\iso\\sources\\") + + _defile(p,"C:\\Boot\\Altiris\\iso\\autoinst.exe","C:\\Boot\\Altiris\\iso\\autoinst.exe","") + _defile(p,"C:\\Boot\\Altiris\\iso\\autoinst.ini","C:\\Boot\\Altiris\\iso\\autoinst.ini","") + _defile(p,"C:\\Boot\\Altiris\\iso\\autoutil.exe","C:\\Boot\\Altiris\\iso\\autoutil.exe","") + _defile(p,"C:\\Boot\\Altiris\\iso\\autoutil.ini","C:\\Boot\\Altiris\\iso\\autoutil.ini","") + _defile(p,"C:\\Boot\\Altiris\\iso\\bcdedit.exe","C:\\Boot\\Altiris\\iso\\bcdedit.exe","") + _defile(p,"C:\\Boot\\Altiris\\iso\\bootmgr","C:\\Boot\\Altiris\\iso\\bootmgr","") + _defile(p,"C:\\Boot\\Altiris\\iso\\bootsect.exe","C:\\Boot\\Altiris\\iso\\bootsect.exe","") + + _defreg(p,"Deployment Automation reg.File","HKEY_LOCAL_MACHINE\\SOFTWARE\\Altiris\\AutoUtil\\File.XSZ","autoutil.exe") + _defreg(p,"Deployment Automation reg.Path","HKEY_LOCAL_MACHINE\\SOFTWARE\\Altiris\\AutoUtil\\Path.XSZ","%systemdrive%\\boot\\altiris\\iso") +#_________________________________________________________________________________________ + + _check(pp) +#_________________________________________________________________________________________ + + _conl(_report(pp)); _wrfile("report.txt",_report(pp)) +}#______________________________________________________________________________________________ +func _END() { ################################################################################# + +}#______________________________________________________________________________________________ +func _EXIT() { ################################################################################ + +}#____________________________________________________________________________________________________ +func _check(p) { #################################################################################### + _dll_check(p) + _file_check(p) + _serv_check(p) + _reg_check(p) } +#_________________________________________________________________________________________ +func _report(p) { ####################################################################### + _report_t0=_reportparnt=""; _report_i0(p); _tframe("_report_i0",p) + return _report_t0 } + + func _report_i0(p,p0,p1,p2) { if ( p in _tPARENT ) { + if ( _reportparnt!=_reportparnt=_tPARENT[p] ) { + _report_t0=_report_t0 _ln() _ln((z="_ " _[_tPARENT[p]]["NAME"] " ") _getchrln("_",_CON_WIDTH-length(z)-2)) _ln(_getchrln("#",_CON_WIDTH-2)) _ln() } } + if ( "ERROR" in _[p] ) { _report_t0=_report_t0 _reporterr(p,_[p]["ERROR"])} + if ( "REPORT" in _[p] ) { _report_t0=_report_t0 _ln(_[p]["REPORT"]) } } +#___________________________________________________________________________________ +func _creport(p,t,f, z) { + _[p]["REPORT"]=_[p]["REPORT"] _ln(t (f=="" ? "" : ": " f)) } +#___________________________________________________________________________________ +func _reporterr(p,t3, pp,t,t2) { + t=""; pp=p + do { "NAME" in _[pp] ? t=_[pp]["NAME"] ": " t : "" } while ( pp=_rPARENT(pp) ) + if ( match(t3,/\x00/) ) return substr(t3,1,RSTART-1) t substr(t3,RSTART+1) + return t t3 } +#___________________________________________________________________________________ +func _dllerr(p,t,f) { if ( t!~/\x00/ ) t="ERROR: \x00" t + _errfl=1; _[p]["ERROR"]=_[p]["ERROR"] _ln(t (f=="" ? "" : ": " f)) } + + +#_______________________________________________________________________________________________ +func _defsolution(pp,n,rn, p) { ############################################################### + _[p=_wLCHLD(pp,_n("TYPE","solution"))]["NAME"]=n + _[p]["REGPATH"]=rn + _[p]["ERRHOST"]=pp + return p } +#_________________________________________________________________________________________ +func _defreg(pp,n,f,v, p) { ############################################################# + _[p=_wLCHLD(pp,_n("TYPE","defreg"))]["NAME"]=n + _[p]["REGPATH"]=f; if ( !(v==0 && v=="") ) _[p]["VALUE"]=v } + #_______________________________________________________________________ + func _reg_check(p) { _tframe("_reg_check_i0",p,p) } + #_______________________________________________ + func _reg_check_i0(p,pp,p1,p2) { + if ( _[p]["TYPE"]=="defreg" ) { + if ( _[p]["REGPATH"] in _REG ) { + if ( "VALUE" in _[p] ) { if ( _[p]["VALUE"]==_REG[_[p]["REGPATH"]] ) _creport(p,substr("OK: REGENTRY MATCH(==" _[p]["VALUE"] "): " _[p]["REGPATH"],1,126)) + else _dllerr(p,substr("REGENTRY NOT MATCH(!=" _[p]["VALUE"] "): " _[p]["REGPATH"],1,126)) } + else if ( _VAR[_[p]["REGPATH"]]==_REG[_[p]["REGPATH"]] ) _creport(p,substr("OK: REGPATH MATCH(==" _VAR[_[p]["REGPATH"]] "): " _[p]["REGPATH"],1,126)) + else _dllerr(p,substr("REGPATH NOT MATCH(!=" _VAR[_[p]["REGPATH"]] "): " _[p]["REGPATH"],1,126)) } + else { _dllerr(p,substr("REGPATH NOT FOUND: " _[p]["REGPATH"],1,126)) } } } +#_________________________________________________________________________________________ +func _defdir(pp,n,f,v, p) { ############################################################# + _[p=_wLCHLD(pp,_n("TYPE","defdir"))]["NAME"]=n + _[p]["DIR"]=f + return p } +#_________________________________________________________________________________________ +func _defile(pp,n,f,v, p) { ############################################################# + _[p=_wLCHLD(pp,_n("TYPE","defile"))]["NAME"]=n + _[p]["FILE"]=f; if ( !(v==0 && v=="") ) _[p]["RQVERSION"]=v + return p } + #_______________________________________________________________________ + func _file_check(p) { if ( 1 || "AGENT" in _[p] ) { _tframe("_file_check_i0",p,p) } } + #_______________________________________________ + func _file_check_i0(p,pp,p1,p2, f,v) { + if ( _[p]["TYPE"]=="defile" ) { + f=_[p]["FILE"] + f=(match(f,/^.:/) ? "" : _[_[pp]["AGENT"]][".Install Path"] "\\") _[p]["FILE"]; if ( "RQVERSION" in _[p] ) v=_[p]["RQVERSION"]; else v=_[pp][".Product Version"] + ERRNO=""; if ( _th1(_[p]["DATA"]=_rdfile(f),ERRNO) ) { delete _[p]["DATA"]; return _dllerr(p,"read file: " ERRNO,f) } + if ( v!="" && v!=(_[p]["VERSION"]=_getfilever(f)) ) return _dllerr(p," file version mismatch: ==`" _[p]["VERSION"] "'; !=`" v "'",f) + _creport(p,substr("OK: FILE DETECTED" (v=="" ? "" : "(" v ")") ": " f,1,122)) } + else if ( _[p]["TYPE"]=="defdir" ) { if ( _filexist(f=_[p]["DIR"]) ) _creport(p,substr("OK: DIR DETECTED: " f,1,112)) + else _dllerr(p,"directory " f " is not detected") } } +#_________________________________________________________________________________________ +func _defsrv(pp,n,f,v, p) { ############################################################# + _[p=_wLCHLD(pp,_n("TYPE","defsrv"))]["NAME"]=n + _[p]["SERVNAME"]=f + return p } + #_______________________________________________________________________ + func _serv_check(p) { _tframe("_serv_check_i0",p,p) } + #_______________________________________________ + func _serv_check_i0(p,p0,p1,p2,p3, i,q,c) { + if ( _[p]["TYPE"]=="defsrv" ) { + i=IGNORECASE; IGNORECASE=1 + if ( match(_servoutput,roi="\\012DISPLAY_NAME: " _torexp(_[p]["SERVNAME"])) ) { _creport(p,"OK: SERVICE DETECTED: " substr(_[p]["SERVNAME"],1,112)) } + else { _dllerr(p,"service " _[p]["SERVNAME"] " not detected") } } + IGNORECASE=i } +#_________________________________________________________________________________________ +func _defdll(pp,n,rn, p) { ############################################################## + _[p=_wLCHLD(pp,_n("TYPE","defdll"))]["NAME"]=n + _[p]["REGPATH"]=_[pp]["REGPATH"] rn + _[p]["ERRHOST"]=pp + return p } + #_______________________________________________________________________ + func _dll_check(pp) { _dllchktv=""; _missfl=1 + _tframe("_dll_check_i0",pp,_REG,pp) #also check that all dll have same version; also check that all dlls have success and then report that DS plug-in version n - installed + if ( 1 || "AGENT" in _[pp] ) { + if ( _dllchktv!=_[pp][".Product Version"] ) _dllerr(_[pp]["AGENT"],"agent version (" _[pp][".Product Version"] ") do not match all lib versions: " _dllchktv "'") } + else { if ( !_missfl ) _creport(pp,"agent not detected in registry") + else { _dllerr(pp,"agent not detected in registry but some registry entries exist:") + _tframe("_dll_check_i1",pp,pp) } } } + #_______________________________________________ + func _dll_check_i1(p,pp,p1,p2,p3, i) { + if ( _[p]["TYPE"]=="defdll" ) { + for ( i in _[p] ) { if ( i~/^\./ ) _dllerr(pp," " _[p]["REGPATH"] "\\" substr(i,2)) } } } + #_______________________________________________ + func _dll_check_i0(p,R,pp,p2, i,i2,r,f,v,rs,d,tv,tf) { + if ( _[p]["TYPE"]=="defdll" ) { + r=toupper(_[p]["REGPATH"]); rs=0; tf=0; tv="" + for ( i in R ) { + if ( toupper(substr(i,1,length(r)))==r ) { if ( (_chka0=substr(i,1+length(r),1))=="" || _chka0=="\\" ) { + rs=1; _missfl=1; _[p]["." substr(gensub(/\....$/,"",1,i),i2=2+length(r),length(i)-i2+1)]=R[i] + if ( chka0!="" ) rs=1 } } } #{ rs=_missfl=1; _[p]["." gensub(/^([^\\]+\\)+(.*)\..../,"\\2","G",i)]=R[i] } } + if ( rs ) { if ( (i=".Install Path") in _[p] && (i=".Product Version") in _[p] ) { _[p]["STATUS"]="PRESENT" + f=_[p][".Install Path"]; v=_[p][".Product Version"] + if ( !(".Module" in _[p]) ) { _[pp][".Product Version"]=v; _VAR["HKEY_LOCAL_MACHINE\\SOFTWARE\\Altiris\\Deployment\\AgentInstallPath.STR"]=f; _[pp]["AGENT"]=p; _creport("OK: DLL DETECTED(" v "): " substr(_[p]["NAME"],1,112)) } + else { if ( _dllchktv=="" ) _dllchktv=v + else if ( v!=_dllchktv ) return _dllerr(p,"different versions detected: " _dllchktv "!=" v "'") + ERRNO=""; if ( _th1(_[p]["DATA"]=_rdfile(f),ERRNO) ) { delete _[p]["DATA"]; return _dllerr(p,"read lib: " ERRNO,f) } + if ( v!=(_[p]["VERSION"]=_getfilever(f)) ) return _dllerr(p,"library file version mismatch: ==`" _[p]["VERSION"] "'; !=`" v "'",f) + _creport(p,"OK: LIBRARY DETECTED(" v "): " substr(f,1,100)) } } + else { tf=1; _dllerr(p,"registry corrupt: `" i "' not present") } } + else _[p]["STATUS"]="MISSED" } } +#_____________________________________________________________________________________________________ +###################################################################################################### + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +func _rdsafe(A,i,d) { if ( i in A ) return A[i]; return d } + + + + + + + + + + + + + + + + #_____________________________________________________________________________ + func _var(v,t) { if ( isarray(v) ) return _dumparr(v) _ln(t) + if ( v==0 && v=="" ) return _ln("- (ERRNO=" ERRNO ")") _ln(t) + return _ln(v "'") _ln(t) } + #_____________________________________________________________________________ + func _dumpval(v,n) { + _dumpstr=_dumpstr (v=_ln((n==0 && n=="" ? "RET" : n) ": " (v==0 && v=="" ? "-" : v "'"))) + return v } + + +func _torexp(r) { return _subseqon(_TOREXPB0,gensub(/(^[ \t]+)|(([ \t]*(\\)+)+[ \t]*)|([ \t]+$)/,"\\4","G",_subseqoff(r,_TOREXPB0)),_TOREXPFN) } + + + #_______________________________________________ + func _torexp_init() { _TOREXPFN[""] ="_strtorexp" + _TOREXPFN["~"] ="_torexp_rexp" + _TOREXPFN["="] ="_strtorexp" + _TOREXPFN[">"] ="_torexp_cmdstr" + _TOREXPFN["#"] ="_torexp_fmask" + _TOREXPFN["\""] ="_torexp_dqstr" + _TOREXPFN["'"] ="_torexp_sqstr" + } + +func _subseqoff(r,B) { patsplit(r,B,/\x84[^\x94]*\x94/); return gensub(/\x84[^\x94]*\x94/,"\x84","G",r) } + +func _subseqon(B,r,F, f,s,e,q,i,A) { + q=split(r,A,/\x84/); r=""; f=F[""] + for ( i=1; i&1" + if ( match(c=_cmd(c),/\x0AShare[^\x0A]*Remark/) ) { + gsub(/(^[^-]*\x0D?\x0A-+\x0D?\x0A[ \t]*)|(\x0D?\x0AThe command completed successfully.*$)/,"",c) + l=RLENGTH-7; split(c,A,/([ \t]*\x0D?\x0A)+[ \t]*/) + for ( c in A ) if ( match(A[c],/((([^ \t:]+[ \t]+)*[^ \t:]+)[ \t]+)([A-Za-z])[ \t]*:/,B) && ++q ) D[B[2]]=A[c]~/\.\.\.$/ ? _sharepath(h,B[2]) : gensub(/[ \t\\\/]*$/,"\\\\",1,substr(A[c],1+B[1,"length"],l-B[1,"length"])) + return q } + return _rmtsharerr(h,c) } +#_____________________________________________________________________________ +func _sharepath(h,s, A) { ################################################### + s=_sharextool " \\\\" (h=="" ? h=ENVIRON["COMPUTERNAME"] : h) "\\\"" s "\" 2>&1" + if ( match(s=_cmd(s),/\x0APath[ \t]+([^\x0D\x0A]+)/,_SHAREPATHA0) ) return gensub(/[ \t\\\/]*$/,"\\\\",1,_SHAREPATHA0[1]) + return _rmtsharerr(h,s) } + #___________________________________________________________ + func _rmtsharerr(h,t) { gsub(/[\x0D\x0A]+/,"",t) + if ( t~/^The command failed: 53/) ERRNO="host not found: \\\\" h + else ERRNO=t ": \\\\" h } + #_____________________________________________________ + BEGIN { _initshare() } + func _initshare() { _sharextool ="\\\\CPU\\eGAWK\\LIB\\_share\\_share.exe" } +#_________________________________________________________________________________________ +########################################################################################## + + + + + + + + +func _extfn_init() { ############################################################## + + _formatstrs_init(); _formatstrd_init(); _formatrexp_init() + + _unformatstr_init() + + _mac_init() + +}#__________________________________________________________________________________ +#################################################################################### + + + + +#___________________________________________________________________________________ +func _formatstrs(t) { _formatstrq0=split(t,_FORMATSTRA,/['\x00-\x1F\x80-\xFF]/,_FORMATSTRB); _formatstrs0="" + for ( t=1; t<_formatstrq0; t++ ) _formatstrs0=_formatstrs0 _FORMATSTRA[t] _FORMATSTRSESC[_FORMATSTRB[t]] + return _formatstrs0 _FORMATSTRA[t] } + #___________________________________________________________ + func _formatstrs_init() { _defescarr(_FORMATSTRSESC,"[\\x00-\\x1F\\x80-\\xFF]",_QASC) + _defescarr(_FORMATSTRSESC,"[\\\\']","\\") + _FORMATSTRSESC["\t"]="\\t" } +#_____________________________________________________________________________ +func _formatstrd(t) { _formatstrq0=split(t,_FORMATSTRA,/["\x00-\x1F\x80-\xFF]/,_FORMATSTRB); _formatstrs0="" + for ( t=1; t<_formatstrq0; t++ ) _formatstrs0=_formatstrs0 _FORMATSTRA[t] _FORMATSTRDESC[_FORMATSTRB[t]] + return _formatstrs0 _FORMATSTRA[t] } + #___________________________________________________________ + func _formatstrd_init() { _defescarr(_FORMATSTRDESC,"[\\x00-\\x1F\\x80-\\xFF]",_QASC) + _defescarr(_FORMATSTRDESC,"[\\\\\"]","\\") + _FORMATSTRDESC["\t"]="\\t" } +#_____________________________________________________________________________ +func _formatrexp(t) { _formatstrq0=split(t,_FORMATSTRA,/[\/\x00-\x1F\x80-\xFF]/,_FORMATSTRB); _formatstrs0="" + for ( t=1; t<_formatstrq0; t++ ) _formatstrs0=_formatstrs0 _FORMATSTRA[t] _FORMATREXPESC[_FORMATSTRB[t]] + return _formatstrs0 _FORMATSTRA[t] } + #___________________________________________________________ + func _formatrexp_init() { _defescarr(_FORMATREXPESC,"[\\x00-\\x1F\\x80-\\xFF]",_QASC) + _defescarr(_FORMATREXPESC,"\\/","\\") + _FORMATREXPESC["\t"]="\\t" } +#___________________________________________________________ +func _defescarr(D,r,S, i,c,t) { if ( isarray(S) ) { for ( i=0; i<256; i++ ) { if ( (c=_CHR[i])~r ) { D[c]="\\" S[c]; t=t c } + else if ( D[c]=="" ) D[c]=c } } + else { for ( i=0; i<256; i++ ) { if ( (c=_CHR[i])~r ) { D[c]=S c; if ( S!="" ) t=t c } + else if ( D[c]=="" ) D[c]=c } } return t } + + +#___________________________________________________________________________________ +func _unformatstr(t) { _formatstrq0=split(t,_FORMATSTRA,/(\\[0-9]{1,3})|(\\x[[:xdigit:]]+)|(\\.)/,_FORMATSTRB); _formatstrs0="" + for ( t=1; t<_formatstrq0; t++ ) _formatstrs0=_formatstrs0 _FORMATSTRA[t] (_FORMATSTRB[t] in _QESCHR ? _QESCHR[_FORMATSTRB[t]] : _QESCHR[toupper(substr(_FORMATSTRB[t],length(_FORMATSTRB[t])-1))]) + return _formatstrs0 _FORMATSTRA[t] } + #___________________________________________________________ + func _unformatstr_init( i) { for ( i=0; i<256; i++ ) _QESCHR["\\" _CHR[i]] =_CHR[i] + for ( i=0; i<256; i++ ) { _QESCHR[sprintf("%.2X",i)] =_CHR[i] + _QESCHR["\\" sprintf("%.3o",i)] =_CHR[i] + if ( i<8 ) _QESCHR["\\" sprintf("%.1o",i)] =_CHR[i] + if ( i<64 ) _QESCHR["\\" sprintf("%.2o",i)] =_CHR[i] + if ( i<16 ) _QESCHR["\\x" sprintf("%.1X",i)]=_QESCHR["\\x" sprintf("%.1x",i)] =_CHR[i] } + i="a" 7 "b" 8 "f" 12 "n" 10 "r" 13 "t" 9 "v" 11 + patsplit(i,_FORMATSTRA,/[^0-9]/,_FORMATSTRB) + for ( i in _FORMATSTRA ) _QESCHR["\\" _FORMATSTRA[i]]=_CHR[_FORMATSTRB[i]+0] } + + + +#___________________________________________________________________________________ +func _unformatrexp(t) { _formatstrq0=split(t,_FORMATSTRA,/(\\[0-9]{1,3})|(\\x[[:xdigit:]]+)|(\\.)/,_FORMATSTRB); _formatstrs0="" + for ( t=1; t<_formatstrq0; t++ ) _formatstrs0=_formatstrs0 _FORMATSTRA[t] (_FORMATSTRB[t] in _QESCHR ? _QESCREXP[_FORMATSTRB[t]] : _QESCREXP[toupper(substr(_FORMATSTRB[t],length(_FORMATSTRB[t])-1))]) + return _formatstrs0 _FORMATSTRA[t] } + #___________________________________________________________ + func _unformatrexp_init( i,a) { _formatstrs0="\\^$.[]|()*+?{}-sSwW<>yB`'"; delete _FORMATSTRB + for ( i=0; i<256; i++ ) _QESCREXP["\\" _CHR[i]] =index(_formatstrs0,_CHR[i]) ? "\\" _CHR[i] : _CHR[i] + for ( i=0; i<256; i++ ) { a=index(_formatstrs0,_CHR[i]) ? "\\" : "" + _QESCREXP[sprintf("%.2X",i)] =a _CHR[i] + _QESCREXP["\\" sprintf("%.3o",i)] =a _CHR[i] + if ( i<8 ) _QESCREXP["\\" sprintf("%.1o",i)] =a _CHR[i] + if ( i<64 ) _QESCREXP["\\" sprintf("%.2o",i)] =a _CHR[i] + if ( i<16 ) _QESCREXP["\\x" sprintf("%.1X",i)]=_QESCREXP["\\x" sprintf("%.1x",i)]=a _CHR[i] } + patsplit("a" 7 "b" 8 "f" 12 "n" 10 "r" 13 "t" 9 "v" 11,_FORMATSTRA,/[^0-9]/,_FORMATSTRB) + for ( i in _FORMATSTRA ) _QESCREXP["\\" _FORMATSTRA[i]]=_CHR[_FORMATSTRB[i]+0] } +# +# /rexpstr/ -> datastr +# (\x00\t\+)* -> 28 00 09 5B 2B 29 +# +# unesc all non-rexp characters: replace unesc of rexp-characters but do not remove it: \* -> \*, \x2A -> \*, \052 -> \*, \\ -> \# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +func _mpudefaulthnd(F,D,C,p1,p2,p3) { _mpuretsub(D,_mpucc0) } + + + + + +func _mpupfxsubret(F,D,C,p1,p2,p3) { return 1 } + +func _mpusfxsubret(F,D,C,p1,p2,p3) { return -1 } + +func _mpuretsub(D,t) { _mpuacc=D[_mpuptr++]; _accmpu(D,t); return 1 } + + + func _mac_init() { _MACPFX["\x84"] ="_macpfx84" + _MACPFX[""] ="_mpupfxsubret" + + + _MACPFX84SFX["\x84"] ="_macpfx84" + _MACPFX84SFX["\x94"] ="_macsfx94" + _MACPFX84SFX[""] ="_mpusfxsubret" + + + _VLDMAXSTRING =1000000 + + } + + +func _macpfx84(F,D,C,p1,p2,p3) { return _mpusub(_MACPFX84SFX,D,C,D[_mpuptr++],p1,p2,p3) } + + + + + +func _macsfx94(F,D,C,p1,p2,p3) { return _mpuretsub(D,_handle8494(_mpuacc)) } + +func _handle8494(t) { return gensub(/(.)/,".\\1","G",t) } + + +func _mpu(t,F,p1,p2,p3, D,C) { + if ( patsplit(t,C,/[\x84\x93\x94]/,D)>0 ) { _conline("CODE"); _conl(); _conl(_dumparr(C)) + _conline("DATA"); _conl(); _conl(_dumparr(D)) + + _mpuptr=0; _mpucc0=""; _mpusub(F,D,C,D[_mpuptr++],p1,p2,p3) + return _mpuacc } + return t } + +func _mpusub(F,D,C,d,p1,p2,p3, q) { + q=D[_ARRLEN] + if ( _VLDMAXSTRING CALL: `" (_mpufn0) "' : _mpuacc=" _mpuacc "'") } + else _mpufn0="_mpudefaulthnd" } while ( !_accmpu(D,_mpuacc,@_mpufn0(F,D,C,p1,p2,p3)) ) + if ( _mpufn0==-1 ) { _conl("WARNING: unclosed expression: `" d _mpuacc"'") + _mpuacc=d _mpuacc } + _retarrm(D,q,"",_mpufn0==-1 ? _th0(d,_mpusubwrng("WARNING: unclosed expression",d _mpuacc)) : "") + # collect: _mpuacc=_retarr(D) _mpuacc + _conl("mpusub exit: _mpuacc: `" _mpuacc "'") } + + + + + + +func _accmpu(A,a,n) { if ( n ) return _mpufn0=n + if ( _mpuacc ) { if ( _VLDMAXSTRING&1" + for ( f in _SHORTCUTWSTRUC ) if ( f in S ) _shrtcuta0=_shrtcuta0 " " _SHORTCUTWSTRUC[f] "\"" gensub(/(\\?)$/,"\\1\\1",1,S[f]) "\"" + if ( _shortcut_nerr(_cmd(_shrtcuta0),_shrtcutf0) ) return } + return ERRNO ? ERRNO="write shortcut: " ERRNO : _NOP } + #___________________________________________________________ + func _rd_shortcut(D,f) { if ( (_shrtcutf0=_filepath(f)) && _shortcut_nerr(_shrtcuta0=_cmd(_shortcut_fpath " /A:Q /F:\"" _shrtcutf0 "\" 2>&1"),_shrtcutf0) ) { + ERRNO=""; split(_shrtcuta0,_SHRTCUTA0,/\x0D?\x0A/) + for ( _shrtcuta0 in _SHRTCUTA0 ) for ( f in _SHORTCUTRSTRUC ) if ( match(_SHRTCUTA0[_shrtcuta0],"^" f) ) D[_SHORTCUTRSTRUC[f]]=substr(_SHRTCUTA0[_shrtcuta0],1+RLENGTH) } + return ERRNO ? ERRNO="read shortcut: " ERRNO : _NOP } + #_____________________________________________________ + func _shortcut_nerr(t,s, A) { if ( match(t,/\x0ASystem error (-?[0-9]+)[^\x0D\x0A]*[\x0D\x0A]+([^\x0D\x0A]+)/,A) ) { + ERRNO=(A[1] in _SHORTCUTERR ? _SHORTCUTERR[A[1]] : A[2] in _SHORTCUTERR ? _SHORTCUTERR[A[2]] : tolower(gensub(/^(The )?(((.*)\.$)|(.*[^\.]$))/,"\\4\\5","G",A[2])) "(" A[1] ")") (s ? ": `" s "'" : "") } + else return 1 } + #________________________________________________ + func _shortcut_init( A,B,q) { + _SHORTCUTERR[2] ="file not found" + _SHORTCUTERR[3] ="no such filepath" + _SHORTCUTERR["The system cannot find the file specified."] ="no such filepath" + _SHORTCUTERR[5] ="file is folder" + _SHORTCUTERR["Access is denied."] ="file is folder" + _SHORTCUTERR[123] ="filepath syntax error" + _SHORTCUTERR["The filename, directory name, or volume label syntax is incorrect."] ="filepath syntax error" + q= "target /T: TargetPath= target? ; _target TargetPathExpanded= ; parameters /P: Arguments= paraneters? ; _parameters ArgumentsExpanded= ; startdir /W: WorkingDirectory= startdir? ; _startdir WorkingDirectoryExpanded= ; runstyle /R: RunStyle= 1 ; icon,index /I: IconLocation= icon,index? ; xicon,index IconLocationExpanded= ; shortcut key /H: HotKey= 0 ; description /D: Description= _env4: default shortcut " + split(q,_SHRTCUTA0,/[ \t]*;[ \t]*/) + for ( q in _SHRTCUTA0 ) if ( match(_SHRTCUTA0[q],/^([^\t]+)\t+([^\t]+)(\t+([^\t]+)(\t+([^\t]+))?)?/,B) ) { + if ( B[3]=="" ) _SHORTCUTRSTRUC[B[2]]=B[1] + else if ( B[5]=="" ) { _SHORTCUTWSTRUC[_SHORTCUTRSTRUC[B[4]]=B[1]]=B[2]; delete _SHORTCUTDEFAULT[B[1]] } + else { _SHORTCUTWSTRUC[_SHORTCUTRSTRUC[B[4]]=B[1]]=B[2]; _SHORTCUTDEFAULT[B[1]]=B[6] } } + else _fatal("_shortcut.init: _shortcut_struc: syntax error: `" _SHRTCUTA0[q] "'") + _SHRTCUTA1[""]; delete _SHRTCUTA1[""] + _shortcut_fpath="\\\\localhost\\eGAWK\\LIB\\_shortcut\\_shortcut.exe" } +#_______________________________________________________________________ +######################################################################## + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +END{ ############################################################################### + + if ( _gawk_scriptlevel<1 ) { + close(_errlog_file) + p=_Zimport(_rdfile(_errlog_file),_N()) + if ( (t=_get_errout(p))!="" ) _expout(t,"/dev/stderr") } } +#___________________________________________________________________________________ +#################################################################################### + +#_____________________________________________________________________________ +func _expout(t,d, a,b) { #################################################### + a=BINMODE; b=ORS; BINMODE="rw"; ORS="" + print t > (d ? d : (d=_errlog_file)); fflush(d) + BINMODE=a; ORS=b } +#_______________________________________________________________________ +func _fatal(t,d, A) { ################################################# + if ( _ERRLOG_FF ) { + A["TYPE"]="FATAL"; A["TEXT"]=t + _log(A,d) } + if ( !d ) exit } +#_______________________________________________________________________ +func _error(t,d, A) { ################################################# + if ( _ERRLOG_EF ) { + A["TYPE"]="ERROR"; A["TEXT"]=t + _log(A,d) } } +#_______________________________________________________________________ +func _warning(t,d, A) { ############################################### + if ( _ERRLOG_WF ) { + A["TYPE"]="WARNING"; A["TEXT"]=t + _log(A,d) } } +#_______________________________________________________________________ +func _info(t,d, A) { ################################################## + if ( _ERRLOG_IF ) { + A["TYPE"]="INFO"; A["TEXT"]=t + _log(A,d) } } +#_______________________________________________________________________ +func _verb(t,d, A) { ################################################## + if ( _ERRLOG_VF ) { + A["TYPE"]="VERB"; A["TEXT"]=t + _log(A,d) } } +#_______________________________________________________________________ +func _trace(t,d, A) { ################################################# + if ( _ERRLOG_TF ) { + A["TYPE"]="TRACE"; A["TEXT"]=t + _log(A,d) } } +#_________________________________________________________________ +func _log(A,p, a,B) { ########################################### + if ( isarray(A) ) { + A["TIME"]=_getime(); A["DATE"]=_getdate() + if ( p ) { + _tLOG[p=_wLCHLD(p,_N())][""]; delete _tLOG[p][""] + _movarr(_tLOG[p],A) + return p } + _expout("_ERRLOG: " _Zexparr(A) "\x0A") } + else { + B["TEXT"]=A; B["TYPE"]="" + return _log(B,p) } } +#_______________________________________________________________________ +func _yexport(p) { ##################################################### + return _tframe("_yexport_i0",p) } +#_______________________________________________________________________ +func _yexport_i0(p,p0,p1,p2) { + if ( p in _tLOG ) return "_ERRLOG: " _Zexparr(_tLOG[p]) "\x0A" + if ( p in _tSTR ) { + p=_tSTR[p]; gsub(/\x1B/,"\x1B\x3B",p); gsub(/\x0A/,"\x1B\x3A",p) + return p "\x0A" } } +#_____________________________________________________________________________ +func _Zimport(t,p,A, c,i,n,B) { ############################################## + if ( p ) { + c=split(t,B,/\x0A/) + for ( i=1; i<=c; i++ ) { + if ( (t=B[i])=="" ) continue + gsub(/\x1B\x3A/,"\x0A",t) + if ( match(t,/^_ERRLOG: /) ) { + _tLOG[n=_wLCHLD(p,_N())][""]; delete _tLOG[n][""] + _Zimparr(_tLOG[n],substr(t,10)) } + else if ( (t=_pass(_IMPORT,t,p,A))!="" ) { + gsub(/\x1B\x3B/,"\x1B",t); _wLCHLD(p,_N(_tSTR,t)) } } + return p } + else _expout(t) } +#_____________________________________________________________________________ +func _export_data(t,i, A) { ################################################# + A["DATA"]=t; A["ID"]=i + _expout("_DATA: " _Zexparr(A) "\x0A") } +#_________________________________________________________________ +BEGIN { _inspass(_IMPORT,"_import_data") } + +func _import_data(t,p,p2, a) { + if ( match(t,/^_DATA: /) ) { + _tDATA[a=_wLCHLD(p,_N())][""]; delete _tDATA[a][""] + _Zimparr(_tDATA[a],substr(t,8)) + _conl("DATA: `" _tDATA[a]["ID"] "':`" _tDATA[a]["DATA"] "'") + return "" } + return t } + +#_____________________________________________________________________________ +func _get_errout(p) { ####################################################### + return _tframe("_get_errout_i0",p) } +#_______________________________________________________________________ +func _get_errout_i0(p, t,n,a) { + return p in _tLOG ? (_get_errout_i1(p) _get_errout_i3(p)) : "" } +#_________________________________________________________________ +func _get_errout_i1(p, t,n,a) { + if ( p in _tLOG ) { + n="" + if ( _tLOG[p]["TYPE"] ) { + n=_tLOG[p]["TYPE"] ": " _get_errout_i2(p) + if ( match(_tLOG[p]["TEXT"],/\x1F/) ) { + t=n; gsub(/[^\t]/," ",t) + return _ln(n substr(_tLOG[p]["TEXT"],1,RSTART-1)) _ln(t substr(_tLOG[p]["TEXT"],RSTART+1)) } } + return _ln(n _tLOG[p]["TEXT"]) } } +#_______________________________________________________________________ +func _get_errout_i2(p) { + return "FILE" in _tLOG[p] ? (_tLOG[p]["FILE"] ("LINE" in _tLOG[p] ? ("(" _tLOG[p]["LINE"] ")") : "") ": ") : "" } +#_______________________________________________________________________ +func _get_errout_i3(p, t,ts,cl,cp,cr,a,b) { + if ( "LSTR" in _tLOG[p] ) { + t=_tLOG[p]["FULLSTR"]; ts=_tLOG[p]["TS"]; cp="^" + if ( "CSTR" in _tLOG[p] ) { + cr=_tLOG[p]["CSTR"] + cl=_tLOG[p]["CLSTR"] + if ( "CPSTR" in _tLOG[p] ) cp=_tLOG[p]["CPSTR"] } + cr=substr(cr,length(cl)+length(cp)+1) + return _ln(_tabtospc(t,ts)) _ln(_getchrln(" ",a=length(_tabtospc(_tLOG[p]["LSTR"],ts))) _getchrln("-",b=length(_tabtospc(cl,ts,a))) _getchrln("^",b=length(_tabtospc(cp,ts,a=a+b))) _getchrln("-",length(_tabtospc(cr,ts,a+b)))) } } +#_____________________________________________________________________________ +func _get_logout(p) { ####################################################### + return _tframe("_get_logout_i0",p) } +#_______________________________________________________________________ +func _get_logout_i0(p, t,n,a) { + if ( p in _tLOG ) { + n= ("DATE" in _tLOG[p] ? (_tLOG[p]["DATE"] " ") : "") ("TIME" in _tLOG[p] ? (_tLOG[p]["TIME"] " ") : "") + if ( _tLOG[p]["TYPE"] ) { + n=n _tLOG[p]["TYPE"] ": " ("FILE" in _tLOG[p] ? ( _tLOG[p]["FILE"] ("LINE" in _tLOG[p] ? ("(" _tLOG[p]["LINE"] ")") : "") ": ") : "") + if ( match(_tLOG[p]["TEXT"],/\x1F/) ) { + t=n; gsub(/[^\t]/," ",t) + return _ln(n substr(_tLOG[p]["TEXT"],1,RSTART-1)) _ln(t substr(_tLOG[p]["TEXT"],RSTART+1)) } } + return _ln(n _tLOG[p]["TEXT"]) } } +#___________________________________________________________________________________ + + +#################################################################################### + + +#_____________________________________________________________________________ +func _N(F,v, p) { ########################################################### + for ( p in _UIDS ) { delete _UIDS[p]; return _nN_i0(p,F,v) } + return _nN_i0(_tgenuid(),F,v) } +#_______________________________________________________________________ +func _n(F,v, p) { ##################################################### + for ( p in _UIDSDEL ) { delete _UIDSDEL[p] + delete _ptr[p] + delete _tPREV[p]; delete _tPARENT[p]; delete _tNEXT[p] + delete _tFCHLD[p]; delete _tQCHLD[p]; delete _tLCHLD[p] + delete _TMP0[p]; delete _TMP1[p] + delete _tLINK[p]; delete _tCLASS[p] + return _nN_i0(p,F,v) } + for ( p in _UIDS ) { delete _UIDS[p]; return _nN_i0(p,F,v) } + return _nN_i0(_tgenuid(),F,v) } +#_____________________________________________________ +func _nN_i0(p,F,v) { + _[p][""]; delete _[p][""]; _ptr[p][""]; delete _ptr[p][""] + _TMP0[p][_ARRLEN]=_TMP1[p][_ARRLEN]=0 + if ( isarray(F) ) { delete F[p] + if ( isarray(v) ) { F[p][""]; delete F[p][""]; _copyarr(F[p],v) } + else if ( !(v==0 && v=="") ) F[p]=v } + else { if ( !(F==0 && F=="") ) { if ( isarray(v) ) { _[p][F][""]; delete _[p][F][""]; _copyarr(_[p][F],v) } + else if ( v==0 && v=="" ) _mpu(F,p) + else _[p][F]=v } } + return p } +#_____________________________________________________ +# F v action +#----------------------------------------------------- +# - * no additional action +# A B delete A[p] and define A[p] as array; copy array B to array A[p] +# A - delete A[p] +# A "*" delete A[p]; A[p]="*" +# "*" B define _[p]["*"] as array; copy array B to array _[p]["*"] +# "*" - run _mpu program "*" for `p +# "*0" "*1" _[p]["*0"]="*1" +#___________________________________________________________ +func _tgenuid( c) { for ( _uidcntr in _UIDARR1 ) { delete _UIDARR1[_uidcntr]; for ( c in _UIDARR0 ) _UIDS[_uidcntr c]; delete _UIDS[_uidcntr c]; return _uidcntr c } + return _fatal("_tUID: Out of UID range") } +#_____________________________________________________ +func _tgenuid_init( a,b,A) { + _ptrlength =4 + a= "\x92\x93\x94\x95\x96\x97\x98\x99\x9A" "\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7" "\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF" "\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF" "\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF" + split(a,A,""); for (a in A) for (b in A) _UIDARR0[A[a] A[b]] _UIDARR1[A[a] A[b]]; _uidcntr=A[a] A[b] } + +#_____________________________________________________________________________ +func _tdel(p, i) { ########################################################## + if ( p in _ ) { + _texclude(p) + for ( i in _ptr[p] ) { if ( isarray(_ptr[p][i]) ) _tdel_i1(_ptr[p][i]) + else if ( (i=_ptr[p][i]) ) _tdel(i) } + if ( p in _tFCHLD ) { i=_tFCHLD[p]; do { i=(i in _tNEXT ? _tNEXT[i] : "") _tdel_i0(i) } while ( i ) } + delete _[p]; _UIDSDEL[p] } } +#_____________________________________________________ +func _tdel_i0(p, i) { + for ( i in _ptr[p] ) { if ( isarray(_ptr[p][i]) ) _tdel_i1(_ptr[p][i]) + else if ( (i=_ptr[p][i]) ) _tdel(i) } + if ( p in _tFCHLD ) { i=_tFCHLD[p]; do { i=(i in _tNEXT ? _tNEXT[i] : "") _tdel_i0(i) } while ( i ) } + delete _[p]; _UIDSDEL[p] } +#_____________________________________________________ +func _tdel_i1(A, i) { + for ( i in A ) { if ( isarray(A[i]) ) _tdel_i1(A[i]) + else if ( (i=A[i]) ) _tdel(i) } } +#_____________________________________________________________________________ +func _texclude(p, v,pp) { ################################################### # TEST!!! + if ( p in _ ) { + if ( p in _tPARENT ) { + pp=_tPARENT[p]; delete _tPARENT[p] + if ( p in _tPREV ) { + if ( p in _tNEXT ) { _tPREV[_tNEXT[v]=_tNEXT[p]]=v=_tPREV[p]; delete _tNEXT[p] } + else delete _tNEXT[_tLCHLD[pp]=_tPREV[p]] + delete _tPREV[p] } + else { + if ( p in _tNEXT ) { delete _tPREV[_tFCHLD[pp]=_tNEXT[p]]; delete _tNEXT[p] } + else { delete _tFCHLD[pp]; delete _tLCHLD[pp]; delete _tQCHLD[pp]; return p } } + --_tQCHLD[pp] } + else { + if ( p in _tPREV ) { + if ( p in _tNEXT ) { _tPREV[_tNEXT[v]=_tNEXT[p]]=v=_tPREV[p]; delete _tNEXT[p] } + else delete _tNEXT[_tPREV[p]] + delete _tPREV[p] } + else if ( p in _tNEXT ) { delete _tPREV[_tNEXT[p]]; delete _tNEXT[p] } } + return p } } +#_______________________________________________________________________ +func _rFBRO(p) { ###################################################### + if ( p ) { + if ( p in _tPARENT ) { + return _tFCHLD[_tPARENT[p]] } + while ( p in _tPREV ) { + p=_tPREV[p] } + return p } + return p } +#_________________________________________________________________ +func _wFBRO(p,v ,a) { ########################################### + if ( p ) { + if ( v ) { + for ( a=p; a in _tPARENT; ) { + if ( (a=_tPARENT[a])==v ) { + return v } } ######################## v is parentesis of p + if ( p in _tPARENT ) { + p=_tPARENT[p] + if ( v in _tNEXT ) { + if ( v in _tPREV ) { + _tPREV[_tNEXT[a]=_tNEXT[v]]=a=_tPREV[v]; delete _tPREV[v] + if ( v in _tPARENT ) { + if ( p==(a=_tPARENT[v]) ) { + return _tFCHLD[p]=_tPREV[_tNEXT[v]=_tFCHLD[p]]=v } + --_tQCHLD[a] } } + else { + if ( v in _tPARENT ) { + if ( p==(a=_tPARENT[v]) ) { return v } + delete _tPREV[_tFCHLD[a]=_tNEXT[v]]; --_tQCHLD[a] } + else { + delete _tPREV[_tNEXT[v]] } } + ++_tQCHLD[p]; return _tFCHLD[p]=_tPREV[_tNEXT[v]=_tFCHLD[_tPARENT[v]=p]]=v } + else { + if ( v in _tPREV ) { + if ( v in _tPARENT ) { + delete _tNEXT[_tLCHLD[a=_tPARENT[v]]=_tPREV[v]] + if ( p==a ) { + delete _tPREV[v] + return _tFCHLD[p]=_tPREV[_tNEXT[v]=_tFCHLD[p]]=v } + --_tQCHLD[a] } + else { + delete _tNEXT[_tPREV[v]] } + delete _tPREV[v] } + else { + if ( v in _tPARENT ) { + if ( p==(a=_tPARENT[v]) ) { return v } + delete _tFCHLD[a]; delete _tLCHLD[a]; delete _tQCHLD[a] } } + ++_tQCHLD[p]; return _tFCHLD[p]=_tPREV[_tNEXT[v]=_tFCHLD[_tPARENT[v]=p]]=v } } + else { + while ( p in _tPREV ) { + p=_tPREV[p] } + if ( v in _tPREV ) { + if ( v in _tPARENT ) { + --_tQCHLD[a=_tPARENT[v]]; delete _tPARENT[v] + if ( v in _tNEXT ) { + _tNEXT[_tPREV[a]=_tPREV[v]]=a=_tNEXT[v] } + else { + delete _tNEXT[_tLCHLD[a]=_tPREV[v]] } } + else { + if ( v in _tNEXT ) { + _tNEXT[_tPREV[a]=_tPREV[v]]=a=_tNEXT[v] } + else { + delete _tNEXT[_tPREV[v]] } } + delete _tPREV[v] } + else { + if ( p==v ) { return v } + if ( v in _tPARENT ) { + if ( v in _tNEXT ) { + delete _tPREV[_tFCHLD[a=_tPARENT[v]]=_tNEXT[v]]; --_tQCHLD[a] } + else { + delete _tLCHLD[a=_tPARENT[v]]; delete _tFCHLD[a]; delete _tQCHLD[a] } + delete _tPARENT[v] } + else { + if ( v in _tNEXT ) { + delete _tPREV[_tNEXT[v]] } } } + return _tPREV[_tNEXT[v]=p]=v } } + else { + if ( v==0 ) { + return v } ######################## p=ptr, v=0 + return v } } ######################## p=ptr, v="" + else { + if ( p==0 ) return v ######################## p=0 + if ( v ) return _texclude(v) ######################## p="", v=ptr - exclude v + return v } } ######################## p="" +#_______________________________________________________________________ +func _rPREV(p) { ###################################################### + if ( (p) && (p in _tPREV) ) { + return _tPREV[p] } + return "" } +#_________________________________________________________________ +func _wPREV(p,v, a,b) { ######################################### + if ( p ) { + if ( v ) { + if ( p==v ) { return v } ######################## p=v=ptr + for ( a=p; a in _tPARENT; ) { + if ( (a=_tPARENT[a])==v ) { + return v } } ######################## v is parentesis of p + if ( v in _tNEXT ) { + if ( p==(a=_tNEXT[v]) ) { return v } + if ( v in _tPREV ) { + _tNEXT[_tPREV[a]=_tPREV[v]]=a + if ( v in _tPARENT ) { + --_tQCHLD[_tPARENT[v]] } } + else { + delete _tPREV[a] + if ( v in _tPARENT ) { + _tFCHLD[b=_tPARENT[v]]=a + --_tQCHLD[b] } } } + else { + if ( v in _tPREV ) { + if ( v in _tPARENT ) { + delete _tNEXT[_tLCHLD[a=_tPARENT[v]]=_tPREV[v]] + --_tQCHLD[a] } + else { + delete _tNEXT[_tPREV[v]] } } + else { + if ( v in _tPARENT ) { + delete _tLCHLD[a=_tPARENT[v]]; delete _tFCHLD[a]; delete _tQCHLD[a] } } } + if ( p in _tPREV ) { + _tNEXT[_tPREV[v]=_tPREV[p]]=v + if ( p in _tPARENT ) { + ++_tQCHLD[_tPARENT[v]=_tPARENT[p]] } + else { + delete _tPARENT[v] } } + else { + delete _tPREV[v] + if ( p in _tPARENT ) { + ++_tQCHLD[_tPARENT[_tFCHLD[a]=v]=a=_tPARENT[p]] } + else { + delete _tPARENT[v] } } + return _tPREV[_tNEXT[v]=p]=v } + else { + if ( v==0 ) { + return v } ######################## p=ptr, v=0 + return v } } ######################## p=ptr, v="" + else { + if ( p==0 ) return v ######################## p=0 + if ( v ) return _texclude(v) ######################## p="", v=ptr - exclude v + return v } } ######################## p="" +#_______________________________________________________________________ +func _rPARENT(p) { #################################################### + if ( (p) && (p in _tPARENT) ) { + return _tPARENT[p] } + return "" } +#_________________________________________________________________ +func _wPARENT(p,v) { ############################################ + return v } +#_______________________________________________________________________ +func _rFCHLD(p) { ##################################################### + if ( (p) && (p in _tFCHLD) ) { + return _tFCHLD[p] } + return "" } +#_________________________________________________________________ +func _wFCHLD(p,v, a) { ########################################## + if ( p ) { + if ( v ) { + if ( p==v ) { return v } ######################## p=v=ptr + for ( a=p; a in _tPARENT; ) { + if ( (a=_tPARENT[a])==v ) { + return v } } ######################## v is parentesis of p + if ( v in _tNEXT ) { + if ( v in _tPREV ) { + _tPREV[_tNEXT[a]=_tNEXT[v]]=a=_tPREV[v]; delete _tPREV[v] + if ( v in _tPARENT ) { + if ( p==(a=_tPARENT[v]) ) { + return _tFCHLD[p]=_tPREV[_tNEXT[v]=_tFCHLD[p]]=v } + --_tQCHLD[a] } } + else { + if ( v in _tPARENT ) { + if ( p==(a=_tPARENT[v]) ) { return v } + delete _tPREV[_tFCHLD[a]=_tNEXT[v]]; --_tQCHLD[a] } + else { + delete _tPREV[_tNEXT[v]] } } + if ( p in _tFCHLD ) { + ++_tQCHLD[p]; return _tFCHLD[p]=_tPREV[_tNEXT[v]=_tFCHLD[_tPARENT[v]=p]]=v } + delete _tNEXT[v] } + else { + if ( v in _tPREV ) { + if ( v in _tPARENT ) { + delete _tNEXT[_tLCHLD[a=_tPARENT[v]]=_tPREV[v]] + if ( p==a ) { + delete _tPREV[v] + return _tFCHLD[p]=_tPREV[_tNEXT[v]=_tFCHLD[p]]=v } + --_tQCHLD[a] } + else { + delete _tNEXT[_tPREV[v]] } + delete _tPREV[v] } + else { + if ( v in _tPARENT ) { + if ( p==(a=_tPARENT[v]) ) { return v } + delete _tFCHLD[a]; delete _tLCHLD[a]; delete _tQCHLD[a] } } + if ( p in _tFCHLD ) { + ++_tQCHLD[p]; return _tFCHLD[p]=_tPREV[_tNEXT[v]=_tFCHLD[_tPARENT[v]=p]]=v } } + _tQCHLD[p]=1; return _tFCHLD[_tPARENT[v]=p]=_tLCHLD[p]=v } + else { + if ( v==0 ) { + if ( p in _tFCHLD ) { ######################## p=ptr, v=0 > delete all chld + v=_tFCHLD[p] + delete _tFCHLD[p]; delete _tLCHLD[p]; delete _tQCHLD[p] + do{ + delete _tPARENT[v] } while ( (v in _tNEXT) && (v=_tNEXT[v]) ) } } + return v } } ######################## p=ptr, v="" > ignore action + else { + if ( p==0 ) return v ######################## p=0 + return v } } ######################## p="" +#_______________________________________________________________________ +func _rLCHLD(p) { ##################################################### + if ( (p) && (p in _tLCHLD) ) { + return _tLCHLD[p] } + return "" } +#_________________________________________________________________ +func _wLCHLD(p,v, a) { ########################################## + if ( p ) { + if ( v ) { + if ( p==v ) { return v } ######################## p=v=ptr + for ( a=p; a in _tPARENT; ) { + if ( (a=_tPARENT[a])==v ) { + return v } } ######################## v is parentesis of p + if ( v in _tPREV ) { + if ( v in _tNEXT ) { + _tNEXT[_tPREV[a]=_tPREV[v]]=a=_tNEXT[v]; delete _tNEXT[v] + if ( v in _tPARENT ) { + if ( p==(a=_tPARENT[v]) ) { + return _tLCHLD[p]=_tNEXT[_tPREV[v]=_tLCHLD[p]]=v } + --_tQCHLD[a] } } + else { + if ( v in _tPARENT ) { + if ( p==(a=_tPARENT[v]) ) { return v } + delete _tNEXT[_tLCHLD[a]=_tPREV[v]]; --_tQCHLD[a] } + else { + delete _tNEXT[_tPREV[v]] } } + if ( p in _tLCHLD ) { + ++_tQCHLD[p]; return _tLCHLD[p]=_tNEXT[_tPREV[v]=_tLCHLD[_tPARENT[v]=p]]=v } + delete _tPREV[v] } + else { + if ( v in _tNEXT ) { + if ( v in _tPARENT ) { + delete _tPREV[_tFCHLD[a=_tPARENT[v]]=_tNEXT[v]] + if ( p==a ) { + delete _tNEXT[v] + return _tLCHLD[p]=_tNEXT[_tPREV[v]=_tLCHLD[p]]=v } + --_tQCHLD[a] } + else { + delete _tPREV[_tNEXT[v]] } + delete _tNEXT[v] } + else { + if ( v in _tPARENT ) { + if ( p==(a=_tPARENT[v]) ) { return v } + delete _tLCHLD[a]; delete _tFCHLD[a]; delete _tQCHLD[a] } } + if ( p in _tLCHLD ) { + ++_tQCHLD[p]; return _tLCHLD[p]=_tNEXT[_tPREV[v]=_tLCHLD[_tPARENT[v]=p]]=v } } + _tQCHLD[p]=1; return _tLCHLD[_tPARENT[v]=p]=_tFCHLD[p]=v } + else { + if ( v==0 ) { + if ( p in _tFCHLD ) { ######################## p=ptr, v=0 > delete all chld + v=_tFCHLD[p] + delete _tFCHLD[p]; delete _tLCHLD[p]; delete _tQCHLD[p] + do{ + delete _tPARENT[v] } while ( (v in _tNEXT) && (v=_tNEXT[v]) ) } } + return v } } ######################## p=ptr, v="" > ignore action + else { + if ( p==0 ) return v ######################## p=0 + return v } } ######################## p="" +#_______________________________________________________________________ +func _rQCHLD(p) { ##################################################### + if ( (p) && (p in _tQCHLD) ) { + return _tQCHLD[p] } + return "" } +#_________________________________________________________________ +func _wQCHLD(p,v) { ############################################# + if ( p ) { + if ( v ) { } ######################## p=ptr, v=ptr + else { + if ( v==0 ) { + if ( p in _tFCHLD ) { ######################## p=ptr, v=0 > delete all chld + v=_tFCHLD[p] + delete _tFCHLD[p]; delete _tLCHLD[p]; delete _tQCHLD[p] + do{ + delete _tPARENT[v] } while ( (v in _tNEXT) && (v=_tNEXT[v]) ) } } + return v } } ######################## p=ptr, v="" > ignore action + else { + if ( p==0 ) { + return v } ######################## p=0 + return v } } ######################## p="" +#_______________________________________________________________________ +func _rNEXT(p) { ###################################################### + if ( (p) && (p in _tNEXT) ) { + return _tNEXT[p] } + return "" } +#_________________________________________________________________ +func _wNEXT(p,v, a,b) { ######################################### + if ( p ) { + if ( v ) { + if ( p==v ) { return v } ######################## p=v=ptr + for ( a=p; a in _tPARENT; ) { + if ( (a=_tPARENT[a])==v ) { + return v } } ######################## v is parentesis of p + if ( v in _tPREV ) { + if ( p==(a=_tPREV[v]) ) { return v } + if ( v in _tNEXT ) { + _tPREV[_tNEXT[a]=_tNEXT[v]]=a + if ( v in _tPARENT ) { + --_tQCHLD[_tPARENT[v]] } } + else { + delete _tNEXT[a] + if ( v in _tPARENT ) { + _tLCHLD[b=_tPARENT[v]]=a + --_tQCHLD[b] } } } + else { + if ( v in _tNEXT ) { + if ( v in _tPARENT ) { + delete _tPREV[_tFCHLD[a=_tPARENT[v]]=_tNEXT[v]] + --_tQCHLD[a] } + else { + delete _tPREV[_tNEXT[v]] } } + else { + if ( v in _tPARENT ) { + delete _tFCHLD[a=_tPARENT[v]]; delete _tLCHLD[a]; delete _tQCHLD[a] } } } + if ( p in _tNEXT ) { + _tPREV[_tNEXT[v]=_tNEXT[p]]=v + if ( p in _tPARENT ) { + ++_tQCHLD[_tPARENT[v]=_tPARENT[p]] } + else { + delete _tPARENT[v] } } + else { + delete _tNEXT[v] + if ( p in _tPARENT ) { + ++_tQCHLD[_tPARENT[_tLCHLD[a]=v]=a=_tPARENT[p]] } + else { + delete _tPARENT[v] } } + return _tNEXT[_tPREV[v]=p]=v } + else { + if ( v==0 ) { + return v } ######################## p=ptr, v=0 + return v } } ######################## p=ptr, v="" + else { + if ( p==0 ) return v ######################## p=0 + if ( v ) return _texclude(v) ######################## p="", v=ptr - exclude v + return v } } ######################## p="", !v +#_______________________________________________________________________ +func _rLBRO(p) { ###################################################### + if ( p ) { + if ( p in _tPARENT ) { + return _tLCHLD[_tPARENT[p]] } + while ( p in _tNEXT ) { + p=_tNEXT[p] } + return p } + return p } +#_________________________________________________________________ +func _wLBRO(p,v ,a) { ########################################### + if ( p ) { + if ( v ) { + for ( a=p; a in _tPARENT; ) { + if ( (a=_tPARENT[a])==v ) { + return v } } ######################## v is parentesis of p + if ( p in _tPARENT ) { + p=_tPARENT[p] + if ( v in _tPREV ) { + if ( v in _tNEXT ) { + _tNEXT[_tPREV[a]=_tPREV[v]]=a=_tNEXT[v]; delete _tNEXT[v] + if ( v in _tPARENT ) { + if ( p==(a=_tPARENT[v]) ) { + return _tLCHLD[p]=_tNEXT[_tPREV[v]=_tLCHLD[p]]=v } + --_tQCHLD[a] } } + else { + if ( v in _tPARENT ) { + if ( p==(a=_tPARENT[v]) ) { return v } + delete _tNEXT[_tLCHLD[a]=_tPREV[v]]; --_tQCHLD[a] } + else { + delete _tNEXT[_tPREV[v]] } } + ++_tQCHLD[p]; return _tLCHLD[p]=_tNEXT[_tPREV[v]=_tLCHLD[_tPARENT[v]=p]]=v } + else { + if ( v in _tNEXT ) { + if ( v in _tPARENT ) { + delete _tPREV[_tFCHLD[a=_tPARENT[v]]=_tNEXT[v]] + if ( p==a ) { + delete _tNEXT[v] + return _tLCHLD[p]=_tNEXT[_tPREV[v]=_tLCHLD[p]]=v } + --_tQCHLD[a] } + else { + delete _tPREV[_tNEXT[v]] } + delete _tNEXT[v] } + else { + if ( v in _tPARENT ) { + if ( p==(a=_tPARENT[v]) ) { return v } + delete _tLCHLD[a]; delete _tFCHLD[a]; delete _tQCHLD[a] } } + ++_tQCHLD[p]; return _tLCHLD[p]=_tNEXT[_tPREV[v]=_tLCHLD[_tPARENT[v]=p]]=v } } + else { + while ( p in _tNEXT ) { + p=_tNEXT[p] } + if ( v in _tNEXT ) { + if ( v in _tPARENT ) { + --_tQCHLD[a=_tPARENT[v]]; delete _tPARENT[v] + if ( v in _tPREV ) { + _tPREV[_tNEXT[a]=_tNEXT[v]]=a=_tPREV[v] } + else { + delete _tPREV[_tFCHLD[a]=_tNEXT[v]] } } + else { + if ( v in _tPREV ) { + _tPREV[_tNEXT[a]=_tNEXT[v]]=a=_tPREV[v] } + else { + delete _tPREV[_tNEXT[v]] } } + delete _tNEXT[v] } + else { + if ( p==v ) { return v } + if ( v in _tPARENT ) { + if ( v in _tPREV ) { + delete _tNEXT[_tLCHLD[a=_tPARENT[v]]=_tPREV[v]]; --_tQCHLD[a] } + else { + delete _tFCHLD[a=_tPARENT[v]]; delete _tLCHLD[a]; delete _tQCHLD[a] } + delete _tPARENT[v] } + else { + if ( v in _tPREV ) { + delete _tNEXT[_tPREV[v]] } } } + return _tNEXT[_tPREV[v]=p]=v } } + else { + if ( v==0 ) { + return v } ######################## p=ptr, v=0 + return v } } ######################## p=ptr, v="" + else { + if ( p==0 ) return v ######################## p=0 + if ( v ) return _texclude(v) ######################## p="", v=ptr - exclude v + return v } } ######################## p="" +#_______________________________________________________________________ +func _rQBRO(p, c,p1) { ################################################ + if ( p ) { + if ( p in _tPARENT ) { + return _tQCHLD[_tPARENT[p]] } + c=1; p1=p + while ( p1 in _tPREV ) { + c++; p1=_tPREV[p1] } + while ( p in _tNEXT ) { + c++; p=_tNEXT[p] } + return c } + return p } +#_________________________________________________________________ +func _wQBRO(p,v) { ############################################## + return v } +#_______________________________________________________________________ +func _rLINK(p) { ###################################################### + return p in _tLINK ? _tLINK[p] : "" } +#_________________________________________________________________ +func _wLINK(p,v) { ############################################## + return _tLINK[p]=v } +#_____________________________________________________________________________ +func _tpush(p,aA, a) { ###################################################### + if ( isarray(aA) ) { + delete _tSTACK[p][a=++_tSTACK[p][0]]; _tSTACK[p][a][""]; delete _tSTACK[p][a][""] + _movarr(_tSTACK[p][a],aA); return } + delete _tSTACK[p][a=++_tSTACK[p][0]]; return _tSTACK[p][a]=aA } +#_________________________________________________________________ +func _tpop(p,aA, a) { ########################################### + if ( (a=_tSTACK[p][0])>0 ) { + _tSTACK[p][0]-- + if ( isarray(_tSTACK[p][a]) ) { + delete aA; _movarr(aA,_tSTACK[p][a]); return } + return _tSTACK[p][a] } + _fatal("^" p ": Out of tSTACK") } +#_________________________________________________________________ +func _tsetsp(p,v) { ############################################# + return _tSTACK[p][0]=v } +#_________________________________________________________________ +func _tgetsp(p) { ############################################### + return _tSTACK[p][0] } +#_______________________________________________________________________ +######################################################################## + + +func _W(p,A,v) { + if ( isarray(v) ) { + if ( p ) { + delete A[p]; A[p][""]; delete A[p][""] + _movarr(A[p],v) } + return p } + if ( p ) { + delete A[p]; return A[p]=v } + return v } + + + +# _tDLINK progressive development: concrete _tDLINK function\processing algo; all frame's families support +#_____________________________________________________________________________ +func _tframe(fF,p,p0,p1,p2) { ############################################### + delete _t_ENDF[++_t_ENDF[0]] + p=_isptr(p) ? isarray(fF) ? _tframe_i1(fF,p,p0,p1,p2) : _tframe_i0(fF,p,p0,p1,p2) : "" + --_t_ENDF[0] + return p } +#___________________________________________________________ +func _tframe_i0(f,p,p0,p1,p2, a) { + while ( p in _tLINK ) p=_tLINK[p] + return p in _tFCHLD ? _tmframe_i0(f,_tFCHLD[p],p0,p1,p2) : (p in _tDLINK ? @f(_tDLINK[p],p0,p1,p2) : @f(p,p0,p1,p2)) } +#___________________________________________________________ +func _tframe_i1(F,p,p0,p1,p2, a) { + while ( p in _tLINK ) p=_tLINK[p] + return p in _tFCHLD ? ("." in F ? _th1(a=F["."],@a(p,p0,p1,p2)) : "") _tmframe_i1(F,_tFCHLD[p],p0,p1,p2) : (">" in F ? _th1(a=F[">"],p in _tDLINK ? @a(_tDLINK[p],p0,p1,p2) : @a(p,p0,p1,p2)) : "") } +#_________________________________________________________________ +func _tmframe(f,p,p0,p1,p2) { ################################### + delete _t_ENDF[++_t_ENDF[0]] + f=p ? _tmframe_i0(f,p,p0,p1,p2) : "" + --_t_ENDF[0] + return f } +#___________________________________________________________ +func _tmframe_i0(f,p,p0,p1,p2, t) { + while ( (p) && (!(_t_ENDF[0] in _t_ENDF)) ) { + t=t _tframe_i0(f,p,p0,p1,p2, p=p in _tNEXT ? _tNEXT[p] : "") } + return t } +#___________________________________________________________ +func _tmframe_i1(F,p,p0,p1,p2, t) { + while ( (p) && (!(_t_ENDF[0] in _t_ENDF)) ) { + t=t _tframe_i1(F,p,p0,p1,p2, p=p in _tNEXT ? _tNEXT[p] : "") } + return t } +#_________________________________________________________________ +func _trunframe(f,p,p0,p1,p2) { ################################# + return _tframe(f ? f : "_trunframe_i0",p,p0,p1,p2) } +#_________________________________________________________________ +func _trunframe_i0(p,p0,p1,p2, f) { + if ( p in _tFN ) { + f=_tFN[p] + return @f(p,p0,p1,p2) } } +#_____________________________________________________________________________ +func _tbframe(f,p,p0,p1) { ################################################## + delete _t_ENDF[++_t_ENDF[0]] + f=p ? _tbframe_i0(f,p,p0,p1) : "" + --_t_ENDF[0] + return f } +#___________________________________________________________ +func _tbframe_i0(f,p,p0,p1, a) { + while ( p in _tLINK ) p=_tLINK[p] + return p in _tLCHLD ? _tmbframe(f,_tLCHLD[p],p0,p1) : @f(p,p0,p1) } +#_________________________________________________________________ +func _tmbframe(f,p,p0,p1, t) { ################################## + while ( (p) && (!(_t_ENDF[0] in _t_ENDF)) ) { + t=t _tbframe_i0(f,p,p0,p1, p=p in _tPREV ? _tPREV[p] : "") } + return t } +#_________________________________________________________________ +func _tbrunframe(f,p,p0,p1) { ################################### + return _tbframe(f ? f : "_trunframe_i0",p,p0,p1) } +#_______________________________________________________________________ +func _tframex(f,p,p0,p1) { ############################################ + delete _t_ENDF[++_t_ENDF[0]] + f=p ? _tframex_i0(f,p,p0,p1) : "" + --_t_ENDF[0] + return f } +#___________________________________________________________ +func _tframex_i0(f,p,p0,p1) { + while ( p in _tLINK ) p=_tLINK[p] + return p in _tFCHLD ? _tmframex(f,_tFCHLD[p],p0,p1) : @f(p,p0,p1) } +#_________________________________________________________________ +func _tmframex(f,p,p0,p1, t) { ################################## + while ( (p) && (!(_t_ENDF[0] in _t_ENDF)) ) { + t=t _tframex_i0(f,p,p0,p1); p=p in _tNEXT ? _tNEXT[p] : "" } + return t } +#_________________________________________________________________ +func _trunframex(f,p,p0,p1) { ################################### + return _tframex(f ? f : "_trunframe_i0",p,p0,p1) } +#_______________________________________________________________________ +func _tbframex(f,p,p0,p1) { ########################################### + delete _t_ENDF[++_t_ENDF[0]] + f=p ? _tbframex_i0(f,p,p0,p1) : "" + --_t_ENDF[0] + return f } +#___________________________________________________________ +func _tbframex_i0(f,p,p0,p1) { + while ( p in _tLINK ) p=_tLINK[p] + return p in _tLCHLD ? _tmbframex(f,_tLCHLD[p],p0,p1) : @f(p,p0,p1) } +#_________________________________________________________________ +func _tmbframex(f,p,p0,p1, t) { ################################# + while ( (p) && (!(_t_ENDF[0] in _t_ENDF)) ) { + t=t _tbframex_i0(f,p,p0,p1); p=p in _tPREV ? _tPREV[p] : "" } + return t } +#_________________________________________________________________ +func _tbrunframex(f,p,p0,p1) { ################################## + return _tbframex(f ? f : "_trunframe_i0",p,p0,p1) } +#_____________________________________________________________________________ +func _tpass(f,p,p0,p1) { #################################################### + delete _t_ENDF[++_t_ENDF[0]] + f=p ? _tpass_i0(f,p,p0,p1) : "" + --_t_ENDF[0] + return f } +#___________________________________________________________ +func _tpass_i0(f,p,p0,p1, a) { + while ( p in _tLINK ) p=_tLINK[p] + return p in _tFCHLD ? _tmpass(f,_tFCHLD[p],p0,p1) : @f(p,p0,p1) } +#_________________________________________________________________ +func _tmpass(f,p,p0,p1) { ####################################### + while ( (p) && (!(_t_ENDF[0] in _t_ENDF)) ) { + p0=_tbpass_i0(f,p,p0,p1, p=p in _tNEXT ? _tNEXT[p] : "") } + return p0 } +#_________________________________________________________________ +func _trunpass(f,p,p0,p1) { ##################################### + return _tpass(f ? f : "_trunframe_i0",p,p0,p1) } +#_____________________________________________________________________________ +func _tpassx(f,p,p0,p1) { ################################################### + delete _t_ENDF[++_t_ENDF[0]] + f=p ? _tpassx_i0(f,p,p0,p1) : "" + --_t_ENDF[0] + return f } +#___________________________________________________________ +func _tpassx_i0(f,p,p0,p1) { + while ( p in _tLINK ) p=_tLINK[p] + return p in _tFCHLD ? _tmpassx(f,_tFCHLD[p],p0,p1) : @f(p,p0,p1) } +#_________________________________________________________________ +func _tmpassx(f,p,p0,p1) { ###################################### + while ( (p) && (!(_t_ENDF[0] in _t_ENDF)) ) { + p0=_tbpassx_i0(f,p,p0,p1); p=p in _tNEXT ? _tNEXT[p] : "" } + return p0 } +#_________________________________________________________________ +func _trunpassx(f,p,p0,p1) { #################################### + return _tpassx(f ? f : "_trunframe_i0",p,p0,p1) } +#_____________________________________________________________________________ +func _tbpass(f,p,p0,p1) { ################################################### + delete _t_ENDF[++_t_ENDF[0]] + f=p ? _tbpass_i0(f,p,p0,p1) : "" + --_t_ENDF[0] + return f } +#___________________________________________________________ +func _tbpass_i0(f,p,p0,p1, a) { + while ( p in _tLINK ) p=_tLINK[p] + return p in _tLCHLD ? _tmbpass(f,_tLCHLD[p],p0,p1) : @f(p,p0,p1) } +#_________________________________________________________________ +func _tmbpass(f,p,p0,p1) { ###################################### + while ( (p) && (!(_t_ENDF[0] in _t_ENDF)) ) { + p0=_tbpass_i0(f,p,p0,p1, p=p in _tPREV ? _tPREV[p] : "") } + return p0 } +#_________________________________________________________________ +func _tbrunpass(f,p,p0,p1) { #################################### + return _tbpass(f ? f : "_trunframe_i0",p,p0,p1) } +#_____________________________________________________________________________ +func _tbpassx(f,p,p0,p1) { ################################################## + delete _t_ENDF[++_t_ENDF[0]] + f=p ? _tbpassx_i0(f,p,p0,p1) : "" + --_t_ENDF[0] + return f } +#___________________________________________________________ +func _tbpassx_i0(f,p,p0,p1) { + while ( p in _tLINK ) p=_tLINK[p] + return p in _tLCHLD ? _tmbpassx(f,_tLCHLD[p],p0,p1) : @f(p,p0,p1) } +#_________________________________________________________________ +func _tmbpassx(f,p,p0,p1) { ##################################### + while ( (p) && (!(_t_ENDF[0] in _t_ENDF)) ) { + p0=_tbpassx_i0(f,p,p0,p1); p=p in _tPREV ? _tPREV[p] : "" } + return p0 } +#_________________________________________________________________ +func _tbrunpassx(f,p,p0,p1) { ################################### + return _tbpassx(f ? f : "_trunframe_i0",p,p0,p1) } +#_______________________________________________________________________ +func _tend(a,b) { ##################################################### + if ( b=="" ) return _t_ENDF[_t_ENDF[0]]=a + else return _t_ENDF[_t_ENDF[0]+a]=b } +#_________________________________________________________________ +func _tifend(l) { ############################################### + return (_t_ENDF[0]+l) in _t_ENDF ? (_t_ENDF[_t_ENDF[0]+l] ? _t_ENDF[_t_ENDF[0]+l] : 1) : "" } + + +#_____________________________________________________________________________ +func _tdelete(p, v) { ####################################################### # REMAKE EXCLUDE + if ( p ) _wLCHLD(_tDELPTR,p) + return v } + + +#_____________________________________________________________________________ +func _tbrochld(p, f,pp) { ################################################### # TEST!!! + if ( p ) { + if ( p in _tFCHLD ) { + f=_tFCHLD[p]; delete _tFCHLD[p]; delete _tLCHLD[p] + if ( p in _tPARENT ) { + pp=_tPARENT[p]; delete _tPARENT[p] + if ( p in _tPREV ) { + _tNEXT[_tPREV[f]=_tPREV[p]]=f; delete _tPREV[p] } + else { + _tFCHLD[pp]=f } + for ( ; f in _tNEXT; f=_tNEXT[f] ) _tPARENT[f]=pp + _tPARENT[f]=pp + if ( p in _tNEXT ) { + _tPREV[_tNEXT[f]=_tNEXT[p]]=f; delete _tNEXT[p] } + else { + _tLCHLD[pp]=f } + _tQCHLD[pp]=_tQCHLD[pp]+_tQCHLD[p]-1 + delete _tQCHLD[p] + return f } + else { + delete _tQCHLD[p] + if ( p in _tPREV ) { + _tNEXT[_tPREV[f]=_tPREV[p]]=f; delete _tPREV[p] } + for ( ; f in _tNEXT; f=_tNEXT[f] ) delete _tPARENT[f] + delete _tPARENT[f] + if ( p in _tNEXT ) { + _tPREV[_tNEXT[f]=_tNEXT[p]]=f; delete _tNEXT[p] } + return f } } + else { + if ( p in _tPARENT ) { + pp=_tPARENT[p]; delete _tPARENT[p] + if ( p in _tPREV ) { + if ( p in _tNEXT ) { + _tNEXT[_tPREV[f]=_tPREV[p]]=f=_tNEXT[p]; delete _tNEXT[p] } + else { + delete _tNEXT[_tLCHLD[pp]=_tPREV[p]] } + delete _tPREV[p]; _tQCHLD[pp]-- } + else { + if ( p in _tNEXT ) { + delete _tPREV[_tFCHLD[pp]=_tNEXT[p]]; delete _tNEXT[p]; _tQCHLD[pp]-- } + else { + delete _tFCHLD[pp]; delete _tLCHLD[pp]; delete _tQCHLD[pp] } } } + else { + if ( p in _tPREV ) { + if ( p in _tNEXT ) { + _tNEXT[_tPREV[f]=_tPREV[p]]=f=_tNEXT[p]; delete _tNEXT[p] } + else { + delete _tNEXT[_tPREV[p]] } + delete _tPREV[p] } + else { + if ( p in _tNEXT ) { + delete _tPREV[_tNEXT[p]]; delete _tNEXT[p] } } } } } + return p } + +# test _tbrochld fn; develope tOBJ r\w func specification for brochld func + +#_________________________________________________________________ +func _tinit_i0(D,S, i) { + for ( i in S ) { + if ( isarray(S[i]) ) { + if ( !isarray(D[i][""]) ) { + delete D[i]; D[i][""]; delete D[i][""] } + _N_i0(D[i],S[i]) } + else { + if ( isarray(D[i]) ) delete D[i] + D[i]=S[i] } } } +#_______________________________________________________________________ +func W(p,p0,p1) { ##################################################### + if ( isarray(p0) ) { + delete p0[p] + if ( isarray(p1) ) { + for ( i in p1 ) { + if ( isarray(p1[i]) ) { + p0[p][i][""]; delete p0[p][i][""]; _N_i0(p0[p][i],p1[i]) } + else p0[p][i]=p1[i] } + return p } + return p0[p]=p1 } + delete _[p][p0] + if ( isarray(p1) ) { + for ( i in p1 ) { + if ( isarray(p1[i]) ) { + _[p][p0][i][""]; delete _[p][p0][i][""]; _N_i0(_[p][p0][i],p1[i]) } + else _[p][p0][i]=p1[i] } + return p } + return _[p][p0]=p1 } + + + + +#___________________________________________________________________________________ +# EMMULATED FUNCTIONAL FIELDS ###################################################### + +#_____________________________________________________________________________ +func _rSQFIRST(g,p,A) { ##################################################### + if ( isarray(A) ) return _rSQFIRSTA(g,p,A) + _SQTOPTR[g]=p; _SQSTACK[g][0]=0 + return _rsqgetptr(g,p) } +#_________________________________________________________________ +func _rSQFIRSTA(g,p,A) { ######################################## + _SQTOPTR[g]=p; _SQSTACK[g][0]=0 + if ( (p=_rsqgetptr(g,p)) in A ) return p + return _rSQNEXTA(g,p,A) } +#_______________________________________________________________________ +func _rSQNEXT(g,p,A) { ################################################ + if ( isarray(A) ) return _rSQNEXTA(g,p,A) + return _rsqnext_i0(g,p) } +#___________________________________________________________ +func _rsqnext_i0(g,p) { + if ( p==_SQTOPTR[g] ) { + if ( _SQSTACK[g][0]>0 ) { + _SQTOPTR[g]=_SQSTACK[g][_SQSTACK[g][0]--] + return _rsqnext_i0(g,_SQSTACK[g][_SQSTACK[g][0]--]) } + return } + if ( p in _tNEXT ) return _rsqgetptr(g,_tNEXT[p]) + return _rsqnext_i0(g,_tPARENT[p]) } +#_________________________________________________________________ +func _rSQNEXTA(g,p,A) { ######################################### + if ( p==_SQTOPTR[g] ) { + if ( _SQSTACK[g][0]>0 ) { + _SQTOPTR[g]=_SQSTACK[g][_SQSTACK[g][0]--] + return _rSQNEXTA(g,_SQSTACK[g][_SQSTACK[g][0]--],A) } + return } + while ( p in _tNEXT ) { + if ( (p=_rsqgetptr(g,_tNEXT[p])) in A ) return p } + return p in _tPARENT ? _rSQNEXTA(g,_tPARENT[p],A) : "" } +#_________________________________________________________________ +func _rsqgetptr(g,p,A) { + if ( p in _tLINK ) { + _SQSTACK[g][++_SQSTACK[g][0]]=p + _SQSTACK[g][++_SQSTACK[g][0]]=_SQTOPTR[g] + while ( (p=_tLINK[p]) in _tLINK ) { _con(".") } + _SQTOPTR[g]=p } + if ( p in _tFCHLD ) return _rsqgetptr(g,_tFCHLD[p]) + return p } +#___________________________________________________________________________________ +#################################################################################### + + +#___________________________________________________________________________________ +# OTHER tFUNCTIONs ################################################################# + +#_____________________________________________________________________________ +func _dumpobj(p,f,t, s) { ################################################### + s=_dumpobj_i0(p,f,t=t "." p "{") + if ( (p=_rFCHLD(p)) ) return s=s _dumpobjm(p,f,s ? _getchrln(" ",length(t)-1) : t " ") + return s } +#___________________________________________________________ +func _dumpobj_i0(p,f,t) { + if ( f=="" ) return _dumpobj_i2(p,t) + if ( f==0 ) return _dumpobj_i1(p,t " ") + return _dumpobj_i1(p,t " ") _dumpobj_i2(p,_getchrln(" ",length(t))) } +#___________________________________________________________ +func _dumpobj_i1(p,t) { + return _ln(t substr(((p in _tPREV) ? "\xAB" _tPREV[p] : "") " ",1,7) " " substr(((p in _tPARENT) ? "\x88" _tPARENT[p] : "") " ",1,7) " " substr( ((p in _tFCHLD) ? _tFCHLD[p] : "") "\x85" ((p in _tQCHLD) ? " (" _tQCHLD[p] ") " : "\x85") "\x85" ((p in _tLCHLD) ? _tLCHLD[p] : "") " ",1,22) substr(((p in _tNEXT) ? "\xBB" _tNEXT[p] : "") " ",1,8) ) } +#___________________________________________________________ +func _dumpobj_i2(p,t) { + return _dumpobj_i3(_[p],t " ") _dumpobj_i3(_ptr[p],_getchrln(" ",length(t)) "`","`") } +#___________________________________________________________ +func _dumpobj_i3(A,t,p,e, s,i,t2) { + if ( isarray(A) ) { + for ( i in A ) { + t2=_getchrln(" ",length(t)) + for ( i in A ) { if ( isarray(A[i]) ) s=s _dumpobj_i3(A[i],t "[" _dumpobj_i4(i) "]",p,_ln()) + else s=s _ln(t "[" _dumpobj_i4(i) "]=" p _dumpobj_i4(A[i]) "'") + t=t2 } + return s } + return e=="" ? "" : t e } + if ( A==0 && A=="" ) return + return _ln(t "=" _dumpobj_i4(p A) "'") } +#___________________________________________________________ +func _dumpobj_i4(t) { + if ( length(t)>64 ) return substr(t,1,28) " ... " substr(t,length(t)-28) + return t } +#_________________________________________________________________ +func _dumpobjm(p,f,t, s,t2) { ################################### + t2=_getchrln(" ",length(t)) + do { s=s _dumpobj(p,f,t); t=t2 } while ( (p=_rNEXT(p)) ) + return s } +#_________________________________________________________________ +func _dumpobj_nc(p,f,t) { ####################################### + return _dumpobj_i0(p,f,t "." p "{ ") } +#_________________________________________________________________ +func _dumpobjm_nc(p,f,t, s,t2) { ################################ + t2=_getchrln(" ",length(t)) + do { s=s _dumpobj_nc(p,f,t); t=t2 } while ( (p=_rNEXT(p)) ) + return s } +#___________________________________________________________________________________ +#################################################################################### + + + + + + + +func _tapi(p,f,p0,p1,p2,p3, c) { + c=p + do { if ( f in _[c]["API"] ) { f=_[c]["API"][f]; return @f(p,p0,p1,p2,p3) } + c=_[c]["CLASS"] } while ( "CLASS" in _[c] ) } + +# if ( F in _TCLASS ) { _[p]["CLASS"]=_TCLASS[F]; _tapi(p); return p } +# # ??? _mpu(F,p) ??? +# return p } +# _[p][F]=v; return p } + +#_______________________________________________________________________ +func _tgetitem(p,n, a,b) { ############################################ + if ( p ) { + if ( isarray(_PTR[p]["ITEM"]) && (n in _PTR[p]["ITEM"]) ) a=_PTR[p]["ITEM"][n] + else a=_PTR[p]["ITEM"][n]=_N() + if ( !(b=_rFCHLD(a)) ) { b=_wLCHLD(a,_N()); _PTR[b]["HOST"]=p; _[b]["ITEMNAME"]=n } + return b } } +#_________________________________________________________________ +func _tdelitem(p) { ############################################# + if ( p ) { + if ( "HOST" in _PTR[p] && "ITEMNAME" in _[p] ) { + return _wLCHLD(_PTR[_PTR[p]["HOST"]]["ITEM"][_[p]["ITEMNAME"]],p) } + _tdelete(p); return p } } + + + + + + + + + + + + + + + + +#_____________________________________________________________________________ +func _tframe0(f,p,p0,p1,p2,p3, A) { ######################################### + if ( _isptr(p) ) { if ( isarray(f) ) return _tframe0_i0(f,p) + _tframex_p0(A,f,0); return _th0(_tframe0_i0(A,p),--_TEND[_ARRLEN]) } } +#_______________________________________________ +func _tframe0_i0(A,p, f) { if ( p in _tLINK ) { + _tframe_link=p + if ( "`" in A ) { f=A["`"]; while ( p in _tLINK ) @f(p=_tLINK[p]) } + else while ( p in _tLINK ) p=_tLINK[p] } + else _tframe_link="" + if ( p in _tFCHLD ) return _tframe0_i2(A,"^",p) _tframe0_i1(A,_tFCHLD[p]) + return _tframe0_i2(A,".",p) } +#_______________________________________________ +func _tframe0_i1(A,p) { if ( _TEND[_ARRLEN] in _TEND ) return + if ( p in _tNEXT ) return _tframe0_i0(A,p) _tframe0_i1(A,_tNEXT[p]) + return _tframe0_i0(A,p) } +#_______________________________________________ +func _tframe0_i2(A,m,p) { _tframe_dlink=p; while ( p in _tDLINK ) p=_tDLINK[p] + if ( m in A ) { if ( (m "~") in A ) { if ( !(_TYPEWORD in _[p]) || A[m "~"]!~_[p][_TYPEWORD] ) return } + m=A[m]; return @m(p) } } +#_____________________________________________________ +func _tframex_p0(A,f,q, i,B,C) { + _tframe_qparam=q; delete _TEND[++_TEND[_ARRLEN]] + + if ( match(f,/\~(.*)$/,B) ) { A["^~"]=A[".~"]=B[1]; f=substr(f,1,RSTART-1) } + A["."]=A["^"]=f; return + q=split(f,B,/;/); i=0 + while ( i _SYS_STDOUT; fflush(_SYS_STDOUT) + BINMODE=a; ORS=b + return t } +#_________________________________________________________________ +func _outnl(t) { ################################################ + return _out(t (t~/\x0A$/ ? "" : _CHR["EOL"])) } +#_______________________________________________________________________ +func _err(t, a,b) { ################################################### + a=BINMODE; b=ORS; BINMODE="rw"; ORS="" + print t > _SYS_STDERR; fflush(_SYS_STDERR) + BINMODE=a; ORS=b + return t } +#_________________________________________________________________ +func _errnl(t) { ################################################ + return _err(t (t~/\x0A$/ ? "" : _CHR["EOL"])) } +#_____________________________________________________________________________ +func _getfilepath(t, f,al,b,A) { ############################################ + ERRNO="" + if ( match(t,/^[ \t]*(("([^"]*)"[ \t]*)|([`']([^']*)'[ \t]*)|(([^ \t]+)[ \t]*))/,A) ) { + al=RLENGTH; f=A[3] A[5] A[7]; _conl("_getfilepath(" f ") (" al ")") + if ( (b=_filepath(f)) ) { if ( length(f)<=FLENGTH ) { FLENGTH=al; return b } + ERRNO="Filepath `" f "' error" } } + FLENGTH=0 } +#_______________________________________________________________________ +func _filepath(f,dd) { ################################################ + if ( (f=_filerdnehnd(f))=="" ) return "" + return filegetrootdir(f,dd) (f in _FILENAM ? _FILENAM[f] : "") (f in _FILEXT ? _FILEXT[f] : "") } +#_________________________________________________________________ +func _filerdne(f,dd) { ########################################## + if ( (f=_filerdnehnd(f))=="" ) return "" + if ( (f in _FILENAM) ) return filegetrootdir(f,dd) _FILENAM[f] (f in _FILEXT ? _FILEXT[f] : "") + if ( f in _FILEXT ) return filegetrootdir(f,dd) _FILEXT[f] + return "" } +#_________________________________________________________________ +func _filerdn(f,dd) { ########################################### + if ( (f=_filerdnehnd(f))=="" ) return "" + return f in _FILENAM ? (filegetrootdir(f,dd) _FILENAM[f]) : "" } +#_________________________________________________________________ +func _filerd(f,dd) { ############################################ + if ( (f=_filerdnehnd(f))=="" ) return "" + return filegetrootdir(f,dd) } +#_________________________________________________________________ +func _filer(f,dd) { ############################################# + if ( (f=_filerdnehnd(f))=="" ) return "" + if ( f in _FILEROOT ) return _FILEROOT[f] + if ( ((dd=dd ? dd : _FILEIO_RD),f) in _FILEROOT ) return _FILEROOT[dd,f] + return _FILEROOT[dd,f]=fileri(dd) } +#_________________________________________________________________ +func _filed(f,dd, d) { ########################################## + if ( (f=_filerdnehnd(f))=="" ) return "" + if ( f in _FILEDIRFL ) return _FILEDIR[f] + if ( f in _FILEROOT ) { + if ( (d=filegetdrvdir(_FILEROOT[f])) ) _FILEDIRFL[f] + return _FILEDIR[f]=d _FILEDIR[f] } + if ( ((dd=dd ? dd : _FILEIO_RD),f) in _FILEDIR ) return _FILEDIR[dd,f] + if ( (d=filedi(dd) _FILEDIR[f])~/^\\/ ) return _FILEDIR[dd,f]=d + return d } +#___________________________________________________________ +func filegetrootdir(f,dd, d) { + if ( f in _FILEDIRFL ) { + if ( f in _FILEROOT ) return _FILEROOT[f] _FILEDIR[f] + if ( ((dd=dd ? dd : _FILEIO_RD),f) in _FILEROOT ) return _FILEROOT[dd,f] _FILEDIR[f] + return (_FILEROOT[dd,f]=fileri(dd)) _FILEDIR[f] } + if ( f in _FILEROOT ) { + if ( (d=filegetdrvdir(_FILEROOT[f])) ) { + _FILEDIRFL[f]; return _FILEROOT[f] (_FILEDIR[f]=d _FILEDIR[f]) } + else return _FILEROOT[f] _FILEDIR[f] } + if ( ((dd=dd ? dd : _FILEIO_RD),f) in _FILEROOT ) { + if ( (dd,f) in _FILEDIR ) return _FILEROOT[dd,f] _FILEDIR[dd,f] + if ( (d=filedi(dd) _FILEDIR[f])~/^\\/ ) return _FILEROOT[dd,f] (_FILEDIR[dd,f]=d) + return _FILEROOT[dd,f] d } + if ( (dd,f) in _FILEDIR ) return (_FILEROOT[dd,f]=fileri(dd)) _FILEDIR[dd,f] + if ( (d=filedi(dd) _FILEDIR[f])~/^\\/ ) return (_FILEROOT[dd,f]=fileri(dd)) (_FILEDIR[dd,f]=d) + return (_FILEROOT[dd,f]=fileri(dd)) d } +#___________________________________________________________ +func _filerdnehnd(st, c,r,d,n,A) { + if ( st ) { + if ( (c=toupper(st)) in _FILECACHE ) { + FLENGTH=length(st); return _FILECACHE[c] } + if ( match(st,/^[ \t]*\\[ \t]*\\/) ) { + if ( match(substr(st,(FLENGTH=RLENGTH)+1),/^[ \t]*([0-9A-Za-z\-]+)[ \t]*(\\[ \t]*([A-Za-z])[ \t]*\$[ \t]*)?(\\[ \t]*([0-9A-Za-z_\!\+\-\[\]\(\)\{\}\~\.]+( +[0-9A-Za-z_\!\+\-\[\]\(\)\{\}\~\.]+)*[ \t]*\\)+[ \t]*)?(([0-9A-Za-z_\!\+\.\~\-\[\]\{\}\(\)]+( +[0-9A-Za-z_\!\+\.\~\-\[\]\{\}\(\)]+)*)[ \t]*)?/,A) ) { + FLENGTH=FLENGTH+RLENGTH + d=(A[3] ? ("\\" A[3] "$") : "") A[4]; gsub(/[ \t]*\\[ \t]*/,"\\",d) + if ( (st=toupper((r="\\\\" A[1]) d (n=A[8]))) in _FILECACHE ) return _FILECACHE[substr(c,1,FLENGTH)]=_FILECACHE[st] + _FILEDIR[c=_FILECACHE[substr(c,1,FLENGTH)]=_FILECACHE[st]=++_file_rootcntr]=d; _FILEDIRFL[c] + _FILEROOT[c]=r } + else { + FLENGTH=0; _filepath_err="UNC"; return "" } } + else { + match(st,/^(([ \t]*\.[ \t]*\\[ \t]*)|(([ \t]*([A-Za-z])[ \t]*(\:)[ \t]*)?([ \t]*(\\)[ \t]*)?))([ \t]*(([ \t]*[0-9A-Za-z_\!\+\-\[\]\(\)\{\}\~\.]+( +[0-9A-Za-z_\!\+\-\[\]\(\)\{\}\~\.]+)*[ \t]*\\)+)[ \t]*)?([ \t]*([0-9A-Za-z_\!\+\.\~\-\[\]\{\}\(\)]+( +[0-9A-Za-z_\!\+\.\~\-\[\]\{\}\(\)]+)*)[ \t]*)?/,A) + if ( !(FLENGTH=RLENGTH) ) return "" + d=A[8] A[10]; gsub(/[ \t]*\\[ \t]*/,"\\",d) + if ( (st=toupper((r=A[5] A[6]) d (n=A[14]))) in _FILECACHE ) return _FILECACHE[substr(c,1,FLENGTH)]=_FILECACHE[st] + _FILEDIR[c=_FILECACHE[substr(c,1,FLENGTH)]=_FILECACHE[st]=++_file_rootcntr]=d + if ( A[8] ) _FILEDIRFL[c] + if ( r ) _FILEROOT[c]=r } + if ( n ) { + if ( match(n,/\.[^\.]*$/) ) { + _FILEXT[c]=substr(n,RSTART); _FILENAM[c]=substr(n,1,RSTART-1) } + else _FILENAM[c]=n } + return c } + return "" } +#___________________________________________________________ +func filedi(f, d) { + if ( (f=filerdnehndi(f))=="" ) return _FILEIO_D + if ( f in _FILEDIRFL ) return _FILEDIR[f] + if ( f in _FILEROOT ) { + if ( (d=filegetdrvdir(_FILEROOT[f])) ) _FILEDIRFL[f] + return _FILEDIR[f]=d _FILEDIR[f] } + if ( (_FILEIO_RD,f) in _FILEDIR ) return _FILEDIR[_FILEIO_RD,f] + return _FILEDIR[_FILEIO_RD,f]=_FILEIO_D _FILEDIR[f] } +#_____________________________________________________ +func fileri(f) { + if ( (f=filerdnehndi(f))=="" ) return _FILEIO_R + if ( f in _FILEROOT ) return _FILEROOT[f] + if ( (_FILEIO_RD,f) in _FILEROOT ) return _FILEROOT[_FILEIO_RD,f] + return _FILEROOT[_FILEIO_RD,f]=_FILEIO_R } +#___________________________________________________________ +func filerdnehndi(st, a,c,r,d,n,A) { + if ( st ) { + if ( (c=toupper(st)) in _FILECACHE ) return _FILECACHE[c] + if ( match(st,/^[ \t]*\\[ \t]*\\/) ) { + if ( match(substr(st,a=RLENGTH+1),/^[ \t]*([0-9A-Za-z\-]+)[ \t]*(\\[ \t]*([A-Za-z])[ \t]*\$[ \t]*)?(\\[ \t]*([0-9A-Za-z_\!\+\-\[\]\(\)\{\}\~\.]+( +[0-9A-Za-z_\!\+\-\[\]\(\)\{\}\~\.]+)*[ \t]*\\)*[ \t]*)?(([0-9A-Za-z_\!\+\.\~\-\[\]\{\}\(\)]+( +[0-9A-Za-z_\!\+\.\~\-\[\]\{\}\(\)]+)*)[ \t]*)?/,A) ) { + a=a+RLENGTH + d=(A[3] ? ("\\" A[3] "$") : "") "\\" A[5]; gsub(/[ \t]*\\[ \t]*/,"\\",d) + if ( (st=toupper((r="\\\\" A[1]) d (n=A[8]))) in _FILECACHE ) return _FILECACHE[substr(c,1,a)]=_FILECACHE[st] + _FILEDIR[c=_FILECACHE[substr(c,1,a)]=_FILECACHE[st]=++_file_rootcntr]=d; _FILEDIRFL[c] + _FILEROOT[c]=r } + else { + _filepath_err="UNC"; return "" } } + else { + match(st,/^(([ \t]*\.[ \t]*\\[ \t]*)|(([ \t]*([A-Za-z])[ \t]*(\:)[ \t]*)?([ \t]*(\\)[ \t]*)?))([ \t]*(([ \t]*[0-9A-Za-z_\!\+\-\[\]\(\)\{\}\~\.]+( +[0-9A-Za-z_\!\+\-\[\]\(\)\{\}\~\.]+)*[ \t]*\\)+)[ \t]*)?([ \t]*([0-9A-Za-z_\!\+\.\~\-\[\]\{\}\(\)]+( +[0-9A-Za-z_\!\+\.\~\-\[\]\{\}\(\)]+)*)[ \t]*)?/,A) + if ( !RLENGTH ) return "" + d=A[8] A[10]; gsub(/[ \t]*\\[ \t]*/,"\\",d) + if ( (st=toupper((r=A[5] A[6]) d (n=A[14]))) in _FILECACHE ) return _FILECACHE[substr(c,1,RLENGTH)]=_FILECACHE[st] + _FILEDIR[c=_FILECACHE[substr(c,1,RLENGTH)]=_FILECACHE[st]=++_file_rootcntr]=d + if ( A[8] ) _FILEDIRFL[c] + if ( r ) _FILEROOT[c]=r } + if ( n ) { + if ( match(n,/\.[^\.]*$/) ) { + _FILEXT[c]=substr(n,RSTART); _FILENAM[c]=substr(n,1,RSTART-1) } + else _FILENAM[c]=n } + return c } + return "" } +#___________________________________________________________ +func filegetdrvdir(t, r) { + if ( t in _FILEDRV ) return _FILEDRV[t] + if ( match(r=_cmd("cd " t " 2>NUL"),/[^\x00-\x1F]+/) ) { + r=gensub(/[ \t]*([\\\$\:])[ \t]*/,"\\1","G",substr(r,RSTART,RLENGTH)); gsub(/(^[ \t]*)|([ \t]*$)/,"",r) + if ( match (r,/\:(.*)/) ) { + return _FILEDRV[tolower(t)]=_FILEDRV[toupper(t)]=substr(r,RSTART+1) (r~/\\$/ ? "" : "\\") } } + return "" } +#_________________________________________________________________ +func _filene(f) { ############################################### + if ( (f=_filerdnehnd(f))=="" ) return "" + return (f in _FILENAM ? _FILENAM[f] : "") (f in _FILEXT ? _FILEXT[f] : "") } +#_________________________________________________________________ +func _filen(f) { ################################################ + if ( (f=_filerdnehnd(f))=="" ) return "" + return f in _FILENAM ? _FILENAM[f] : "" } +#_________________________________________________________________ +func _file(f) { ################################################# + if ( (f=_filerdnehnd(f))=="" ) return "" + return f in _FILEXT ? _FILEXT[f] : "" } + + + +#_______________________________________________________________________ +func _rdfile(f, i,A) { ################################################ + if ( ((f=_filerdne(f))=="") || (_filene(f)=="") ) { ERRNO="Filename error"; return } + _fio_cmda=RS; RS=".{1,}"; _fio_cmdb=BINMODE; BINMODE="rw"; ERRNO=RT=_NUL + getline RS < f; BINMODE=_fio_cmdb; RS=_fio_cmda + if ( ERRNO=="" ) close(f) + if ( ERRNO=="" ) return RT + return RT=_NOP } +#_________________________________________________________________ +func _wrfile(f,d, a,b) { ######################################### + if ( ((f=_wfilerdnehnd(f))=="") || (_filene(f)=="") ) { + ERRNO="Filename error"; return } + a=BINMODE; BINMODE="rw"; b=ORS; ORS=""; ERRNO="" + print d > f + if ( ERRNO ) return "" + close(f) + BINMODE=a; ORS=b + if ( ERRNO ) return "" + return f } +#___________________________________________________________ +func _wrfile1(f,d, a,b) { ################################## + if ( ((f=_wfilerdnehnd(f))=="") || (_filene(f)=="") ) { + ERRNO="Filename error"; return } + a=BINMODE; BINMODE="rw"; b=ORS; ORS=""; ERRNO="" + print d > f + if ( ERRNO ) return "" + close(f) + BINMODE=a; ORS=b + if ( ERRNO ) return "" + return d } +#___________________________________________________________ +func _addfile(f,d, a,b) { ################################## + if ( ((f=_wfilerdnehnd(f))=="") || (_filene(f)=="") ) { + ERRNO="Filename error"; return } + a=BINMODE; BINMODE="rw"; b=ORS; ORS=""; ERRNO="" + print d >> f + if ( ERRNO ) return "" + close(f) + BINMODE=a; ORS=b + if ( ERRNO ) return "" + return d } +#___________________________________________________________ +func _wfilerdnehnd(f, t) { + if ( (f=_filerdne(f))=="" ) return "" + if ( !((t=_filerd(f)) in _WFILEROOTDIR) ) { + _cmd("md \"" t "\" 2>NUL"); _WFILEROOTDIR[t] } + return f } +#_______________________________________________________________________ +func _dir(A,rd, i,r,f,ds,pf,B,C) { #################################### + delete A + gsub(/(^[ \t]*)|([ \t]*$)/,"",rd); if ( rd=="" ) return "" + i=split(_cmd("dir \"" rd "\" 2>NUL"),B,/\x0D?\x0A/)-3 + pf=(match(B[4],/Directory of ([^\x00-\x1F]+)/,C) ? (C[1] (C[1]~/\\$/ ? "" :"\\")) : "") + for ( r=0; i>5; i-- ) { + if ( match(B[i],/^([^ \t]*)[ \t]+([^ \t]*)[ \t]+(()|([0-9\,]+))[ \t]+([^\x00-\x1F]+)$/,C) ) { + if ( C[6]!~/^\.\.?$/ ) { + if ( C[4] ) ds="D " + else { + ds=C[5] " "; gsub(/\,/,"",ds) } + if ( (f=_filepath(pf C[6] (C[4] ? "\\" : "")))!="" ) { + A[f]=ds C[1] " " C[2]; r++ } } } } + return r } +#_________________________________________________________________ +func _dirtree(A,f, B) { ######################################### + gsub(/(^[ \t]*)|([ \t]*$)/,"",f) + delete A; A[""]; delete A[""] + _dirtree_i0(B,8,split(_cmd("dir \"" f "\" /-C /S 2>NUL"),B,/\x0D?\x0A/),A,f=_filerd(f)) + return f } +#___________________________________________________________ +func _dirtree_i0(B,i,c,A,f, lf,a,C) { + delete A[f]; A[f][0]; delete A[f][0] + lf=length(f) + for ( ; i<=c; ) { + if ( match(B[i],/^[ \t]*Directory of (.+)/,C) ) { + if ( substr(a=_filerd(C[1] "\\"),1,lf)==f ) { + i=_dirtree_i0(B,i+4,c,A[f],a) } + else return i } + else if ( match(B[i++],/^([^ \t\-]+)\-([^ \t\-]+)\-([^ \t]+)[ \t]+([^ \t]+)[ \t]+([0-9]+)[ \t]+(.+)$/,C) ) { + A[f][f C[6]]=C[5] " " C[1] "/" _CHR["MONTH"][C[2]] "/" C[3] " " C[4] } } + return i } +#_______________________________________________________________________ +func _filexist(f, a) { ################################################ + if ( f=="" ) return "" + if ( (a=_filepath(f))=="" ) { + ERRNO="Filepath error `" f "'"; return "" } + _cmd("if exist \"" a "\" exit 1 2>NUL") + if ( _exitcode==1 ) return a + ERRNO="File not found `" f "'" + return _NOP } +#_________________________________________________________________ +func _filenotexist(f, a) { ###################################### + if ( f=="" ) return "" + if ( (a=_filepath(f))=="" ) { + ERRNO="Filepath error `" f "'"; return "" } + _cmd("if exist \"" a "\" exit 1 2>NUL") + if ( _exitcode==1 ) return ERRNO=_NOP + return a } +#_______________________________________________________________________ +func _newdir(f) { ##################################################### + if ( (f=_filerd(f))=="" ) return + if ( !(f in _WFILEROOTDIR) ) { + _cmd("md " f " 2>NUL"); _WFILEROOTDIR[f] } + return f } +#_________________________________________________________________ +func _newclrdir(f) { ############################################ + if ( (f=_filerd(f))=="" ) return + _cmd("rd " f " /S /Q 2>NUL"); _cmd("md " f " 2>NUL") + _WFILEROOTDIR[f] + return f } +#_______________________________________________________________________ +func _del(f, c,a,A) { ################################################# + if ( match(f,/\\[ \t]*$/) ) { + if ( (c=toupper(_filerd(f))) && (length(f)==FLENGTH) ) { + _cmd("rd " c " /S /Q 2>NUL") + _deletepfx(_WFILEROOTDIR,c); _deletepfx(_FILEIO_RDTMP,c); _deletepfx(_FILEIO_RDNETMP,c) } + else { + _conl("HUJ TEBE!") + return "" } } + else { + a=_dir(A,f); _cmd("del " f " /Q 2>NUL") + for ( c in A ) { + if ( c~/\\$/ ) { + _cmd("rd " c " /S /Q 2>NUL") + _deletepfx(_WFILEROOTDIR,c); _deletepfx(_FILEIO_RDTMP,c) } + _deletepfx(_FILEIO_RDNETMP,c) } } + return a } +#_______________________________________________________________________ +func _setmpath(p, a) { ################################################ + ERRNO="" + if ( (p) && (a=_filerd(p)) ) { + if ( _FILEIO_TMPRD ) _FILEIO_TMPATHS[_FILEIO_TMPRD] + #if ( _filexist(a) ) _del(a) + #_cmd("rd " a " /S /Q 2>NUL"); _cmd("del " a " /Q 2>NUL") + return _FILEIO_TMPRD=a } + else return _warning("`" p "': cannot set temporary folder" (ERRNO ? (": " ERRNO) : "")) } +#_________________________________________________________________ +func _getmpfile(f,dd) { ######################################### + if ( (!dd) || (!(dd=_filerd(dd))) ) dd=_FILEIO_TMPRD + if ( (f=_filerdne(_filene(f) ? f : (f "_" ++_FILEIO_TMPCNTR),dd)) ) _FILEIO_RDNETMP[toupper(f)] + return f } +#_________________________________________________________________ +func _getmpdir(f,dd) { ########################################## + if ( (!dd) || (!(dd=_filerd(dd))) ) dd=_FILEIO_TMPRD + if ( (f=f ? _filerd(f,dd) : _filerd("_" ++_FILEIO_TMPCNTR "\\",dd)) ) _FILEIO_RDTMP[toupper(f)] + return f } +#_________________________________________________________________ +func _untmp(f, a) { ############################################# + if ( (f=filepath(f)) ) { + if ( match(f,/\\$/) ) { + _deletepfx(_FILEIO_RDTMP,a=toupper(f)); _deletepfx(_FILEIO_RDNETMP,a) } + else { + delete _FILEIO_RDNETMP[toupper(f)] } + return f } + return "" } +#___________________________________________________________________________________ +#################################################################################### + + + + + + + + + + + + + + + + +#___________________________________________________________________________________ +# fn _dirtree(array,pathmask) +# +# Return in `array' file tree from pathmask: +# array["file.filerdne"]="size date time" +# array["subdir.filerd"]["file.filerdne"]="size date time" +# array["subdir.filerd"]["file.filerd"][...] +# +# The array will be cleared before any action. Function return pathmask w/o ltabspc and rtabspc. +#___________________________________________________________________________________ + + + + + +# OK: change internal function's names to: w\o "_" +# OK: FLENGTH: should cover r-spcs +# OK: optimize REXP +# OK: add new symbols to dir/file names ( ! and + ) +# OK: create _getfilepath() +# OK: del - conflict with WROOTDIR (do not update it) +# OK: dir/del - support for filemask ( * and ? ) +# OK: how to define code injections: header\ender; and HANDLERS +# OK: units in header\ender? conline division... +# OK: _FILEPATH problem: it will not been defined at the moment when subscript0 starts - at the start TMPRD="_tmp" +# OK: del: if del("dir\\") - then all ok except it NOT deleted "dir\\" - _del function removed(renamed to __del) +# OK: tmpdirs: it delete only autotmp dir and only from script0 +# OK: MICROTEST: global testing of filepath (UNC! CORRECT RESULTS! ) +# question about cache: did new just now generated absolute filepath cached in FILECACHE? its seems like NO +# check _untmp: CONFLICT: if file or dir from autotmp dir will be untmp then it anyway will be deleted; but file or dir from other point never be deleted anyway - so what is the point of untmp????? +#ERRLOG: _setmpath: warning!!!!! + +#___________________________________________________________________________________ +#################################################################################### +# PUBLIC: +#___________________________________________________________________________________ +# +# fn _rdfile(_filepath) +# +# Read and return data from file specified in _filepath. +# If _filepath=="" then no action occured and return "". +# Function read and return data from file. No any changes in data occured. +# Function use _filerdne function internally. If some syntax error +# found in _filepath then function return "". +# If some error occured while reading data from file then fuction return "" +# and error-text is in ERRNO(and no close-file action will be occured!). +# If reading data completed successfully then function try to close +# file and if while closing file some error occured then function +# returns "" and error-text is in ERRNO. +# Otherwise function returns readed data. +#_____________________________________________________________________________ +# +# fn _wrfile(_filepath,_data) +# +# Write data into file specified in _filepath. +# If _filepath=="" then no action occured and return "". +# Function write _data to file. No any changes in data occured. +# Function use _filerdne function internally. If some syntax error +# found in _filepath then function return "". +# If some error occured while writing data to file then fuction return "" +# and error-text is in ERRNO(and no close-file action will be occured!). +# If writing data completed successfully then function try to close +# file and if while closing file some error occured then function +# returns "" and error-text is in ERRNO. +# Otherwise function returns _filepath(re-processed). +#___________________________________________________________________________________ +# +# fn _filepath(_filepath) +# +# Return re-processed root-dir-name-ext of _filepath. +# If _filepath=="" then no action occured and return "". +# If some syntax error found in _filepath then function return "" +# (and NO _filepath-cache-record will be created!). +#_____________________________________________________________________________ +# +# fn _filerdne(_filepath) +# +# Return re-processed root-dir-filename of _filepath. +# If _filepath=="" then no action occured and return "". +# Function return result only if in _filepath present file-name(name +# and/or extension) - otherwise its return "". +# If some syntax error found in _filepath then function return "" +# (and NO _filepath-cache-record will be created!). +#_____________________________________________________________________________ +# +# fn _filerdn(_filepath) +# +# Return re-processed root-dir-name of _filepath. +# If _filepath=="" then no action occured and return "". +# Function return result only if in _filepath present name field - +# - otherwise its return "". +# If some syntax error found in _filepath then function return "" +# (and NO _filepath-cache-record will be created!). +#_____________________________________________________________________________ +# +# fn _filerd(_filepath) +# +# Return re-processed root-dir of _filepath. +# If _filepath=="" then no action occured and return "". +# If some syntax error found in _filepath then function return "" +# (and NO _filepath-cache-record will be created!). +#_____________________________________________________________________________ +# +# fn _filer(_filepath) +# +# Return re-processed root of _filepath. +# If _filepath=="" then no action occured and return "". +# If some syntax error found in _filepath then function return "" +# (and NO _filepath-cache-record will be created!). +#_____________________________________________________________________________ +# +# fn _filed(_filepath) +# +# Return re-processed dir of _filepath. +# If _filepath=="" then no action occured and return "". +# There is only one case when dir string can be =="" - when in +# _filepath specified unmounted drive(MS-format) and from- +# current-location address used(like Z:file.ext). In this +# case no rootdir-cache-record will be created. +# If some syntax error found in _filepath then function return "" +# (and NO _filepath-cache-record will be created!). +#_____________________________________________________________________________ +# fn _filene(_filepath) +# +# Return re-processed name-ext of _filepath. +# If _filepath=="" then no action occured and return "". +# Function return result only if in _filepath present file-name(name +# and/or extension) - otherwise its return "". +# If some syntax error found in _filepath then function return "" +# (and NO _filepath-cache-record will be created!). +#_____________________________________________________________________________ +# +# fn _filen(_filepath) +# +# Return re-processed name of _filepath. +# If _filepath=="" then no action occured and return "". +# Function return result only if in _filepath present name field - +# - otherwise its return "". +# If some syntax error found in _filepath then function return "" +# (and NO _filepath-cache-record will be created!). +#_____________________________________________________________________________ +# +# fn _file(_filepath) +# +# Return re-processed ext of _filepath. +# If _filepath=="" then no action occured and return "". +# Function return result only if in _filepath present ext field - +# - otherwise its return "". +# If some syntax error found in _filepath then function return "" +# (and NO _filepath-cache-record will be created!). +#___________________________________________________________________________________ +# +# fn _dir(_ARR,_filepathmask) +# +# Get file-/folder-list of root-folder of _filepathmask. +# If _filepathmask=="" then no action occured and return "". +# _filepathmask can contain symbols like `*' and `?' as like +# its used in `dir'-shell command. +# Function gets file-/folder-list of specified root-dir-_filepathmask +# and return this list in array _ARR - where each element: +# +# index - is the _filepath of file-or-folder name-ext +# value - contains 3 fields separated by " ": +# 1. =="D" if this is folder +# ==/[0-9]+/ if this is file - size of file in bytes +# 2. ==date-of-creation of file or folder +# 3. ==time-of-creation of file or folder +# +# Function returns quantity of items in ARR. +#___________________________________________________________________________________ +# +# fn _filexist(_filepath) +# +# Test if file or path or drive specified in _filepath is exist. +# If _filepath=="" then no action occured and return "". +# If some syntax error found in _filepath then function return "" +# (and NO _filepath-cache-record will be created!). +# Function returns _filepath if _filepath is exist. Otherwise +# function return 0. +#_____________________________________________________________________________ +# +# fn _filenotexist(_filepath) +# +# Test if file or path or drive specified in _filepath is not exist. +# If _filepath=="" then no action occured and return "". +# If some syntax error found in _filepath then function return "" +# (and NO _filepath-cache-record will be created!). +# Function returns 1 if _filepath is not exist. Otherwise function +# return 0. +#_____________________________________________________________________________ +# +# fn _newdir(_filepath) +# +# Create path specified in root-dir-_filepath. +# If _filepath=="" then no action occured and return "". +# If some syntax error found in _filepath then function return "" +# (and NO _filepath-cache-record will be created!). +# Function returns root-dir of _filepath. +#_______________________________________________________________________ +# +# fn _newdir(_filepath) +# +# Create path specified in root-dir-_filepath. If this folder +# already exist then it will be completely cleared. +# If _filepath=="" then no action occured and return "". +# If some syntax error found in _filepath then function return "" +# (and NO _filepath-cache-record will be created!). +# Function returns root-dir of _filepath. +#___________________________________________________________________________________ +# +# fn _getmpfile(_filepath,_currfilepath) +# +# Return .... +# +#_____________________________________________________________________________ +# +# fn _getmpdir(_filepath,_currfilepath) +# +# Return ... +# +#_____________________________________________________________________________ +# +# Temporary files folder. +# +# Temporary files folder location is defined by _FILEIO_TMPRD. +# If it wasn't been initialized before program run or not been initialized +# by ENVIRON["TMPDIR"] then it will defined as the: +# `current rootdir(stored in _FILEIO_RD)\programname.TMP' +# In this case if its already exist then it will completely cleared when _FILEIO +# library initialization processed. +# And at the program uninitialization processed it will completely +# cleared if _FILEIO_TMPCLRFLAG is true. +#___________________________________________________________________________________ +# +# var _FILEIO_RD (ENVIRON["CD"]) +# +# This var can be set before running program. It can contain path which +# will be used as default current dir while program run. +# If this var is set before program runs - then it will be refreshed by the +# _filerd it will be used as default current dir while program run. +# If this var is not set before program runs - then ENVIRON["CD"] can also +# set up default current dir while program run. If it set before program +# begin then it will be refreshed by the _filerd - and also writed into +# _FILEIO_RD. +# If both _FILEIO_RD and ENVIRON["CD"] are not set before program begins +# then real current root\dir will be writed into both _FILEIO_RD and +# ENVIRON["CD"] and it will be used as default current dir while program run. +# +#___________________________________________________________________________________ +# +# var _FILEIO_TMPRD (ENVIRON["TMPRD"]) +# +# This var can be set before running program. It can contain path which +# will be used as default temporary files root-folder while program run. +# If this var is set before program runs - then it will be refreshed by the +# _filerd - and also writed into ENVIRON["TMPRD"]. +# If this var is not set before program runs - then ENVIRON["TMPRD"] can also +# set up default temporary files root-folder while program run. If it set +# before program begin then it will be refreshed by the _filerd - and +# also writed into _FILEIO_TMPRD. +# If both _FILEIO_TMPRD and ENVIRON["TMPRD"] are not set before program begins +# then new folder into path specified by the _FILEIO_RD(after its handling) +# will be writed into both _FILEIO_TMPRD and ENVIRON["TMPRD"] and it +# will be used as default temporary files root-folder while program run. +#___________________________________________________________________________________ +# +# var _FILEPATH +# +# This var contain filepath of working script. It should be setting up externally. +# +# var _gawk_scriptlevel +#___________________________________________________________________________________ +#################################################################################### +END{ ############################################################################### + if ( _constatstrln>0 ) _constat() } + +#_____________________________________________________________________________ +func _cmd(c, i,A) { ####################################################### + _fio_cmda=RS; RS=".{1,}"; _fio_cmdb=BINMODE; BINMODE="rw"; ERRNO=RT=_NUL + c | getline RS; BINMODE=_fio_cmdb; RS=_fio_cmda + if ( ERRNO || 0>_exitcode=close(c) ) return RT=_NOP + return RT } + + +#_____________________________________________________________________________ +func _con(t,ts, a,b,c,d,i,r,A,B) { ########################################## + d=RLENGTH + if ( (c=split(r=t,A,/\x0D?\x0A/,B))>0 ) { + a=BINMODE; b=ORS; BINMODE="rw"; ORS="" + if ( c>1 ) { + if ( (i=length(t=_tabtospc(A[1],ts,_conlastrln)))<_constatstrln ) { + t=t _getchrln(" ",_constatstrln-i) } + print (t B[1]) > _SYS_STDCON + for ( i=2; i _SYS_STDCON } + print (_conlastr=_tabtospc(A[c],ts)) > _SYS_STDCON; fflush(_SYS_STDCON) } + else { + print (t=_tabtospc(t,ts,_conlastrln)) > _SYS_STDCON; fflush(_SYS_STDCON) + _conlastr=_conlastr t } + if ( (i=length(_conlastr))>=_CON_WIDTH ) { + _conlastr=substr(_conlastr,1+(int(i/_CON_WIDTH)*_CON_WIDTH)) } + _conlastrln=length(_conlastr) + if ( _constatstr ) { + print ((t=_constatgtstr(_constatstr,_CON_WIDTH-1-_conlastrln)) _CHR["CR"] _conlastr) > _SYS_STDCON; fflush(_SYS_STDCON) + _constatstrln=length(t) } + BINMODE=a; ORS=b; RLENGTH=d; return r } + RLENGTH=d } +#_______________________________________________________________________ +func _conl(t,ts) { #################################################### + return _con(t (t~/\x0A$/ ? "" : _CHR["EOL"]),ts) } +#_______________________________________________________________________ +func _conline(t,ts) { ################################################# + return _con(_chrline(t,ts)) } +#_______________________________________________________________________ +func _constat(t,ts, ln,a) { ########################################### + if ( _constatstrln>(ln=length(t=_constatgtstr(_constatstr=_tabtospc(t,ts),_CON_WIDTH-1-_conlastrln))) ) { + t=t _getchrln(" ",_constatstrln-ln) } + _constatstrln=ln + ln=ORS; a=BINMODE; BINMODE="rw"; ORS="" + print (t _CHR["CR"] _conlastr) > _SYS_STDCON; fflush(_SYS_STDCON) + ORS=ln; BINMODE=a; return _constatstr } +#_________________________________________________________________ +func _constatgtstr(t,ln, a,b) { + if ( ln<1 ) { + return "" } + if ( (a=length(t))<=ln ) { + return t } + if ( ln<11 ) { + return substr(t,a-ln+1) } + if ( ln<19 ) { + return "..." substr(t,a-ln+4) } + return substr(t,1,b=int((ln-3)/2)) "..." substr(t,a-ln+b+4) } +#_______________________________________________________________________ +func _constatpush(t,ts) { ############################################# + _CONSTATPUSH[++_CONSTATPUSH[0]]=_constatstr + if ( t ) _constat(t,ts) + return _constatstr } +#_______________________________________________________________________ +func _constatpop() { ################################################## + if ( _CONSTATPUSH[0]>0 ) { + return _constat(_CONSTATPUSH[_CONSTATPUSH[0]--]) } + return _constat("") } +#_______________________________________________________________________ +func _conin(t, a,b) { ################################################# + _constatpush(); _constat(); a=BINMODE; b=RS; BINMODE="rw"; RS="\n" + _con(t); getline t < "CON"; close("CON"); _conlastrln=0; _conlastr="" + gsub(/[\x0D\x0A]+/,"",t) + BINMODE=a; RS=b; _constatpop() + return t } +#___________________________________________________________________________________ +#################################################################################### + + + +func _conlq(t,ts) { + return _conl("`" t "'",ts) } + + + + + + + + +#################################################################################### +# PUBLIC: +#_____________________________________________________________________________ +# var _SYS_STDOUT - (by default = "/dev/stdout") standart output pipe filename +# var _SYS_STDERR - (by default = "/dev/stderr") standart error output pipe filename +# var _SYS_STDCON - (by default = "CON") standart console output device +#_____________________________________________________________________________ +# var _CHR["CR"] - return cursor to the position 0 without newline(normally ="\x0D") +# var _CHR["EOL"] - return cursor to the position 0 & newline (MS:="\x0D\x0A" / UX:="\x0D") +# var _CON_WIDTH - console width(columns number) +#_____________________________________________________________________________ +# fn _cmd(c) - execute shell command c and return output +# fn _err - output string w\o any addition into _SYS_STDERR device +# fn _errnl - output string with addition _CHR["EOL"] at the end of the string into _SYS_STDERR device +# fn _out - output string w\o any addition into _SYS_STDOUT device +# fn _outnl - output string with addition _CHR["EOL"] at the end of the string into _SYS_STDOUT device +#_____________________________________________________________________________ +# fn _con(text[,tabspace]) +# fn _conl(text[,tabspace]) +# fn _conline(text[,tabspace]) +# fn _constat(status[,tabspace]) +# fn _constatpush([status[,tabspace]]) +# fn _constatpop() +#_______________________________________________________________________ +# var _constatstr +#################################################################################### + + +func _unstr(t) { return gensub(/\\(.)/,"\\1","G",t) } +#_____________________________________________________________________________ +func _gensubfn(t,r,f,p0, A) { ############################################### + if ( match(t,r,A) ) return substr(t,1,RSTART-1) @f(_th0(substr(t,RSTART,RLENGTH),t=substr(t,RSTART+RLENGTH)),A,p0) _gensubfn(t,r,f,p0) + return t } +#_____________________________________________________________________________ +func _rexpstr(r, i,c,A) { ################################################### + c=split(r,A,""); r="" + for ( i=1; i<=c; i++ ) r=r _REXPSTR[A[i]] + return r } +#_____________________________________________________________________________ +func _hexnum(n,l) { ######################################################### + if ( l+0<1 ) l=2 + return sprintf("%." (l+0<1 ? 2 : l) "X",n) } +#_____________________________________________________________________________ +func _ln(t) { ############################################################### + return t~/\x0A$/ ? t : (t _CHR["EOL"]) } +#_______________________________________________________________________ +func _getchrln(s,w) { ################################################# + if ( s=="" ) return + #if ( w!=w+0 || w<0 ) w=_CON_WIDTH + if ( length(s)=w ) return substr(_getchrlnt0,1,w) } + else _getchrlnt0=s s + while ( length(_getchrlnt0)=l ) return substr(t,l+1) + if ( A[2] ) { + if ( (l1=int(A[2,"length"]/ts))>=(l2=l-A[1,"length"]) ) return substr(A[2],l2*ts+1) A[3] + if ( !A[4] ) return A[5] + t=A[1] _getchrln("\t",l1) A[3] } + else return t } } +#_______________________________________________________________________ +func _qstr(t, c,A,B) { ################################################ + c=""; for ( t=split(t,A,/[\x00-\x1F\\"]/,B); t>=0; t-- ) { + c=_QSTR[B[t]] A[t+1] c } + return c } +#_________________________________________________________________ +func _qstrq(t) { ################################################ + gsub(/\\/,"\\\\",t); gsub(/"/,"\\\"",t); return t } +#_______________________________________________________________________ +func _Zexparr(S,s, t,i) { ############################################## + t=""; if ( isarray(S) ) { + for ( i in S ) { + t=t (isarray(S[i]) ? (_Zexparr_i1(i) "\x10" _Zexparr_i0(S[i]) "\x11\x11\x10" ) : (_Zexparr_i2(_Zexparr_i3(i) "\x11" _Zexparr_i3(S[i])) "\x10" ) ) } } + if ( s!="" ) { + gsub(/\x1B/,"\x1B\x3B",s) + gsub(/\x10/,"\x1B\x30",s) + t=t "\x11\x11\x10" s } + gsub(/\x0A/,"\x1B\x3A",t); return t } +#_________________________________________________________________ +func _Zexparr_i0(S, t,i) { + for ( i in S ) { + t=t (isarray(S[i]) ? (_Zexparr_i1(i) "\x10" _Zexparr_i0(S[i]) "\x11\x11\x10" ) : (_Zexparr_i2(_Zexparr_i3(i) "\x11" _Zexparr_i3(S[i])) "\x10" ) ) } + return t } +#_________________________________________________________________ +func _Zexparr_i1(t) { + gsub(/\x1B/,"\x1B\x3B",t); gsub(/\x11/,"\x1B\x31",t); gsub(/\x10/,"\x1B\x30",t) + return t } +#_________________________________________________________________ +func _Zexparr_i2(t) { + gsub(/\x10/,"\x1B\x30",t); return t } +#_________________________________________________________________ +func _Zexparr_i3(t) { + gsub(/\x1B/,"\x1B\x3B",t); gsub(/\x11/,"\x1B\x31",t) + return t } +#_______________________________________________________________________ +func _Zimparr(D,t, A,B) { ############################################## + if ( isarray(D) ) { + split(t,A,/\x10/,B) + t=_Zimparr_i0(A,B,_Zimparr_i1(D,A,B,1)) + gsub(/\x1B\x30/,"\x10",t) + gsub(/\x1B\x3B/,"\x1B",t) + return t } } +#_________________________________________________________________ +func _Zimparr_i0(A,B,i) { + return i in A ? (A[i] B[i] _Zimparr_i0(A,B,i+1)) : "" } +#_________________________________________________________________ +func _Zimparr_i1(D,A,B,i, t,a,n) { + while ( i in B ) { + if ( (t=A[i++])=="\x11\x11" ) return i + gsub(/\x1B\x30/,"\x10",t) + if ( (a=index(t,"\x11"))>0 ) { + if ( isarray(D[n=_Zimparr_i2(substr(t,1,a-1))]) ) { + delete D[n] } + D[n]=_Zimparr_i2(substr(t,a+1)) } + else { + if ( !isarray(D[t=_Zimparr_i2(t)]) ) { + delete D[t]; D[t][""]; delete D[t][""] } + i=_Zimparr_i1(D[t],A,B,i) } } } +#_________________________________________________________________ +func _Zimparr_i2(t) { + gsub(/\x1B\x31/,"\x11",t); gsub(/\x1B\x3B/,"\x1B",t) + return t } +#___________________________________________________________________________________ +#################################################################################### + + + + +#_______________________________________________________________________ +# _CHR array +# +# _CHR[ASC-code decimal number]=="char" +# +# Contains 256 elements. The index is the decimal number from 0-255. +# The value is the single character with ASC-code equivalent to index number: +# +# _CHR[97] =="a" - character with ASC-code 97 is `a' +# +# This array is useful if you want to get character using it's ASC-code +#_________________________________________________________________ +# _ASC array +# +# _ASC[char]==number: ASC-code of char +# +# Contains 256 elements. The index is the any single character with ASC-code \x00-\xFF. +# The value is the number equivalent of character's ASC-code: +# +# _ASC["A"] ==65 - ASC-code of character `A' is 65 +# +# This array is useful if you want to get ASC-code of the character. +#_________________________________________________________________ +# _QASC array +# +# _QASC[char]=="string: octal ASC-code of char in 3-digit octal format" +# +# Contains 256 elements. The index is the any single charcter with ASC-code \x00-\xFF. +# The value is the octal number equivalent of character's ASC-code in fixed-length - 3-digit - string: +# +# _QASC["!"] =="041" - ASC-code of character `!' is 33(decimal) == 41(in octal) +# _QASC["\x0D"] =="015" +# +# This array is useful when some type of string escape conversion is performed. It allows quickly get +# replace string for the characters that can be specified only by character code in result string: +# +# "\x0D" -> "\\015" +#_______________________________________________________________________ + + + + + + + +#################################################################################### +# PUBLIC: +#_____________________________________________________________________________ +# fn _getchrln(ptt,len) +#_____________________________________________________________________________ +# fn _tabtospc(src,tabstep,xcoord) +#################################################################################### + +#_____________________________________________________________________________ +func _retarr(A,i,p,a, q) { ################################################## + if ( isarray(A) ) { + i=i=="" ? 0 : i+0; q=A[_ARRLEN]+0 + if ( ilength(i2) ? 1 : i10 ) for ( i in A ) ++a + else for ( i in A ) isarray(A[i]) ? ++a : "" + if ( length(_dumparrd=_dumparrd t (a>0 ? " ... (x" a ")" : "") _CHR["EOL"])>262144 ) { _DUMPARR[++_dumparrc]=_dumparrd; _dumparrd="" } + return } + if ( ls>=0 ) for ( i in A ) if ( !isarray(A[i]) ) if ( length(_dumparrd=_dumparrd (f ? t2 : t _nop(f=1)) "[" i "]=" A[i] "'" _CHR["EOL"])>262144 ) { _DUMPARR[++_dumparrc]=_dumparrd; _dumparrd="" } + for ( i in A ) if ( isarray(A[i]) ) _dumparr_i1(A[i],lv,ls,ln+ls,_th0(f ? t2 : t,f=1) "[" i "]") + if ( !f ) if ( length(_dumparrd=_dumparrd t _CHR["EOL"])>262144 ) { _DUMPARR[++_dumparrc]=_dumparrd; _dumparrd="" } } +#_________________________________________________________________ +func _printarr(A,t,lv,r, a) { #################################### + a=PROCINFO["sorted_in"]; PROCINFO["sorted_in"]="_lengthsort"; _printarrexp=r ? r : "" + if ( isarray(A) ) { + delete _DUMPARR; _dumparrc=_dumparrd="" + _printarr_i1(A,lv=(lv=="" ? 16 : lv==0 || (lv+0)!=0 ? lv : lv=="-*" ? -3 : lv~/^\+?\*$/ ? 3 : 16)+0,lv<0 ? -1 : 1,0,_tabtospc(t)) + PROCINFO["sorted_in"]=a + return _retarrd(_DUMPARR,_dumparrd, _dumparrd="") } } +#___________________________________________________________ +func _printarr_i1(A,lv,ls,ln,t, t2,i,a,f) { + t2=_getchrln(" ",length(t)) + if ( ln==lv ) { if ( ls>0 ) for ( i in A ) ++a + else for ( i in A ) isarray(A[i]) ? ++a : "" + if ( length(_dumparrd=_dumparrd t (a>0 ? " ... (x" a ")" : "") _CHR["EOL"])>262144 ) { _conl(_dumparrd); _dumparrd="" } + return } + if ( ls>=0 ) for ( i in A ) if ( !_printarrexp || i~_printarrexp ) if ( !isarray(A[i]) ) if ( length(_dumparrd=_dumparrd (f ? t2 : t _nop(f=1)) "[" i "]=" A[i] "'" _CHR["EOL"])>262144 ) { _conl(_dumparrd); _dumparrd="" } + for ( i in A ) if ( isarray(A[i]) ) if ( !_printarrexp || i~_printarrexp ) _printarr_i1(A[i],lv,ls,ln+ls,_th0(f ? t2 : t,f=1) "[" i "]") + if ( !f ) if ( length(_dumparrd=_dumparrd t _CHR["EOL"])>262144 ) { _conl(_dumparrd); _dumparrd="" } } + + + + + + + + + + + + + + + + + +#################################################################################### + +#_____________________________________________________________________________ +func _th0(p,p1,p2,p3) { return p } ########################################## +#_________________________________________________________________ +func _th1(p0,p,p2,p3) { return p } ############################## +#_________________________________________________________________ +func _th2(p0,p1,r,p3) { return p } ############################## +#_________________________________________________________________ +func _th3(p0,p1,p2,r) { return p } ############################## +#_________________________________________________________________ +func _th10(p0,p1) { return p1 p0 } ############################## +#_______________________________________________________________________ +func _nop(p0,p1,p2,p3) { } ############################################ +#_______________________________________________________________________ +func _bearray(A) { #################################################### + if ( isarray(A) || (A==0 && A=="") ) return 1 } +#_______________________________________________________________________ +func _setarrsort(f, a) { ############################################## + a=PROCINFO["sorted_in"] + if ( !f ) delete PROCINFO["sorted_in"] + else PROCINFO["sorted_in"]=f + return a } +#_________________________________________________________________ +func cmp_str_idx(i1, v1, i2, v2) { ############################## + return i1 < i2 ? -1 : 1 } +#___________________________________________________________ +func ncmp_str_idx(i1, v1, i2, v2) { ####################### + return i1 < i2 ? 1 : -1 } +#_______________________________________________________________________ +func _exit(c) { ####################################################### + exit c } +#_______________________________________________________________________ +func _fn(f,p0,p1,p2) { ################################################ + if ( f in FUNCTAB ) return @f(p0,p1,p2) } +#_______________________________________________________________________ +func _defn(f,c,v) { ################################################### + FUNCTAB[c f]=v } +#_______________________________________________________________________ +func _delay(t, a) { ################################################### + for ( a=1; a<=t; a++ ) { + _delayms() } } +#_________________________________________________________________ +func _delayms( a) { ############################################# + for ( a=1; a<=_delay_perfmsdelay; a++ ) { } } +#_______________________________________________________________________ +func _getdate() { ##################################################### + return strftime("%F") } +#_________________________________________________________________ +func _getime() { ################################################ + return strftime("%H:%M:%S") } +#_________________________________________________________________ +func _getsecond() { ############################################# + return systime() } +#___________________________________________________________ +func _getsecondsync( a,c,b,c2) { ########################## + a=systime() + while ( a==systime() ) { ++c } + return a+1 } +#_______________________________________________________________________ +func _getperf(o,t, a) { ############################################### + o=="" ? ++_getperf_opcurr : _getperf_opcurr=o + if ( (a=_getsecond())!=_getperf_last ) { + _getperf_opsec=(_getperf_opcurr-_getperf_opstart)/((_getperf_last=a)-_getperf_start) + return @_getperf_fn(o,t,a) } + return 1 } +#_____________________________________________________ +BEGIN{ + _getperf_fn="_nop" } +#___________________________________________________________ +func _getperf_noenot(o,t,a) { return 1 } +#___________________________________________________________ +func _getperf_noe(o,t,a) { + if ( _getperf_opsecp!=_getperf_opsec ) { _constat((_constatstr==_getperf_stat ? _getperf_statstr : (_getperf_statstr=_constatstr)) t " [TIME=" (a-_getperf_start) " sec(" (_getperf_opsecp=_getperf_opsec) " ops/sec)]"); _getperf_stat=_constatstr } + return 1 } +#___________________________________________________________ +func _getperf_not(o,t,a) { + if ( a<_getperf_end ) return 1 } +#___________________________________________________________ +func _getperf_(o,t,a) { + if ( a>=_getperf_end ) return 0 + if ( _getperf_opsecp!=_getperf_opsec ) { _constat((_constatstr==_getperf_stat ? _getperf_statstr : (_getperf_statstr=_constatstr)) t " [TIME=" (a-_getperf_start) " sec(" (_getperf_opsecp=_getperf_opsec) " ops/sec)]"); _getperf_stat=_constatstr } + return 1 } +#_________________________________________________________________ +func _igetperf(t,s,o) { ######################################### # t-test period in seconds(==0 ? no period; s(=true/false)-output/not output status; o-qnt of ops before test start + if ( t==0 && t=="" && s==0 && s=="" && o==0 && o=="" ) { + if ( _getperf_fn!~/not$/ && _constatstr==_getperf_stat ) _constat(_getperf_statstr) + _getperf_fn="_nop" + return "[TIME=" (_getperf_last-_getperf_start) " sec(" _getperf_opsec " ops/sec)]" } + _conl("initiate _getperf") + _getperf_opstart=_getperf_opcurr=o+0; _getperf_opsec=_getperf_opsecp=_getperf_stat=_getperf_statstr="" + _getperf_end=t+(_getperf_start=_getperf_last=_getsecondsync()) + _getperf_fn=(t+0>0 ? "_getperf_" : "_getperf_noe") (s ? "" : "not") + return _getperf_start } + +#___________________________________________________________________________________ +#################################################################################### + + +#_______________________________________________________________________ +func _addf(A,f) { ##################################################### + A["B"][""]=A["F"][A["B"][f]=A["B"][""]]=f } +#_________________________________________________________________ +func _insf(A,f) { ############################################### + A["F"][""]=A["B"][A["F"][f]=A["F"][""]]=f } +#_________________________________________________________________ +func _delf(A,f) { ############################################### + A["B"][A["F"][A["B"][f]]=A["F"][f]]=A["B"][f] + delete A["F"][f]; delete A["B"][f] } +#_______________________________________________________________________ +func _pass(A,f,t,p2, i,a) { ########################################### + a=_endpass_v0; _endpass_v0=""; i=1 + while ( t && i ) { i=""; while ( (i=A[i]) && (t==(t=@i(f,t,p2))) ) { } } + if ( i && _endpass_v0 ) { A["!"]=1; t=_endpass_v0 } + else delete A["!"] + _endpass_v0=a; return t } +#_________________________________________________________________ +func _endpass(t) { _endpass_v0=t } ######################## +#_________________________________________________________________ +func _inspass(A,f) { A[f]=A[""]; A[""]=f } ################## +#_______________________________________________________________________ +func _fframe(A,t,p) { ################################################# + return _fframe_i0(A,t,p,A[""]) } +#___________________________________________________________ +func _fframe_i0(A,t,p,f) { + return f ? (@f(t,p) _fframe_i0(A,t,p,A[f])) : "" } +#_________________________________________________________________ +func _bframe(A,t,p) { ########################################### + return _bframe_i0(A,t,p,A[""]) } +#___________________________________________________________ +func _bframe_i0(A,t,p,f) { + return f ? (_bframe_i0(A,t,p,A[f]) @f(t,p)) : "" } +#_________________________________________________________________ +func _insframe(A,f) { ########################################### + A[f]=A[""]; A[""]=f } +#_______________________________________________________________________ +######################################################################## + + + + + + + + + +func _fthru(A,c,p, B) { + return _fthru_i0(A,c,p,B,A[""]) } +#_________________________________________________________________ +func _fthru_i0(A,c,p,B,f) { + return f ? @f(c,_fthru_i0(A,c,p,B,A[f]),B) : "" } + + + + + + + + + + + +#_______________________________________________________________________ +######################################################################## +#EXPERIMENTAL + +func _rexpfn(R,t,p) { + _REXPFN[""]="" + while ( t ) { + t=_rxpfn(R,t,p) } + return _REXPFN[""] } + +func _rxpfn(R,t,p, i,f,A) { + for ( i in R ) { + if ( match(t,i,A) ) { + f=R[i]; if ( t!=(t=@f(A,substr(t,RLENGTH+1),p)) ) return t } } + return _rexpfnend(t) } + +func _rexpfnend(t) { + _REXPFN[""]=t } + + +func _ffaccr(A,t,p,P) { + return _faccr_i0(A["F"],t,p,P) } + +func _fbaccr(A,t,p,P) { + return _faccr_i0(A["B"],t,p,P) } + +func _faccr_i0(A,t,p,P, f,r) { + f=r="" + if ( isarray(A) ) { + while ( (f=A[f]) ) r=r @f(t,p,P) } + return r } + +func _ffaccl(A,t,p,P) { + return _faccl_i0(A["F"],t,p,P) } + +func _fbaccl(A,t,p,P) { + return _faccl_i0(A["B"],t,p,P) } + +func _faccl_i0(A,t,p,P, f,r) { + f=r="" + if ( isarray(A) ) { + while ( (f=A[f]) ) r=@f(t,p,P) r } + return r } + + +func _Foreach(A,f, p0, i) { + for ( i in A ) @f(A,i,p0) } +#_______________________________________________________________________ +func _foreach(A,f,r,p0,p1,p2, i,p) { #################################### + if ( isarray(A) ) { + _TMP0[p=_n()]["."]=1 + _foreach_i0(A,f,_TMP0[p],p0,p1,p2) + return _th0(_retarr(_TMP0[p]),_tdel(p)) } + if ( _isptr(A) ) { + _TMP0[p=_n()][_ARRLEN]=1 + _tframe4("_foreach_i1" (r ? "~" r : ""),A,f,_TMP0[p],p0,p1) + return _th0(_retarr(_TMP0[p]),_tdel(p)) } } + #_____________________________________________________ + func _foreach_i0(A,f,D,p0,p1,p2) { + for ( i in A ) { + if ( isarray(A[i]) ) _foreach_i0(A[i],f,D,p0,p1,p2) + else _gen(D,@f(A[i],p0,p1,p2)) } } + #_____________________________________________________ + func _foreach_i1(p,f,D,p0,p1,p2) { + + _gen(D,@f(p,p0,p1,p2)) } + +BEGIN{ + _datablock_length =262144 } + +func _gen(D,t) { + if ( length(D[D[_ARRLEN]]=D[D["."]] t)>_datablock_length ) { + D[++D[_ARRLEN]]="" } } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#################################################################################### +# PUBLIC: +#_____________________________________________________________________________ +# fn _th0,_th1,_th2,_th3 +# USAGE: +# _th0(p1,p2,p3,p4) +# +# Each of this functions can have up to 4 parameters. +# _th0(p1,p2,p3,p4) return 1st parameter (p1) +# _th1(p1,p2,p3,p4) return 2nd parameter (p2) +# _th2(p1,p2,p3,p4) return 3rd parameter (p3) +# _th3(p1,p2,p3,p4) return 4th parameter (p4) +#_____________________________________________________________________________ +# fn _nop(p1,p2,p3,p4,p5,p6,p7,p8) +# USAGE: +# _nop() +# +# Does not do any action. No result returned. Up to 8 parameters. +#_____________________________________________________________________________ +# fn _exit(c) +# USAGE: +# _exit(code) +# +# This function do the same as GAWK-operator `exit code'. +#_____________________________________________________________________________ +# fn _getdate() +# fn _getime() +# fn _getsecond() +# fn _getsecondsync() +func _rdreg(D,p) { ################################################################ + _rdregp0="reg query \"" p "\" /S /reg:64 2>NUL"; _rdregfld=_rdregkey=0 + _rdregq0=split(gensub(/[\x0D?\x0A]{2,}/,_CHR["EOL"],"G",_cmd(_rdregp0)),_RDREGA0,/\x0D?\x0A/) + while ( _rdregq0>0 ) _rdreg_i0(D) + return _rdregfld+_rdregkey } + #___________________________________________________________ + func _rdreg_i0(D, A) { while ( _rdregq0>0 ){ + if ( match(_rdregp0=_RDREGA0[_rdregq0--],/ (.*) REG_((SZ)|(DWORD)|(QWORD)|(BINARY)|(EXPAND_SZ)|(MULTI_SZ)) (.*)$/,A) ) { + if ( !_rdreg_i0(D) ) { ++_rdregfld; D[_rdregp0 A[1] "." _RDREGTYPE[A[2]]]=A[9]; return } else break } + else if ( _rdregp0~/^HK/ ) { ++_rdregkey; return D[_rdregp0=_rdregp0 "\\"] } } return 1 } + #_____________________________________________________ + BEGIN { _initrdreg() } + func _initrdreg() { _RDREGTYPE["SZ"] ="STR" + _RDREGTYPE["DWORD"] ="W32" + _RDREGTYPE["QWORD"] ="W64" + _RDREGTYPE["BINARY"] ="BIN" + _RDREGTYPE["EXPAND_SZ"] ="XSZ" + _RDREGTYPE["MULTI_SZ"] ="MSZ" + _RDrdregfld=_rdregkey=0 } + +# _rdregfld : gvar - number of readed registry fields by _rdreg() +# _rdregkey : gvar - number of readed registry keys by _rdreg() +#_____________________________________________________________________________ +func _regpath0(D,i, s,q,S) { ############################################ 0 # + if ( i=_patharr0(S,i) ) { + if ( "name" in S ) D["name"]=S["name"]; if ( "ext" in S ) D["ext"]=S["ext"] + s=(toupper(s=i in S ? S[i] : "") in _REGPATH0REGDIR ? D[++q]=_REGPATH0REGDIR[toupper(s)] : (D[++q]=_REGPATH0REGDIR[""]) "\\" (D[++q]=s)) "\\" + while ( ++i in S ) s=s (D[++q]=S[i]) "\\" + if ( s!="" ) D[0]=s; IGNORECASE=1 + D["hostdir"]="\\\\" (D["host"]="host" in S && ((""==i=S["host"]) || "."==i || "?"==i || "localhost"==i) ? ENVIRON["COMPUTERNAME"] : i) "\\" s; IGNORECASE=0 } } + #_____________________________________________________ + BEGIN { _initregpath0() } + func _initregpath0() { _REGPATH0REGDIR[""] ="HKEY_LOCAL_MACHINE" + _REGPATH0REGDIR["HKLM"] ="HKEY_LOCAL_MACHINE" + _REGPATH0REGDIR["HKEY_LOCAL_MACHINE"] ="HKEY_LOCAL_MACHINE" + _REGPATH0REGDIR["HKCR"] ="HKEY_CLASSES_ROOT" + _REGPATH0REGDIR["HKEY_CLASSES_ROOT"] ="HKEY_CLASSES_ROOT" + _REGPATH0REGDIR["HKCU"] ="HKEY_CURRENT_USER" + _REGPATH0REGDIR["HKEY_CURRENT_USER"] ="HKEY_CURRENT_USER" + _REGPATH0REGDIR["HKU"] ="HKEY_USERS" + _REGPATH0REGDIR["HKEY_USERS"] ="HKEY_USERS" + _REGPATH0REGDIR["HKCC"] ="HKEY_CURRENT_CONFIG" + _REGPATH0REGDIR["HKEY_CURRENT_CONFIG"] ="HKEY_CURRENT_CONFIG" + _REGPATH0REGDIR["HKPD"] ="HKEY_PERFORMANCE_DATA" + _REGPATH0REGDIR["HKEY_PERFORMANCE_DATA"] ="HKEY_PERFORMANCE_DATA" } +#_________________________________________________________________________________________ +########################################################################################## + + + + + + + + + + + + + + + + + + + + + +func _getreg_i1(D,r,R, a,i,il,ir,rc,B) { + a=IGNORECASE; IGNORECASE=1; r="^" _torexp(r); rc=0 + zs="" + for ( i in R ) { if ( match(i,r,B) ) { il=B[_torexp_pfxcntr]; ir=gensub(/....$/,"",1,substr(i,1+B[_torexp_pfxcntr,"length"])) + if ( !gsub(/^\\/,"",ir) && match(il,/[^\\]+$/) ) ir=substr(il,RSTART) ir + D[ir]=R[i]; rc++ } } + IGNORECASE=a; if ( rc>0 ) return rc } +#_________________________________________________________________________________________ +func _rrdreg(DD,p, k,t,v,c,i,q,tT,A,B,C,D) { ############################################# old; regedit + if ( !_registrytmpfile ) _registryinit() + _cmd("regedit /E \"" _registrytmpfile "\" \"" p "\" 2>&1") + q=patsplit(gensub(/[\x00\xFF\xFE]+/,"","G",_rdfile(_registrytmpfile)),A,/\x0D?\x0A\[[^\]]+\]\x0D?\x0A/,B) + for ( i=1; i<=q; i++ ) { p=gensub(/(^[ \t\x0D\x0A]*\[)|((\\)\\+)|(\][ \t\x0D\x0A]*$)/,"\\3","G",A[i]); DD[p "\\"]; delete C[split(B[i],C,/[\x0D\x0A]+/)] + for ( c=1; c in C; c++ ) { tt=tt C[c]; if ( gsub(/\\$/,"",tt) ) continue + if ( tt=="" ) continue + if ( match(_th0(tt,tt=""),/((^"(([^\\"]|\\.)*)")|(@))=(("(([^\\"]|\\.)*)")|(dword:([[:xdigit:]]{8}))|(hex(\(([27b])\))?:(.*)))$/,D) ) { + if ( D[7] ) { t="STR"; v=_unstr(D[8]) } + else if ( D[10] ) { t="W32"; v=D[11] } + else { v=D[15] + if ( D[13] ) { switch ( D[14] ) { + case "2": t="XSZ"; break + case "7": t="MSZ"; break + default: t="W64" } } + else t="BIN" } + DD[gensub(/(\\)\\+/,"\\1","G",p "\\" _unstr(D[3] (D[5] ? "(Default)" : "")) "." t)]=v } + else _fatal("regedit: unknown output format(" c "): `" C[c] "'") } } } + #_____________________________________________________ + func _registryinit() { _registrytmpfile=_getmpfile() } +#_____________________________________________________________________________ +# _rdreg(ARRAY,reg_path) +# Import into ARRAY the content of the whole registree tree with the higher point specified by reg_path. +# ARRAY will be filled by the strings with following format: +# +# HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\GnuWin32\CoreUtils\5.3.0\pck\InstallPath.STR=C:\Program Files (x86)\GnuWin32 +# where: +# HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\GnuWin32\CoreUtils\5.3.0\pck <- REG KEY PATH +# InstallPath <- DATA FIELD +# STR <- TYPE +# C:\Program Files (x86)\GnuWin32 <- VALUE +# TYPE: +# STR - REG_SZ (String Value) +# W32 - REG_DWORD (DWORD (32-bit) Value) +# W64 - REG_QWORD (QWORD (64-bit) Value) +# BIN - REG_BINARY (Binary Value) +# XSZ - REG_EXPAND_SZ (Expandable String Value) +# MSZ - REG_MULTI_SZ (Multi-String Value) +#_________________________________________________________________________________________ + + + + +# HKCR HKEY_CLASSES_ROOT +# HKCU HKEY_CURRENT_USER +# HKLM HKEY_LOCAL_MACHINE +# HKU HKEY_USERS +# HKCC HKEY_CURRENT_CONFIG +# HKPD HKEY_PERFORMANCE_DATA + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#___________________________________________________________________________________ +#################################################################################### + + + + + + + + + + + + + + + + + + + + + + + +func _sysinfo(D,h) { ############################################################## + h="wmic /NODE: \"" h "\" OS 2>NUL" + if ( split(_cmd(h),_SYSINFOA0,/[\x0D\x0A]+/)==3 ) { + _sysinfol0=length(h=_SYSINFOA0[2])+1; _sysinfoq0=_sysinfoq1=split(_SYSINFOA0[1],_SYSINFOA0,/ +/,_SYSINFOB0) + while ( --_sysinfoq0>0 ) D[_sysinfof0]=gensub(/^ +| +$/,"","G",substr(h,_sysinfol0=_sysinfol0-(_sysinfol1=length(_sysinfof0=_SYSINFOA0[_sysinfoq0])+length(_SYSINFOB0[_sysinfoq0])),_sysinfol1)) + return _sysinfoq1-1 } } +#_____________________________________________________________________________ +func zzer() { ################################################################ + } + #_____________________________________________________ + BEGIN { _initsys() } + func _initsys() { } +#_________________________________________________________________________________________ +########################################################################################## + + + + + + + +#BootDevice BuildNumber BuildType Caption CodeSet CountryCode CreationClassName CSCreationClassName CSDVersion CSName CurrentTimeZone DataExecutionPrevention_32BitApplications DataExecutionPrevention_Available DataExecutionPrevention_Drivers DataExecutionPrevention_SupportPolicy Debug Description Distributed EncryptionLevel ForegroundApplicationBoost FreePhysicalMemory FreeSpaceInPagingFiles FreeVirtualMemory InstallDate LargeSystemCache LastBootUpTime LocalDateTime Locale Manufacturer MaxNumberOfProcesses MaxProcessMemorySize MUILanguages Name NumberOfLicensedUsers NumberOfProcesses NumberOfUsers OperatingSystemSKU Organization OSArchitecture OSLanguage OSProductSuite OSType OtherTypeDescription PAEEnabled PlusProductID PlusVersionNumber Primary ProductType RegisteredUser SerialNumber ServicePackMajorVersion ServicePackMinorVersion SizeStoredInPagingFiles Status SuiteMask SystemDevice SystemDirectory SystemDrive TotalSwapSpaceSize TotalVirtualMemorySize TotalVisibleMemorySize Version WindowsDirectory +#\Device\HarddiskVolume1 7601 Multiprocessor Free Microsoft Windows Server 2008 R2 Enterprise 1252 1 Win32_OperatingSystem Win32_ComputerSystem Service Pack 1 CPU 180 TRUE TRUE TRUE 3 FALSE FALSE 256 0 6925316 33518716 41134632 20110502192745.000000+180 20130426120425.497469+180 20130510134606.932000+180 0409 Microsoft Corporation -1 8589934464 {"en-US"} Microsoft Windows Server 2008 R2 Enterprise |C:\Windows|\Device\Harddisk0\Partition2 0 116 2 10 64-bit 1033 274 18 TRUE 3 Windows User 55041-507-2389175-84833 1 0 33554432 OK 274 \Device\HarddiskVolume2 C:\Windows\system32 C: 50311020 16758448 6.1.7601 C:\Windows + + + + + + + + + + + + + +BEGIN { ############################################################################ + + a=ENVIRON["EGAWK_CMDLINE"]; gsub(/^[ \t]*/,"",a) + a=_lib_CMDLN(a) + if ( (a!="") && (!_LIBAPI["F"]["!"]) ) { _out(_lib_HELP()); _fatal("Bad comandline argument `" a "'") } + gsub(/^[ \t]*/,"",a); ENVIRON["EGAWK_CMDLINE"]=a + _lib_APPLY(); if ( _basexit_fl ) exit + _INIT() + _START() + _END() } +#___________________________________________________________________________________ +func _INITBASE() { ################################################################ + + _egawk_utilpath =ENVIRON["EGAWK_PATH"] "BIN\\UTIL\\" } +#___________________________________________________________________________________ +#################################################################################### + + + + + + + +# make sure that stdout contain only expected characters +# make sure that stderr contain only expected characters +# redesign & reformat keys and its outputs +# try different key combinations +# add lib-specified to all libs + diff --git a/src/it/resources/gawk/profile5.ok b/src/it/resources/gawk/profile5.ok new file mode 100644 index 00000000..a6aeb46f --- /dev/null +++ b/src/it/resources/gawk/profile5.ok @@ -0,0 +1,8176 @@ +BEGIN { + _addlib("_BASE") +} + +#___________________________________________________________________________________ +BEGIN { ############################################################################ + BINMODE = "rw" + SUBSEP = "\000" + _NULARR[""] + delete _NULARR[""] + _INITBASE() +} + +BEGIN { + _addlib("_sYS") +} + +BEGIN { + _addlib("_rEG") +} + +BEGIN { + _addlib("_INSTRUC") +} + +#___________________________________________________________________________________ +BEGIN { ############################################################################# + _delay_perfmsdelay = 11500 +} + +BEGIN { + _addlib("_ARR") +} + +#___________________________________________________________________________________ +BEGIN { +} + +########################################################################### +BEGIN { + _addlib("_EXTFN") +} + +#___________________________________________________________________________________ +BEGIN { ############################################################################# + delete _XCHR + delete _ASC + delete _CHR + t = "" + for (i = 0; i < 256; i++) { + _ASC[a = _CHR[i] = sprintf("%c", i)] = i + _QASC[a] = sprintf("%.3o", i) + _XCHR[_CHR[i]] = sprintf("%c", (i < 128 ? i + 128 : i - 128)) + } + #_____________________________________________________________________________ + for (i = 0; i < 256; i++) { + _QSTRQ[_CHR[i]] = "\\" sprintf("%.3o", i) + } + #_______________________________________________________________________ + for (i = 0; i < 32; i++) { + _QSTR[_CHR[i]] = _QSTRQ[_CHR[i]] + } + for (; i < 128; i++) { + _QSTR[_CHR[i]] = _CHR[i] + } + for (; i < 256; i++) { + _QSTR[_CHR[i]] = _QSTRQ[_CHR[i]] + } + _QSTR["\\"] = "\\\\" #; _QSTR["\""]="\\\"" + #_____________________________________________________________________________ + _CHR["CR"] = "\r" + _CHR["EOL"] = "\r\n" + _CHR["EOF"] = "\032" + _QSTR[_CHR["EOL"]] = "\\015\\012" + #_______________________________________________________________________ + _CHR["MONTH"][_CHR["MONTH"]["Jan"] = "01"] = "Jan" + _CHR["MONTH"][_CHR["MONTH"]["Feb"] = "02"] = "Feb" + _CHR["MONTH"][_CHR["MONTH"]["Mar"] = "03"] = "Mar" + _CHR["MONTH"][_CHR["MONTH"]["Apr"] = "04"] = "Apr" + _CHR["MONTH"][_CHR["MONTH"]["May"] = "05"] = "May" + _CHR["MONTH"][_CHR["MONTH"]["Jun"] = "06"] = "Jun" + _CHR["MONTH"][_CHR["MONTH"]["Jul"] = "07"] = "Jul" + _CHR["MONTH"][_CHR["MONTH"]["Aug"] = "08"] = "Aug" + _CHR["MONTH"][_CHR["MONTH"]["Sep"] = "09"] = "Sep" + _CHR["MONTH"][_CHR["MONTH"]["Oct"] = "10"] = "Oct" + _CHR["MONTH"][_CHR["MONTH"]["Nov"] = "11"] = "Nov" + _CHR["MONTH"][_CHR["MONTH"]["Dec"] = "12"] = "Dec" + #_____________________________________________________________________________ + _TAB_STEP_DEFAULT = 8 + #_____________________________________________________________________________ + for (i = 0; i < 32; i++) { + _REXPSTR[_CHR[i]] = _QSTRQ[_CHR[i]] + } + for (; i < 256; i++) { + _REXPSTR[_CHR[i]] = _CHR[i] + } + _gensubfn("\\^$.()|{,}[-]?+*", ".", "_rexpstr_i0") +} + +BEGIN { + _addlib("_SYSIO") +} + +#___________________________________________________________________________________ +BEGIN { ############################################################################# + _SYS_STDCON = "CON" + _CON_WIDTH = match(_cmd("MODE " _SYS_STDCON " 2>NUL"), /Columns:[ \t]*([0-9]+)/, A) ? strtonum(A[1]) : 80 +} + +BEGIN { + _addlib("_FILEIO") +} + +#___________________________________________________________________________________ +BEGIN { ############################################################################# + if (_SYS_STDOUT == "") { + _SYS_STDOUT = "/dev/stdout" + } + if (_SYS_STDERR == "") { + _SYS_STDERR = "/dev/stderr" + } + _CHR["SUBDIR"] = "\\" + if (_gawk_scriptlevel < 1) { + match(b = _cmd("echo %CD% 2>NUL"), /[^\x00-\x1F]*/) + ENVIRON["CD"] = _FILEIO_RD = _filerd(substr(b, RSTART, RLENGTH) _CHR["SUBDIR"]) + _FILEIO_R = _filer(_FILEIO_RD) + _FILEIO_D = _filed(_FILEIO_RD) + _setmpath(_filerd(_FILEIO_RD "_tmp" _CHR["SUBDIR"])) + } +} + +BEGIN { + _addlib("_tOBJ") +} + +#___________________________________________________________________________________ +BEGIN { ############################################################################# + _tInBy = "\212._tInBy" + _tgenuid_init() + _UIDS[""] + delete _UIDS[""] + _UIDSDEL[""] + delete _UIDSDEL[""] + _tPREV[""] + _tPARENT[""] + _tNEXT[""] + _tFCHLD[""] + _tQCHLD[""] + _tLCHLD[""] + _tLINK[""] + _tCLASS[""] + _tSTR[""] + _tDLINK[""] + _[""] + delete _[""] + _ptr[""] + delete _ptr[""] + _TMP0[""] + delete _TMP0[""] + _TMP1[""] + delete _TMP1[""] +} + +BEGIN { + _addlib("_ERRLOG") +} + +#___________________________________________________________________________________ +BEGIN { ############################################################################# + if (_gawk_scriptlevel < 1) { + _ERRLOG_TF = 1 + _ERRLOG_VF = 1 + _ERRLOG_IF = 1 + _ERRLOG_WF = 1 + _ERRLOG_EF = 1 + _ERRLOG_FF = 1 + _wrfile(_errlog_file = _getmpfile("OUTPUT.LOG"), "") + } +} + +BEGIN { + _addlib("_SHORTCUT") +} + +#___________________________________________________________________________________ +BEGIN { + _shortcut_init() +} + +######################################################### +BEGIN { + _addlib("_eXTFN") +} + +#___________________________________________________________________________________ +BEGIN { + _extfn_init() +} + +############################################################ +BEGIN { + _addlib("_sHARE") +} + +BEGIN { + _addlib("_FILEVER") +} + +BEGIN { + _addlib("_DS") ############################################################################### + _PRODUCT_NAME = "Deployment Solution Control" + _PRODUCT_VERSION = "1.0" + _PRODUCT_COPYRIGHT = "Copyright (C) 2013 by CosumoGEN" + _PRODUCT_FILENAME = "_main.ewk" +} + +# problem configuring uid by array charset: i can' understand what format of the array: possibly - remove array support +# after removal of array format detection: there is unfinished conflicts: it is possible to totally remove array uid-gen initialization + +#_____________________________________________________ +BEGIN { + _inituidefault() +} + +#_____________________________________________________ +BEGIN { + _initfilever() +} + +#_____________________________________________________ +BEGIN { + _initshare() +} + +#_________________________________________________________________ +BEGIN { + _inspass(_IMPORT, "_import_data") +} + +#_______________________________________________ +BEGIN { + _TEND[_ARRLEN] = 0 + _TYPEWORD = "_TYPE" +} + +#_______________________________________________ +BEGIN { + _ARRLEN = "\032LEN" + _ARRPTR = "\032PTR" + _ARRSTR = "" +} + +#_____________________________________________________ +BEGIN { + _getperf_fn = "_nop" +} + +BEGIN { + _datablock_length = 262144 +} + +#_____________________________________________________ +BEGIN { + _initrdreg() +} + +#_____________________________________________________ +BEGIN { + _initregpath0() +} + +#_____________________________________________________ +BEGIN { + _initsys() +} + +#_________________________________________________________________________________________ +########################################################################################## + + + + + + + +#BootDevice BuildNumber BuildType Caption CodeSet CountryCode CreationClassName CSCreationClassName CSDVersion CSName CurrentTimeZone DataExecutionPrevention_32BitApplications DataExecutionPrevention_Available DataExecutionPrevention_Drivers DataExecutionPrevention_SupportPolicy Debug Description Distributed EncryptionLevel ForegroundApplicationBoost FreePhysicalMemory FreeSpaceInPagingFiles FreeVirtualMemory InstallDate LargeSystemCache LastBootUpTime LocalDateTime Locale Manufacturer MaxNumberOfProcesses MaxProcessMemorySize MUILanguages Name NumberOfLicensedUsers NumberOfProcesses NumberOfUsers OperatingSystemSKU Organization OSArchitecture OSLanguage OSProductSuite OSType OtherTypeDescription PAEEnabled PlusProductID PlusVersionNumber Primary ProductType RegisteredUser SerialNumber ServicePackMajorVersion ServicePackMinorVersion SizeStoredInPagingFiles Status SuiteMask SystemDevice SystemDirectory SystemDrive TotalSwapSpaceSize TotalVirtualMemorySize TotalVisibleMemorySize Version WindowsDirectory +#\Device\HarddiskVolume1 7601 Multiprocessor Free Microsoft Windows Server 2008 R2 Enterprise 1252 1 Win32_OperatingSystem Win32_ComputerSystem Service Pack 1 CPU 180 TRUE TRUE TRUE 3 FALSE FALSE 256 0 6925316 33518716 41134632 20110502192745.000000+180 20130426120425.497469+180 20130510134606.932000+180 0409 Microsoft Corporation -1 8589934464 {"en-US"} Microsoft Windows Server 2008 R2 Enterprise |C:\Windows|\Device\Harddisk0\Partition2 0 116 2 10 64-bit 1033 274 18 TRUE 3 Windows User 55041-507-2389175-84833 1 0 33554432 OK 274 \Device\HarddiskVolume2 C:\Windows\system32 C: 50311020 16758448 6.1.7601 C:\Windows +BEGIN { ############################################################################ + a = ENVIRON["EGAWK_CMDLINE"] + gsub(/^[ \t]*/, "", a) + a = _lib_CMDLN(a) + if ((a != "") && (! _LIBAPI["F"]["!"])) { + _out(_lib_HELP()) + _fatal("Bad comandline argument `" a "'") + } + gsub(/^[ \t]*/, "", a) + ENVIRON["EGAWK_CMDLINE"] = a + _lib_APPLY() + if (_basexit_fl) { + exit + } + _INIT() + _START() + _END() +} + +#_____________________________________________________________________________ +END { ######################################################################## + _EXIT() +} + +#_______________________________________________________________________ +######################################################################## +END { ############################################################################### + if (_gawk_scriptlevel < 1) { + close(_errlog_file) + p = _Zimport(_rdfile(_errlog_file), _N()) + if ((t = _get_errout(p)) != "") { + _expout(t, "/dev/stderr") + } + } +} + +########################################################################################## +# PUBLIC: +#_____________________________________________________________________________ +# _rFBRO(ptr) - Return ptr of first-bro. [TESTED] +# If !ptr then returns "". +#_____________________________________________________________________________ +# _rLBRO(ptr) - Return ptr of last-bro. [TESTED] +# If !ptr then returns "". +#_____________________________________________________________________________ +# _rQBRO(ptr) - Returns brothers total quantity. [TESTED] +# If !ptr then returns "". +END { ############################################################################### + if (_gawk_scriptlevel < 1) { + if (! _fileio_notdeltmpflag) { + _FILEIO_TMPATHS[_FILEIO_TMPRD] + _Foreach(_FILEIO_TMPATHS, "_uninit_del") + } + } +} + +#___________________________________________________________________________________ +#################################################################################### + + + + + + + + + + + + + + + + +#___________________________________________________________________________________ +# fn _dirtree(array,pathmask) +# +# Return in `array' file tree from pathmask: +# array["file.filerdne"]="size date time" +# array["subdir.filerd"]["file.filerdne"]="size date time" +# array["subdir.filerd"]["file.filerd"][...] +# +# The array will be cleared before any action. Function return pathmask w/o ltabspc and rtabspc. +#___________________________________________________________________________________ + + + + + +# OK: change internal function's names to: w\o "_" +# OK: FLENGTH: should cover r-spcs +# OK: optimize REXP +# OK: add new symbols to dir/file names ( ! and + ) +# OK: create _getfilepath() +# OK: del - conflict with WROOTDIR (do not update it) +# OK: dir/del - support for filemask ( * and ? ) +# OK: how to define code injections: header\ender; and HANDLERS +# OK: units in header\ender? conline division... +# OK: _FILEPATH problem: it will not been defined at the moment when subscript0 starts - at the start TMPRD="_tmp" +# OK: del: if del("dir\\") - then all ok except it NOT deleted "dir\\" - _del function removed(renamed to __del) +# OK: tmpdirs: it delete only autotmp dir and only from script0 +# OK: MICROTEST: global testing of filepath (UNC! CORRECT RESULTS! ) +# question about cache: did new just now generated absolute filepath cached in FILECACHE? its seems like NO +# check _untmp: CONFLICT: if file or dir from autotmp dir will be untmp then it anyway will be deleted; but file or dir from other point never be deleted anyway - so what is the point of untmp????? +#ERRLOG: _setmpath: warning!!!!! + +#___________________________________________________________________________________ +#################################################################################### +# PUBLIC: +#___________________________________________________________________________________ +# +# fn _rdfile(_filepath) +# +# Read and return data from file specified in _filepath. +# If _filepath=="" then no action occured and return "". +# Function read and return data from file. No any changes in data occured. +# Function use _filerdne function internally. If some syntax error +# found in _filepath then function return "". +# If some error occured while reading data from file then fuction return "" +# and error-text is in ERRNO(and no close-file action will be occured!). +# If reading data completed successfully then function try to close +# file and if while closing file some error occured then function +# returns "" and error-text is in ERRNO. +# Otherwise function returns readed data. +#_____________________________________________________________________________ +# +# fn _wrfile(_filepath,_data) +# +# Write data into file specified in _filepath. +# If _filepath=="" then no action occured and return "". +# Function write _data to file. No any changes in data occured. +# Function use _filerdne function internally. If some syntax error +# found in _filepath then function return "". +# If some error occured while writing data to file then fuction return "" +# and error-text is in ERRNO(and no close-file action will be occured!). +# If writing data completed successfully then function try to close +# file and if while closing file some error occured then function +# returns "" and error-text is in ERRNO. +# Otherwise function returns _filepath(re-processed). +#___________________________________________________________________________________ +# +# fn _filepath(_filepath) +# +# Return re-processed root-dir-name-ext of _filepath. +# If _filepath=="" then no action occured and return "". +# If some syntax error found in _filepath then function return "" +# (and NO _filepath-cache-record will be created!). +#_____________________________________________________________________________ +# +# fn _filerdne(_filepath) +# +# Return re-processed root-dir-filename of _filepath. +# If _filepath=="" then no action occured and return "". +# Function return result only if in _filepath present file-name(name +# and/or extension) - otherwise its return "". +# If some syntax error found in _filepath then function return "" +# (and NO _filepath-cache-record will be created!). +#_____________________________________________________________________________ +# +# fn _filerdn(_filepath) +# +# Return re-processed root-dir-name of _filepath. +# If _filepath=="" then no action occured and return "". +# Function return result only if in _filepath present name field - +# - otherwise its return "". +# If some syntax error found in _filepath then function return "" +# (and NO _filepath-cache-record will be created!). +#_____________________________________________________________________________ +# +# fn _filerd(_filepath) +# +# Return re-processed root-dir of _filepath. +# If _filepath=="" then no action occured and return "". +# If some syntax error found in _filepath then function return "" +# (and NO _filepath-cache-record will be created!). +#_____________________________________________________________________________ +# +# fn _filer(_filepath) +# +# Return re-processed root of _filepath. +# If _filepath=="" then no action occured and return "". +# If some syntax error found in _filepath then function return "" +# (and NO _filepath-cache-record will be created!). +#_____________________________________________________________________________ +# +# fn _filed(_filepath) +# +# Return re-processed dir of _filepath. +# If _filepath=="" then no action occured and return "". +# There is only one case when dir string can be =="" - when in +# _filepath specified unmounted drive(MS-format) and from- +# current-location address used(like Z:file.ext). In this +# case no rootdir-cache-record will be created. +# If some syntax error found in _filepath then function return "" +# (and NO _filepath-cache-record will be created!). +#_____________________________________________________________________________ +# fn _filene(_filepath) +# +# Return re-processed name-ext of _filepath. +# If _filepath=="" then no action occured and return "". +# Function return result only if in _filepath present file-name(name +# and/or extension) - otherwise its return "". +# If some syntax error found in _filepath then function return "" +# (and NO _filepath-cache-record will be created!). +#_____________________________________________________________________________ +# +# fn _filen(_filepath) +# +# Return re-processed name of _filepath. +# If _filepath=="" then no action occured and return "". +# Function return result only if in _filepath present name field - +# - otherwise its return "". +# If some syntax error found in _filepath then function return "" +# (and NO _filepath-cache-record will be created!). +#_____________________________________________________________________________ +# +# fn _file(_filepath) +# +# Return re-processed ext of _filepath. +# If _filepath=="" then no action occured and return "". +# Function return result only if in _filepath present ext field - +# - otherwise its return "". +# If some syntax error found in _filepath then function return "" +# (and NO _filepath-cache-record will be created!). +#___________________________________________________________________________________ +# +# fn _dir(_ARR,_filepathmask) +# +# Get file-/folder-list of root-folder of _filepathmask. +# If _filepathmask=="" then no action occured and return "". +# _filepathmask can contain symbols like `*' and `?' as like +# its used in `dir'-shell command. +# Function gets file-/folder-list of specified root-dir-_filepathmask +# and return this list in array _ARR - where each element: +# +# index - is the _filepath of file-or-folder name-ext +# value - contains 3 fields separated by " ": +# 1. =="D" if this is folder +# ==/[0-9]+/ if this is file - size of file in bytes +# 2. ==date-of-creation of file or folder +# 3. ==time-of-creation of file or folder +# +# Function returns quantity of items in ARR. +#___________________________________________________________________________________ +# +# fn _filexist(_filepath) +# +# Test if file or path or drive specified in _filepath is exist. +# If _filepath=="" then no action occured and return "". +# If some syntax error found in _filepath then function return "" +# (and NO _filepath-cache-record will be created!). +# Function returns _filepath if _filepath is exist. Otherwise +# function return 0. +#_____________________________________________________________________________ +# +# fn _filenotexist(_filepath) +# +# Test if file or path or drive specified in _filepath is not exist. +# If _filepath=="" then no action occured and return "". +# If some syntax error found in _filepath then function return "" +# (and NO _filepath-cache-record will be created!). +# Function returns 1 if _filepath is not exist. Otherwise function +# return 0. +#_____________________________________________________________________________ +# +# fn _newdir(_filepath) +# +# Create path specified in root-dir-_filepath. +# If _filepath=="" then no action occured and return "". +# If some syntax error found in _filepath then function return "" +# (and NO _filepath-cache-record will be created!). +# Function returns root-dir of _filepath. +#_______________________________________________________________________ +# +# fn _newdir(_filepath) +# +# Create path specified in root-dir-_filepath. If this folder +# already exist then it will be completely cleared. +# If _filepath=="" then no action occured and return "". +# If some syntax error found in _filepath then function return "" +# (and NO _filepath-cache-record will be created!). +# Function returns root-dir of _filepath. +#___________________________________________________________________________________ +# +# fn _getmpfile(_filepath,_currfilepath) +# +# Return .... +# +#_____________________________________________________________________________ +# +# fn _getmpdir(_filepath,_currfilepath) +# +# Return ... +# +#_____________________________________________________________________________ +# +# Temporary files folder. +# +# Temporary files folder location is defined by _FILEIO_TMPRD. +# If it wasn't been initialized before program run or not been initialized +# by ENVIRON["TMPDIR"] then it will defined as the: +# `current rootdir(stored in _FILEIO_RD)\programname.TMP' +# In this case if its already exist then it will completely cleared when _FILEIO +# library initialization processed. +# And at the program uninitialization processed it will completely +# cleared if _FILEIO_TMPCLRFLAG is true. +#___________________________________________________________________________________ +# +# var _FILEIO_RD (ENVIRON["CD"]) +# +# This var can be set before running program. It can contain path which +# will be used as default current dir while program run. +# If this var is set before program runs - then it will be refreshed by the +# _filerd it will be used as default current dir while program run. +# If this var is not set before program runs - then ENVIRON["CD"] can also +# set up default current dir while program run. If it set before program +# begin then it will be refreshed by the _filerd - and also writed into +# _FILEIO_RD. +# If both _FILEIO_RD and ENVIRON["CD"] are not set before program begins +# then real current root\dir will be writed into both _FILEIO_RD and +# ENVIRON["CD"] and it will be used as default current dir while program run. +# +#___________________________________________________________________________________ +# +# var _FILEIO_TMPRD (ENVIRON["TMPRD"]) +# +# This var can be set before running program. It can contain path which +# will be used as default temporary files root-folder while program run. +# If this var is set before program runs - then it will be refreshed by the +# _filerd - and also writed into ENVIRON["TMPRD"]. +# If this var is not set before program runs - then ENVIRON["TMPRD"] can also +# set up default temporary files root-folder while program run. If it set +# before program begin then it will be refreshed by the _filerd - and +# also writed into _FILEIO_TMPRD. +# If both _FILEIO_TMPRD and ENVIRON["TMPRD"] are not set before program begins +# then new folder into path specified by the _FILEIO_RD(after its handling) +# will be writed into both _FILEIO_TMPRD and ENVIRON["TMPRD"] and it +# will be used as default temporary files root-folder while program run. +#___________________________________________________________________________________ +# +# var _FILEPATH +# +# This var contain filepath of working script. It should be setting up externally. +# +# var _gawk_scriptlevel +#___________________________________________________________________________________ +#################################################################################### +END { ############################################################################### + if (_constatstrln > 0) { + _constat() + } +} + +#___________________________________________________________________________________ +#################################################################################### + + + + + + + +# make sure that stdout contain only expected characters +# make sure that stderr contain only expected characters +# redesign & reformat keys and its outputs +# try different key combinations +# add lib-specified to all libs + +#_______________________________________________________________________ +function W(p, p0, p1) +{ + ##################################################### + if (isarray(p0)) { + delete p0[p] + if (isarray(p1)) { + for (i in p1) { + if (isarray(p1[i])) { + p0[p][i][""] + delete p0[p][i][""] + _N_i0(p0[p][i], p1[i]) + } else { + p0[p][i] = p1[i] + } + } + return p + } + return (p0[p] = p1) + } + delete _[p][p0] + if (isarray(p1)) { + for (i in p1) { + if (isarray(p1[i])) { + _[p][p0][i][""] + delete _[p][p0][i][""] + _N_i0(_[p][p0][i], p1[i]) + } else { + _[p][p0][i] = p1[i] + } + } + return p + } + return (_[p][p0] = p1) +} + +########################################################## +function _ARR(c, t, P) +{ + switch (c) { + case "_lib_CMDLN": + return t + #___________________________________________________________ + case "_lib_APPLY": + return + #___________________________________________________________ + case "_lib_HELP": + return + #___________________________________________________________ + case "_lib_NAMEVER": + return _ln("_ARR 1.0") + #___________________________________________________________ + case "_lib_BEGIN": + return + #___________________________________________________________ + case "_lib_END": + return + } +} + +########################################################## +function _BASE(c, t, P, A) +{ + switch (c) { + case "_lib_CMDLN": + if (match(t, /^((--([Vv])ersion)|(-([Vv])))[ \t]*/, A)) { + t = substr(t, RLENGTH + 1) + _cmdln_version = A[3] A[5] + } else if (match(t, /^((-?\?)|(--help))[ \t]*/)) { + t = substr(t, RLENGTH + 1) + _cmdln_help = 1 + } else if (match(t, /^--[ \t]*/)) { + return _endpass(substr(t, RLENGTH + 1)) + } + return t + #___________________________________________________________ + case "_lib_APPLY": + if (_cmdln_help) { + match(_fbaccr(_LIBAPI, "_lib_HELP"), /^([^\x00]*)\x00([^\x01]*)\x01(.*)/, A) + _out(A[2] A[1] A[3]) + return _endpass(_basexit_fl = 1) + } + if (_cmdln_version) { + _out(_ln(_PRODUCT_NAME " v" _PRODUCT_VERSION) _ln(_PRODUCT_COPYRIGHT) _ln() (_cmdln_version == "v" ? "" : _lib_NAMEVER())) + return _endpass(_basexit_fl = 1) + } + return + #___________________________________________________________ + case "_lib_HELP": + return ("\000" _ln(_PRODUCT_NAME " v" _PRODUCT_VERSION) _ln(_PRODUCT_COPYRIGHT) _ln() _ln(" Usage:") _ln() _ln(" " _PRODUCT_FILENAME " [/key1 /key2...] [-- cmdline]") _ln() _ln(" keys:") _ln() "\001" _ln(" -v -V --version - output product version and (if /V) all modules") _ln(" ? -? --help - output this help page") _ln(" -- - command line string edge")) + #___________________________________________________________ + case "_lib_NAMEVER": + return _ln("_BASE 3.0") + #___________________________________________________________ + case "_lib_BEGIN": + return + #___________________________________________________________ + case "_lib_END": + return + } +} + +#____________________________________________________________________________ +function _DS(c, t, P, a, A) +{ + ###################################################### + switch (c) { #___________________________________________________________ + case "_lib_CMDLN": + return t + #_____________________________________________________ + case "_lib_APPLY": + return + #_____________________________________________________ + case "_lib_HELP": + return (_ln() _ln(" Usage: " _PRODUCT_NAME " [/key1 /key2...] sourcefile [cmdline]") _ln()) + #_____________________________________________________ + case "_lib_NAMEVER": + return + #_____________________________________________________ + case "_lib_BEGIN": + return + #_____________________________________________________ + case "_lib_END": + return + } +} + +#______________________________________________________________________________________________ +function _END() +{ + ################################################################################# +} + +######################################################## +function _ERRLOG(c, t, P, a, b, A) +{ + switch (c) { + case "_lib_CMDLN": + if (match(t, /^[ \t]*-L:([TtVvIiWwEeFf]*)[ \t]*/, A)) { + t = substr(t, RLENGTH + 1) + _errlog_errflkey = _errlog_errflkey A[1] + } + return t + #_______________________________________________________________________ + case "_lib_APPLY": + if (_errlog_errflkey) { + split(_errlog_errflkey, A, "") + for (a = 1; a in A; a++) { + if (A[a] == toupper(A[a])) { + b = 1 + } else { + b = "" + } + switch (toupper(A[a])) { + case "T": + _ERRLOG_TF = b + break + case "V": + _ERRLOG_VF = b + break + case "I": + _ERRLOG_IF = b + break + case "W": + _ERRLOG_WF = b + break + case "E": + _ERRLOG_EF = b + break + case "F": + _ERRLOG_FF = b + break + } + } + if (_ERRLOG_IF) { + _info("Log-message types inherited acc/deny: " "TRACE " (_ERRLOG_TF ? "ON" : "OFF") "/" "VERBOSE " (_ERRLOG_VF ? "ON" : "OFF") "/" "INFO " (_ERRLOG_IF ? "ON" : "OFF") "/" "WARNING " (_ERRLOG_WF ? "ON" : "OFF") "/" "ERROR " (_ERRLOG_EF ? "ON" : "OFF") "/" "FATAL " (_ERRLOG_FF ? "ON" : "OFF")) + } + } + return + #_______________________________________________________________________ + case "_lib_HELP": + return (_ln(" -L:TtVvIiWwEeFf - enable(upcase: TVIWEF) or disable(lowcase: tviwef) allowable type of") _ln(" log messages. Trace/Verbose/Informational/Warning/Error/Fatal.") _ln()) + #_______________________________________________________________________ + case "_lib_NAMEVER": + return _ln("_ERRLOG 1.0") + #_______________________________________________________________________ + case "_lib_BEGIN": + P["_ERRLOG_TF"] = _ERRLOG_TF + P["_ERRLOG_VF"] = _ERRLOG_VF + P["_ERRLOG_IF"] = _ERRLOG_IF + P["_ERRLOG_WF"] = _ERRLOG_WF + P["_ERRLOG_EF"] = _ERRLOG_EF + P["_ERRLOG_FF"] = _ERRLOG_FF + P["_errlog_file"] = "/dev/stderr" + return + } +} + +#______________________________________________________________________________________________ +function _EXIT() +{ + ################################################################################ +} + +######################################################## +function _EXTFN(c, t, P) +{ + switch (c) { + case "_lib_CMDLN": + return t + #___________________________________________________________ + case "_lib_APPLY": + return + #___________________________________________________________ + case "_lib_HELP": + return + #___________________________________________________________ + case "_lib_NAMEVER": + return _ln("_EXTFN 1.0") + #___________________________________________________________ + case "_lib_BEGIN": + return + #___________________________________________________________ + case "_lib_END": + return + } +} + +####################################################### +function _FILEIO(c, t, P, A) +{ + switch (c) { + case "_lib_CMDLN": + if (match(t, /^[ \t]*-[Tt]([\+-])[ \t]*/, A)) { + t = substr(t, RLENGTH + 1) + if (A[1] == "+") { + _fileio_notdeltmpflag = 1 + } else { + _fileio_notdeltmpflag = "" + } + } + return t + #___________________________________________________________ + case "_lib_APPLY": + if (_fileio_notdeltmpflag) { + _info("Temporary objects deletion DISABLED (inherited)") + } + return + #___________________________________________________________ + case "_lib_HELP": + return (_ln(" -[Tt][+-] - inherited: +enable\\-disable temporary files\\dirs deletion") _ln()) + #___________________________________________________________ + case "_lib_NAMEVER": + return _ln("_FILEIO 2.1") + #___________________________________________________________ + case "_lib_BEGIN": + P["ENVIRON"]["CD"] = ENVIRON["CD"] + P["_FILEIO_RD"] = _FILEIO_RD + P["_FILEIO_R"] = _FILEIO_R + P["_FILEIO_D"] = _FILEIO_D + if (! ("_FILEIO_TMPRD" in P)) { + P["_FILEIO_TMPRD"] = _getmpdir(_filen(P["SOURCE"]) "." ++_egawk_subcntr _CHR["SUBDIR"]) + } + return + #___________________________________________________________ + case "_lib_END": + return + } +} + +############################################################ + +#_____________________________________________________________________________ +function _FILEVER(c, t, P, a, A) +{ + ################################################# + switch (c) { #___________________________________________________________ + case "_lib_CMDLN": + return t + #_____________________________________________________ + case "_lib_APPLY": + return + #_____________________________________________________ + case "_lib_HELP": + return + #_____________________________________________________ + case "_lib_NAMEVER": + return + #_____________________________________________________ + case "_lib_BEGIN": + return + #_____________________________________________________ + case "_lib_END": + return + } +} + +function _Foreach(A, f, p0, i) +{ + for (i in A) { + @f(A, i, p0) + } +} + +function _INIT(f) +{ +} + +#___________________________________________________________________________________ +function _INITBASE() +{ + ################################################################ + _egawk_utilpath = ENVIRON["EGAWK_PATH"] "BIN\\UTIL\\" +} + +###################################################### +function _INSTRUC(c, t, P) +{ + switch (c) { + case "_lib_CMDLN": + return t + #___________________________________________________________ + case "_lib_APPLY": + return + #___________________________________________________________ + case "_lib_HELP": + return + #___________________________________________________________ + case "_lib_NAMEVER": + return _ln("_INSTRUC 1.0") + #___________________________________________________________ + case "_lib_BEGIN": + return + #___________________________________________________________ + case "_lib_END": + return + } +} + +#___________________________________________________________________________________ + + +#################################################################################### + + +#_____________________________________________________________________________ +function _N(F, v, p) +{ + ########################################################### + for (p in _UIDS) { + delete _UIDS[p] + return _nN_i0(p, F, v) + } + return _nN_i0(_tgenuid(), F, v) +} + +##################################################### +function _SHORTCUT(c, t, P) +{ + switch (c) { + case "_lib_CMDLN": + return t + #___________________________________________________________ + case "_lib_APPLY": + return + #___________________________________________________________ + case "_lib_HELP": + return + #___________________________________________________________ + case "_lib_NAMEVER": + return _ln("_shortcut 1.0") + #___________________________________________________________ + case "_lib_BEGIN": + return + #___________________________________________________________ + case "_lib_END": + return + } +} + +#______________________________________________________________________________________________ +function _START(t, i, A) +{ + ######################################################################### + _torexp_init() + test_uid() + return + _conl(patsplit("a,b,c", A, /[^,]/, B)) + test_splitstr() + return + A[""] + _CLASSPTR["ptr"] + ALTARR["ptra"] + _conl(_dumparr(SYMTAB)) + BB[1] = _NOP + zorr(1, 2, 3, 4, 5, 6) + zorr(BB, 1) + _rtn() + _rtn("") + _rtn(0) + _rtn("0") + _rtn(1) + _rtn("1") + _rtn(-1) + _rtn("-1") + _rtn("huj") + _rtn("ptr") + _rtn("ptra", ALTARR) + _rtn(ALTARR) + _rtn(ALTARR, ALTARR) + return + _tstini() + return + _splitpath_test() + # _split_regpath() + return + hh = "CPU" + _conl("go1!") + _conl(_var(_sharepath(hh, "gdfsgdsgsd sdgsdighjui teretiewrotrewut 345345345 rtjtireutireu huj"))) + _conl("go2!") + _conl(_var(_sharelist(AAA, hh), _dumparr(AAA))) + _conline() + A[1] = "h" + A[3] = "j" + t = "pizda" + if (match(t, /^pi(Z)da/, A)) { + _conl("match") + } else { + _conl("not match") + } + _conl(_dumparr(A)) + return + _pathSMA = "C:\\Program Files\\Altiris\\Altiris Agent\\" + DSPlugInPath = _pathSMA "Agents\\Deployment\\Agent\\" + DSAutoPath = _pathSMA + if (! _sysinfo(_SYS, _hostname)) { + _fatal("_sysinfo: unknown error") + } + _REG[""] + delete _REG[""] + _servoutput = _CHR["EOL"] _cmd("sc query state= all") + _dsbasepath = "\\\\CPU\\CPU\\DEV\\PROJECT\\_DS\\" + _rdreg(_REG, "HKEY_LOCAL_MACHINE\\SOFTWARE\\Altiris") + _wrfile("rego.txt", _dumparr(_REG)) + _conl("fF") + #_______________________________________________________________________ + c = _getreg_i1(DDD, "HKEY_LOCAL_MACHINE\\SOFTWARE\\Altiris\\Altiris Agent\\Plugin Objects\\\204~.*\224Install path", _REG) + #_________________________________________________________________________________________ + pp = _n("NAME", "NS") + #pp=_n() + #___________________________________________________________________________________ + p = _defsolution(pp, "DS Plug-in", "HKEY_LOCAL_MACHINE\\SOFTWARE\\Altiris\\Altiris Agent\\Plugin Objects\\Agents\\") + ClientConfiguration = _defdll(p, "Client Configuration", "ClientConfiguration") + ClientImagingPrep = _defdll(p, "Client Inaging Preparation", "ClientImagingPrep") + ClientImaging = _defdll(p, "Client Imaging", "ClientImaging") + ClientPCT = _defdll(p, "Client PCT", "ClientPCT") + ClientRebootTo = _defdll(p, "Client Reboot To", "ClientRebootTo") + DeploymentAgent = _defdll(p, "Deployment Agent", "Deployment Agent") + DeploymentSolutionBaseAgent = _defdll(p, "Deployment Solution Base Agent", "Deployment Solution Base Agent") + ClientBCDEdit = _defile(p, "Client BCD Edit", "ClientBCDEdit.dll") + ClientCopyFile = _defile(p, "Client Copy File", "ClientCopyFile.dll") + ClientPreImage = _defile(p, "Client Pre Image", "ClientPreImage.dll") + ClientRebootTo = _defile(p, "Client Reboot To", "ClientRebootTo.dll") + _defile(p, "ConfigService.exe", "ConfigService.exe", "") + _defile(p, "config.dll", "config.dll", "") + _defsrv(p, "DS Plug-in Service", "Altiris Deployment Solution - System Configuration") + _defreg(p, "Deployment Agent Path", "HKEY_LOCAL_MACHINE\\SOFTWARE\\Altiris\\Deployment\\AgentInstallPath.STR") + _defile(p, "Altiris_DeploymentSolutionAgent_7_1_x86.msi", _SYS["OSArchitecture"] == "64-bit" ? "C:\\Program Files\\Altiris\\Altiris Agent\\Agents\\SoftwareManagement\\Software Delivery\\{9D76E4CA-377A-472D-A82E-EDAD77E7E4ED}\\cache\\Altiris_DeploymentSolutionAgent_7_1_x64.msi" : "C:\\Program Files\\Altiris\\Altiris Agent\\Agents\\SoftwareManagement\\Software Delivery\\{4B747D25-612F-48FC-B6B5-9916D1BB755C}\\cache\\Altiris_DeploymentSolutionAgent_7_1_x86.msi", "") + _defdir(p, "Deployment Folder", a = gensub(/[^\\]*$/, "", 1, _rdsafe(_REG, "HKEY_LOCAL_MACHINE\\SOFTWARE\\Altiris\\Deployment\\AgentInstallPath.STR", "C:\\Program Files\\Altiris\\Altiris Agent\\Agents\\Deployment\\Agent\\"))) + #___________________________________________________________________________________ + p = _defsolution(pp, "DS Auto", "HKEY_LOCAL_MACHINE\\SOFTWARE\\Altiris\\Altiris Agent\\Plugin Objects\\Agents\\") + _defdir(p, "C:\\Boot\\Altiris\\iso\\boot\\fonts\\", "C:\\Boot\\Altiris\\iso\\boot\\fonts\\") + _defdir(p, "C:\\Boot\\Altiris\\iso\\sources\\", "C:\\Boot\\Altiris\\iso\\sources\\") + _defile(p, "C:\\Boot\\Altiris\\iso\\autoinst.exe", "C:\\Boot\\Altiris\\iso\\autoinst.exe", "") + _defile(p, "C:\\Boot\\Altiris\\iso\\autoinst.ini", "C:\\Boot\\Altiris\\iso\\autoinst.ini", "") + _defile(p, "C:\\Boot\\Altiris\\iso\\autoutil.exe", "C:\\Boot\\Altiris\\iso\\autoutil.exe", "") + _defile(p, "C:\\Boot\\Altiris\\iso\\autoutil.ini", "C:\\Boot\\Altiris\\iso\\autoutil.ini", "") + _defile(p, "C:\\Boot\\Altiris\\iso\\bcdedit.exe", "C:\\Boot\\Altiris\\iso\\bcdedit.exe", "") + _defile(p, "C:\\Boot\\Altiris\\iso\\bootmgr", "C:\\Boot\\Altiris\\iso\\bootmgr", "") + _defile(p, "C:\\Boot\\Altiris\\iso\\bootsect.exe", "C:\\Boot\\Altiris\\iso\\bootsect.exe", "") + _defreg(p, "Deployment Automation reg.File", "HKEY_LOCAL_MACHINE\\SOFTWARE\\Altiris\\AutoUtil\\File.XSZ", "autoutil.exe") + _defreg(p, "Deployment Automation reg.Path", "HKEY_LOCAL_MACHINE\\SOFTWARE\\Altiris\\AutoUtil\\Path.XSZ", "%systemdrive%\\boot\\altiris\\iso") + #_________________________________________________________________________________________ + _check(pp) + #_________________________________________________________________________________________ + _conl(_report(pp)) + _wrfile("report.txt", _report(pp)) +} + +######################################################### +function _SYSIO(c, t, P) +{ + switch (c) { + case "_lib_CMDLN": + return t + #___________________________________________________________ + case "_lib_APPLY": + return + #___________________________________________________________ + case "_lib_HELP": + return + #___________________________________________________________ + case "_lib_NAMEVER": + return _ln("_SYSIO 1.0") + #___________________________________________________________ + case "_lib_BEGIN": + return + #___________________________________________________________ + case "_lib_END": + return + } +} + +#_______________________________________________________________________ +######################################################################## +function _W(p, A, v) +{ + if (isarray(v)) { + if (p) { + delete A[p] + A[p][""] + delete A[p][""] + _movarr(A[p], v) + } + return p + } + if (p) { + delete A[p] + return (A[p] = v) + } + return v +} + +#_______________________________________________________________________ +function _Zexparr(S, s, t, i) +{ + ############################################## + t = "" + if (isarray(S)) { + for (i in S) { + t = t (isarray(S[i]) ? (_Zexparr_i1(i) "\020" _Zexparr_i0(S[i]) "\021\021\020") : (_Zexparr_i2(_Zexparr_i3(i) "\021" _Zexparr_i3(S[i])) "\020")) + } + } + if (s != "") { + gsub(/\x1B/, "\033;", s) + gsub(/\x10/, "\0330", s) + t = t "\021\021\020" s + } + gsub(/\x0A/, "\033:", t) + return t +} + +#_________________________________________________________________ +function _Zexparr_i0(S, t, i) +{ + for (i in S) { + t = t (isarray(S[i]) ? (_Zexparr_i1(i) "\020" _Zexparr_i0(S[i]) "\021\021\020") : (_Zexparr_i2(_Zexparr_i3(i) "\021" _Zexparr_i3(S[i])) "\020")) + } + return t +} + +#_________________________________________________________________ +function _Zexparr_i1(t) +{ + gsub(/\x1B/, "\033;", t) + gsub(/\x11/, "\0331", t) + gsub(/\x10/, "\0330", t) + return t +} + +#_________________________________________________________________ +function _Zexparr_i2(t) +{ + gsub(/\x10/, "\0330", t) + return t +} + +#_________________________________________________________________ +function _Zexparr_i3(t) +{ + gsub(/\x1B/, "\033;", t) + gsub(/\x11/, "\0331", t) + return t +} + +#_______________________________________________________________________ +function _Zimparr(D, t, A, B) +{ + ############################################## + if (isarray(D)) { + split(t, A, /\x10/, B) + t = _Zimparr_i0(A, B, _Zimparr_i1(D, A, B, 1)) + gsub(/\x1B\x30/, "\020", t) + gsub(/\x1B\x3B/, "\033", t) + return t + } +} + +#_________________________________________________________________ +function _Zimparr_i0(A, B, i) +{ + return (i in A ? (A[i] B[i] _Zimparr_i0(A, B, i + 1)) : "") +} + +#_________________________________________________________________ +function _Zimparr_i1(D, A, B, i, t, a, n) +{ + while (i in B) { + if ((t = A[i++]) == "\021\021") { + return i + } + gsub(/\x1B\x30/, "\020", t) + if ((a = index(t, "\021")) > 0) { + if (isarray(D[n = _Zimparr_i2(substr(t, 1, a - 1))])) { + delete D[n] + } + D[n] = _Zimparr_i2(substr(t, a + 1)) + } else { + if (! isarray(D[t = _Zimparr_i2(t)])) { + delete D[t] + D[t][""] + delete D[t][""] + } + i = _Zimparr_i1(D[t], A, B, i) + } + } +} + +#_________________________________________________________________ +function _Zimparr_i2(t) +{ + gsub(/\x1B\x31/, "\021", t) + gsub(/\x1B\x3B/, "\033", t) + return t +} + +#_____________________________________________________________________________ +function _Zimport(t, p, A, c, i, n, B) +{ + ############################################## + if (p) { + c = split(t, B, /\x0A/) + for (i = 1; i <= c; i++) { + if ((t = B[i]) == "") { + continue + } + gsub(/\x1B\x3A/, "\n", t) + if (match(t, /^_ERRLOG: /)) { + _tLOG[n = _wLCHLD(p, _N())][""] + delete _tLOG[n][""] + _Zimparr(_tLOG[n], substr(t, 10)) + } else if ((t = _pass(_IMPORT, t, p, A)) != "") { + gsub(/\x1B\x3B/, "\033", t) + _wLCHLD(p, _N(_tSTR, t)) + } + } + return p + } else { + _expout(t) + } +} + +function _acc(A, a, t) +{ + if (t) { + if (_VLDMAXSTRING < length(t) + length(a)) { + if (a) { + if (_VLDMAXSTRING < length(t)) { + A[--A[_ARRPTR]] = a + A[--A[_ARRPTR]] = t + } else { + A[--A[_ARRPTR]] = a t + } + } else { + A[++A[_ARRLEN]] = t + } + return "" + } + return (a t) + } + return a +} + +function _accmpu(A, a, n) +{ + if (n) { + return (_mpufn0 = n) + } + if (_mpuacc) { + if (_VLDMAXSTRING < length(_mpuacc) + length(a)) { + if (a) { + if (_VLDMAXSTRING < length(_mpuacc)) { + A[--A[_ARRLEN]] = a + A[--A[_ARRLEN]] = _mpuacc + } else { + A[--A[_ARRLEN]] = a _mpuacc + } + } else { + A[--A[_ARRLEN]] = _mpuacc + } + _mpuacc = "" + } else { + _mpuacc = a _mpuacc + } + } else { + _mpuacc = a + } +} + +#_______________________________________________________________________ +function _add(S, sf, D, df) +{ + ################################################ + if (sf in S) { + if (isarray(S[sf])) { + if (df in D) { + if (isarray(D[df])) { + return _extarr(D[df], S[sf]) + } + delete D[df] + } + D[df][""] + delete D[df][""] + return _extarr(D[df], S[sf]) + } else { + if (isarray(D[df])) { + delete D[df] + } + D[df] = D[df] S[sf] + } + } +} + +#_________________________________________________________________ +function _addarr(D, S) +{ + ############################################# + if (isarray(S)) { + _addarr_i0(D, S) + } +} + +#_____________________________________________________ +function _addarr_i0(D, S, i) +{ + for (i in S) { + if (isarray(S[i])) { + delete D[i] + D[i][""] + delete D[i][""] + _addarr_i0(D[i], S[i]) + } else { + delete D[i] + D[i] = S[i] + } + } +} + +#_______________________________________________________________________ +function _addarrmask(D, S, M) +{ + ############################################# + for (_addarrmaski0 in M) { + if (_addarrmaski0 in S) { + if (isarray(S[_addarrmaski0])) { + if (! isarray(D[_addarrmaski0])) { + delete D[_addarrmaski0] + D[_addarrmaski0][""] + delete D[_addarrmaski0][""] + } + if (isarray(M[_addarrmaski0])) { + _addarrmask(D[_addarrmaski0], S[_addarrmaski0], M[_addarrmaski0]) + } else { + _extarr_i0(D[_addarrmaski0], S[_addarrmaski0]) + } + } else { + if (isarray(D[_addarrmaski0])) { + delete D[_addarrmaski0] + } + D[_addarrmaski0] = S[_addarrmaski0] + } + } else { + delete D[_addarrmaski0] + } + } +} + +#___________________________________________________________________________________ +#################################################################################### + + +#_______________________________________________________________________ +function _addf(A, f) +{ + ##################################################### + A["B"][""] = A["F"][A["B"][f] = A["B"][""]] = f +} + +#___________________________________________________________ +function _addfile(f, d, a, b) +{ + ################################## + if (((f = _wfilerdnehnd(f)) == "") || (_filene(f) == "")) { + ERRNO = "Filename error" + return + } + a = BINMODE + BINMODE = "rw" + b = ORS + ORS = "" + ERRNO = "" + print(d) >> f + if (ERRNO) { + return "" + } + close(f) + BINMODE = a + ORS = b + if (ERRNO) { + return "" + } + return d +} + +#_____________________________________________________________________________ +function _addlib(f) +{ + ########################################################### + _addf(_LIBAPI, f) +} + +#___________________________________________________________________________________ +#################################################################################### + + +#_______________________________________________________________________ +function _addlist(A, v) +{ + ################################################## + A[++A[0]] = v +} + +############################################ + +#_______________________________________________________________________ +function _bearray(A) +{ + #################################################### + if (isarray(A) || (A == 0 && A == "")) { + return 1 + } +} + +#_________________________________________________________________ +function _bframe(A, t, p) +{ + ########################################### + return _bframe_i0(A, t, p, A[""]) +} + +#___________________________________________________________ +function _bframe_i0(A, t, p, f) +{ + return (f ? (_bframe_i0(A, t, p, A[f]) (@f(t, p))) : "") +} + +# add to _dumparr: checking that if element is undefined + + + + + + + + + + + + + + + + + + +#_______________________________________________________________________ +function _cfguid(p, optr, pfx, sfx, hstrcnt, lstrchr) +{ + #################### 0 # + delete _UIDOBL[p] + if (_isptr(optr)) { + if (optr == p) { + delete _UIDOBLV[p] + delete _UIDOBLV[_UIDOBLV[_UIDOBL[p] = p][""] = p][""] + } else if (optr in _UIDOBL) { + _UIDOBL[p] = _UIDOBL[optr] + } + } + _UIDPFX[p] = _istr(pfx) ? pfx : "" + _UIDSFX[p] = _istr(sfx) ? sfx : "" + if (_isptr(hstrcnt)) { + if (hstrcnt != p) { + _UIDCHR[p] = _UIDCHR[_UIDCNT[p] = _UIDCNT[hstrcnt]] + return p + } + hstrcnt = _NOP + } + _UIDCNTL[_UIDCNT[p] = p] = _cfguidchr(p, hstrcnt, lstrchr) + return p +} + +#_____________________________________________________ +function _cfguidchr(p, h, l, H, L) +{ + if (_isptr(l)) { + if (l != p) { + return (_UIDCHR[p] = _UIDCHR[l]) + } + _UIDCHR[p] = p + l = _NOP + } + _UIDCHR[p] = p + _splitstr(H, h, _UIDCHRH[_classys]) + _splitstr(L, l, H) + delete _UIDCHRH[_UIDCHRH[p][""] = p][""] + delete _UIDCHRL[_UIDCHRL[p][""] = p][""] + _cfguidh(p, H, L) + return _cfguidl(p, L, L) +} + +#_______________________________________________ +function _cfguidh(p, H, L, hi, h, li) +{ + for (hi = 1; hi in H; hi++) { + h = H[hi] + for (li = 1; li in L; li++) { + _UIDCHRH[p][h L[li]] + } + } +} + +function _cfguidl(p, H, L, hi, h, hl, li) +{ + for (hi = 1; hi in H; hi++) { + h = H[hi] + for (li = 1; li in L; li++) { + hl = _UIDCHRL[p][hl] = h L[li] + } + } + return hl +} + +#____________________________________________________________________________________________________ +function _check(p) +{ + #################################################################################### + _dll_check(p) + _file_check(p) + _serv_check(p) + _reg_check(p) +} + +#_______________________________________________________________________ +function _chrline(t, ts, w, s) +{ + ############################################# + return (t = " " _tabtospc(t, ts) (t ? t ~ /[ \t]$/ ? "" : " " : "")) _getchrln(s ? s : "_", (w ? w : _CON_WIDTH - 1) - length(t)) _CHR["EOL"] +} + +#_____________________________________________________________________________ +function _cmd(c, i, A) +{ + ####################################################### + _fio_cmda = RS + RS = ".{1,}" + _fio_cmdb = BINMODE + BINMODE = "rw" + ERRNO = RT = _NUL + c | getline RS + BINMODE = _fio_cmdb + RS = _fio_cmda + if (ERRNO || 0 > (_exitcode = close(c))) { + return (RT = _NOP) + } + return RT +} + +#_______________________________________________________________________ +function _cmparr(A0, A1, R, a, i) +{ + ########################################## + a = 0 + delete R + for (i in A0) { + if (! (i in A1)) { + a++ + R[i] = 0 + } else if (A0[i] != A1[i]) { + a++ + R[i] = 2 + } + } + for (i in A1) { + if (! (i in A0)) { + a++ + R[i] = 1 + } + } + return a +} + +#_____________________________________________________________________________ +function _con(t, ts, a, b, c, d, i, r, A, B) +{ + ########################################## + d = RLENGTH + if ((c = split(r = t, A, /\x0D?\x0A/, B)) > 0) { + a = BINMODE + b = ORS + BINMODE = "rw" + ORS = "" + if (c > 1) { + if ((i = length(t = _tabtospc(A[1], ts, _conlastrln))) < _constatstrln) { + t = t _getchrln(" ", _constatstrln - i) + } + print(t B[1]) > _SYS_STDCON + for (i = 2; i < c; i++) { + print(_tabtospc(A[i], ts) B[i]) > _SYS_STDCON + } + print(_conlastr = _tabtospc(A[c], ts)) > _SYS_STDCON + fflush(_SYS_STDCON) + } else { + print(t = _tabtospc(t, ts, _conlastrln)) > _SYS_STDCON + fflush(_SYS_STDCON) + _conlastr = _conlastr t + } + if ((i = length(_conlastr)) >= _CON_WIDTH) { + _conlastr = substr(_conlastr, 1 + (int(i / _CON_WIDTH) * _CON_WIDTH)) + } + _conlastrln = length(_conlastr) + if (_constatstr) { + print((t = _constatgtstr(_constatstr, _CON_WIDTH - 1 - _conlastrln)) _CHR["CR"] _conlastr) > _SYS_STDCON + fflush(_SYS_STDCON) + _constatstrln = length(t) + } + BINMODE = a + ORS = b + RLENGTH = d + return r + } + RLENGTH = d +} + +#_______________________________________________________________________ +function _conin(t, a, b) +{ + ################################################# + _constatpush() + _constat() + a = BINMODE + b = RS + BINMODE = "rw" + RS = "\n" + _con(t) + getline t < "CON" + close("CON") + _conlastrln = 0 + _conlastr = "" + gsub(/[\x0D\x0A]+/, "", t) + BINMODE = a + RS = b + _constatpop() + return t +} + +#_______________________________________________________________________ +function _conl(t, ts) +{ + #################################################### + return _con(t (t ~ /\x0A$/ ? "" : _CHR["EOL"]), ts) +} + +#_______________________________________________________________________ +function _conline(t, ts) +{ + ################################################# + return _con(_chrline(t, ts)) +} + +#___________________________________________________________________________________ +#################################################################################### +function _conlq(t, ts) +{ + return _conl("`" t "'", ts) +} + +#_______________________________________________________________________ +function _constat(t, ts, ln, a) +{ + ########################################### + if (_constatstrln > (ln = length(t = _constatgtstr(_constatstr = _tabtospc(t, ts), _CON_WIDTH - 1 - _conlastrln)))) { + t = t _getchrln(" ", _constatstrln - ln) + } + _constatstrln = ln + ln = ORS + a = BINMODE + BINMODE = "rw" + ORS = "" + print(t _CHR["CR"] _conlastr) > _SYS_STDCON + fflush(_SYS_STDCON) + ORS = ln + BINMODE = a + return _constatstr +} + +#_________________________________________________________________ +function _constatgtstr(t, ln, a, b) +{ + if (ln < 1) { + return "" + } + if ((a = length(t)) <= ln) { + return t + } + if (ln < 11) { + return substr(t, a - ln + 1) + } + if (ln < 19) { + return ("..." substr(t, a - ln + 4)) + } + return (substr(t, 1, b = int((ln - 3) / 2)) "..." substr(t, a - ln + b + 4)) +} + +#_______________________________________________________________________ +function _constatpop() +{ + ################################################## + if (_CONSTATPUSH[0] > 0) { + return _constat(_CONSTATPUSH[_CONSTATPUSH[0]--]) + } + return _constat("") +} + +#_______________________________________________________________________ +function _constatpush(t, ts) +{ + ############################################# + _CONSTATPUSH[++_CONSTATPUSH[0]] = _constatstr + if (t) { + _constat(t, ts) + } + return _constatstr +} + +#___________________________________________________________________________________ +function _creport(p, t, f, z) +{ + _[p]["REPORT"] = _[p]["REPORT"] _ln(t (f == "" ? "" : ": " f)) +} + +#_________________________________________________________________________________________ +function _defdir(pp, n, f, v, p) +{ + ############################################################# + _[p = _wLCHLD(pp, _n("TYPE", "defdir"))]["NAME"] = n + _[p]["DIR"] = f + return p +} + +#_________________________________________________________________________________________ +function _defdll(pp, n, rn, p) +{ + ############################################################## + _[p = _wLCHLD(pp, _n("TYPE", "defdll"))]["NAME"] = n + _[p]["REGPATH"] = _[pp]["REGPATH"] rn + _[p]["ERRHOST"] = pp + return p +} + +#___________________________________________________________ +function _defescarr(D, r, S, i, c, t) +{ + if (isarray(S)) { + for (i = 0; i < 256; i++) { + if ((c = _CHR[i]) ~ r) { + D[c] = "\\" S[c] + t = t c + } else if (D[c] == "") { + D[c] = c + } + } + } else { + for (i = 0; i < 256; i++) { + if ((c = _CHR[i]) ~ r) { + D[c] = S c + if (S != "") { + t = t c + } + } else if (D[c] == "") { + D[c] = c + } + } + } + return t +} + +#_________________________________________________________________________________________ +function _defile(pp, n, f, v, p) +{ + ############################################################# + _[p = _wLCHLD(pp, _n("TYPE", "defile"))]["NAME"] = n + _[p]["FILE"] = f + if (! (v == 0 && v == "")) { + _[p]["RQVERSION"] = v + } + return p +} + +#_______________________________________________________________________ +function _defn(f, c, v) +{ + ################################################### + FUNCTAB[c f] = v +} + +#_________________________________________________________________________________________ +function _defreg(pp, n, f, v, p) +{ + ############################################################# + _[p = _wLCHLD(pp, _n("TYPE", "defreg"))]["NAME"] = n + _[p]["REGPATH"] = f + if (! (v == 0 && v == "")) { + _[p]["VALUE"] = v + } +} + +#_______________________________________________________________________________________________ +function _defsolution(pp, n, rn, p) +{ + ############################################################### + _[p = _wLCHLD(pp, _n("TYPE", "solution"))]["NAME"] = n + _[p]["REGPATH"] = rn + _[p]["ERRHOST"] = pp + return p +} + +#_________________________________________________________________________________________ +function _defsrv(pp, n, f, v, p) +{ + ############################################################# + _[p = _wLCHLD(pp, _n("TYPE", "defsrv"))]["NAME"] = n + _[p]["SERVNAME"] = f + return p +} + +#_______________________________________________________________________ +function _del(f, c, a, A) +{ + ################################################# + if (match(f, /\\[ \t]*$/)) { + if ((c = toupper(_filerd(f))) && (length(f) == FLENGTH)) { + _cmd("rd " c " /S /Q 2>NUL") + _deletepfx(_WFILEROOTDIR, c) + _deletepfx(_FILEIO_RDTMP, c) + _deletepfx(_FILEIO_RDNETMP, c) + } else { + _conl("HUJ TEBE!") + return "" + } + } else { + a = _dir(A, f) + _cmd("del " f " /Q 2>NUL") + for (c in A) { + if (c ~ /\\$/) { + _cmd("rd " c " /S /Q 2>NUL") + _deletepfx(_WFILEROOTDIR, c) + _deletepfx(_FILEIO_RDTMP, c) + } + _deletepfx(_FILEIO_RDNETMP, c) + } + } + return a +} + +#_______________________________________________________________________ +function _delay(t, a) +{ + ################################################### + for (a = 1; a <= t; a++) { + _delayms() + } +} + +#_________________________________________________________________ +function _delayms(a) +{ + ############################################# + for (a = 1; a <= _delay_perfmsdelay; a++) { + } +} + +#_______________________________________________________________________ +function _deletepfx(A, f, B, le, i) +{ + ######################################## + le = length(f) + for (i in A) { + if (substr(toupper(i), 1, le) == f) { + B[i] = A[i] + delete A[i] + } + } +} + +#_________________________________________________________________ +function _delf(A, f) +{ + ############################################### + A["B"][A["F"][A["B"][f]] = A["F"][f]] = A["B"][f] + delete A["F"][f] + delete A["B"][f] +} + +#_______________________________________________________________________ +function _deluid(p) +{ + ################################################# 1 # + if (p in _CLASSPTR) { + _deluida0 = _CLASSPTR[p] + if (_deluida0 in _UIDOBL) { + _UIDOBLV[_UIDOBL[_deluida0]][p] + } + } + delete _CLASSPTR[p] + return _deluida0 +} + +#_______________________________________________________________________ +function _dir(A, rd, i, r, f, ds, pf, B, C) +{ + #################################### + delete A + gsub(/(^[ \t]*)|([ \t]*$)/, "", rd) + if (rd == "") { + return "" + } + i = split(_cmd("dir \"" rd "\" 2>NUL"), B, /\x0D?\x0A/) - 3 + pf = (match(B[4], /Directory of ([^\x00-\x1F]+)/, C) ? (C[1] (C[1] ~ /\\$/ ? "" : "\\")) : "") + for (r = 0; i > 5; i--) { + if (match(B[i], /^([^ \t]*)[ \t]+([^ \t]*)[ \t]+(()|([0-9\,]+))[ \t]+([^\x00-\x1F]+)$/, C)) { + if (C[6] !~ /^\.\.?$/) { + if (C[4]) { + ds = "D " + } else { + ds = C[5] " " + gsub(/\,/, "", ds) + } + if ((f = _filepath(pf C[6] (C[4] ? "\\" : ""))) != "") { + A[f] = ds C[1] " " C[2] + r++ + } + } + } + } + return r +} + +#_________________________________________________________________ +function _dirtree(A, f, B) +{ + ######################################### + gsub(/(^[ \t]*)|([ \t]*$)/, "", f) + delete A + A[""] + delete A[""] + _dirtree_i0(B, 8, split(_cmd("dir \"" f "\" /-C /S 2>NUL"), B, /\x0D?\x0A/), A, f = _filerd(f)) + return f +} + +#___________________________________________________________ +function _dirtree_i0(B, i, c, A, f, lf, a, C) +{ + delete A[f] + A[f][0] + delete A[f][0] + lf = length(f) + for (; i <= c; ) { + if (match(B[i], /^[ \t]*Directory of (.+)/, C)) { + if (substr(a = _filerd(C[1] "\\"), 1, lf) == f) { + i = _dirtree_i0(B, i + 4, c, A[f], a) + } else { + return i + } + } else if (match(B[i++], /^([^ \t\-]+)\-([^ \t\-]+)\-([^ \t]+)[ \t]+([^ \t]+)[ \t]+([0-9]+)[ \t]+(.+)$/, C)) { + A[f][f C[6]] = C[5] " " C[1] "/" _CHR["MONTH"][C[2]] "/" C[3] " " C[4] + } + } + return i +} + +#_______________________________________________________________________ +function _dll_check(pp) +{ + _dllchktv = "" + _missfl = 1 + _tframe("_dll_check_i0", pp, _REG, pp) #also check that all dll have same version; also check that all dlls have success and then report that DS plug-in version n - installed + if (1 || "AGENT" in _[pp]) { + if (_dllchktv != _[pp][".Product Version"]) { + _dllerr(_[pp]["AGENT"], "agent version (" _[pp][".Product Version"] ") do not match all lib versions: " _dllchktv "'") + } + } else if (! _missfl) { + _creport(pp, "agent not detected in registry") + } else { + _dllerr(pp, "agent not detected in registry but some registry entries exist:") + _tframe("_dll_check_i1", pp, pp) + } +} + +#_______________________________________________ +function _dll_check_i0(p, R, pp, p2, i, i2, r, f, v, rs, d, tv, tf) +{ + if (_[p]["TYPE"] == "defdll") { + r = toupper(_[p]["REGPATH"]) + rs = 0 + tf = 0 + tv = "" + for (i in R) { + if (toupper(substr(i, 1, length(r))) == r) { + if ((_chka0 = substr(i, 1 + length(r), 1)) == "" || _chka0 == "\\") { + rs = 1 + _missfl = 1 + _[p]["." substr(gensub(/\....$/, "", 1, i), i2 = 2 + length(r), length(i) - i2 + 1)] = R[i] + if (chka0 != "") { + rs = 1 + } + } + } + } #{ rs=_missfl=1; _[p]["." gensub(/^([^\\]+\\)+(.*)\..../,"\\2","G",i)]=R[i] } } + if (rs) { + if ((i = ".Install Path") in _[p] && (i = ".Product Version") in _[p]) { + _[p]["STATUS"] = "PRESENT" + f = _[p][".Install Path"] + v = _[p][".Product Version"] + if (! (".Module" in _[p])) { + _[pp][".Product Version"] = v + _VAR["HKEY_LOCAL_MACHINE\\SOFTWARE\\Altiris\\Deployment\\AgentInstallPath.STR"] = f + _[pp]["AGENT"] = p + _creport("OK: DLL DETECTED(" v "): " substr(_[p]["NAME"], 1, 112)) + } else { + if (_dllchktv == "") { + _dllchktv = v + } else if (v != _dllchktv) { + return _dllerr(p, "different versions detected: " _dllchktv "!=" v "'") + } + ERRNO = "" + if (_th1(_[p]["DATA"] = _rdfile(f), ERRNO)) { + delete _[p]["DATA"] + return _dllerr(p, "read lib: " ERRNO, f) + } + if (v != (_[p]["VERSION"] = _getfilever(f))) { + return _dllerr(p, "library file version mismatch: ==`" _[p]["VERSION"] "'; !=`" v "'", f) + } + _creport(p, "OK: LIBRARY DETECTED(" v "): " substr(f, 1, 100)) + } + } else { + tf = 1 + _dllerr(p, "registry corrupt: `" i "' not present") + } + } else { + _[p]["STATUS"] = "MISSED" + } + } +} + +#_______________________________________________ +function _dll_check_i1(p, pp, p1, p2, p3, i) +{ + if (_[p]["TYPE"] == "defdll") { + for (i in _[p]) { + if (i ~ /^\./) { + _dllerr(pp, " " _[p]["REGPATH"] "\\" substr(i, 2)) + } + } + } +} + +#___________________________________________________________________________________ +function _dllerr(p, t, f) +{ + if (t !~ /\x00/) { + t = "ERROR: \000" t + } + _errfl = 1 + _[p]["ERROR"] = _[p]["ERROR"] _ln(t (f == "" ? "" : ": " f)) +} + +function _drawuid(p, cn, ch, o) +{ + _conl("uid: " p) + _conl("\toblptr: " (p in _UIDOBL ? _UIDOBL[p] "'" : "-")) + if (p in _UIDOBL) { + if (! _isptr(o = _UIDOBL[p])) { + _conl(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> oblptr not pointer") + } + if (! isarray(_UIDOBLV[o])) { + _conl(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> no OBLV array at ptr") + } + } + _conl("\tprefix: " (p in _UIDPFX ? _UIDPFX[p] "'" : "-")) + _conl("\tsuffix: " (p in _UIDSFX ? _UIDSFX[p] "'" : "-")) + _conl("\tcounters: " (cn = p in _UIDCNT ? _UIDCNT[p] "'" : "-")) + if (cn != "-") { + _conl("\t\tcntrL: " _UIDCNTL[_UIDCNT[p]] "'") + _conl("\t\tcntrH: " _UIDCNTH[_UIDCNT[p]] "'") + } + _conl("\tcharset: " (ch = p in _UIDCHR ? _UIDCHR[p] "'" : "-")) + if (ch != "-") { + _conl("chrH: ") + _conl(_dumparr(_UIDCHRH[_UIDCHR[p]])) + _conl() + _conl("chrL: ") + _conl(_dumparr(_UIDCHRL[_UIDCHR[p]])) + _conl() + } +} + +#_______________________________________________________________________ +function _dumparr(A, t, lv, a) +{ + ############################################ + b = PROCINFO["sorted_in"] + PROCINFO["sorted_in"] = "_lengthsort" + if (isarray(A)) { + delete _DUMPARR + _dumparrc = _dumparrd = "" + _dumparr_i1(A, lv = (lv == "" ? 16 : lv == 0 || (lv + 0) != 0 ? lv : lv == "-*" ? -3 : lv ~ /^\+?\*$/ ? 3 : 16) + 0, lv < 0 ? -1 : 1, 0, _tabtospc(t)) + PROCINFO["sorted_in"] = a + return _retarrd(_DUMPARR, _dumparrd, _dumparrd = "") + } +} + +#___________________________________________________________ +function _dumparr_i1(A, lv, ls, ln, t, t2, i, a, f) +{ + t2 = _getchrln(" ", length(t)) + if (ln == lv) { + if (ls > 0) { + for (i in A) { + ++a + } + } else { + for (i in A) { + isarray(A[i]) ? ++a : "" + } + } + if (length(_dumparrd = _dumparrd t (a > 0 ? " ... (x" a ")" : "") _CHR["EOL"]) > 262144) { + _DUMPARR[++_dumparrc] = _dumparrd + _dumparrd = "" + } + return + } + if (ls >= 0) { + for (i in A) { + if (! isarray(A[i])) { + if (length(_dumparrd = _dumparrd (f ? t2 : t _nop(f = 1)) "[" i "]=" A[i] "'" _CHR["EOL"]) > 262144) { + _DUMPARR[++_dumparrc] = _dumparrd + _dumparrd = "" + } + } + } + } + for (i in A) { + if (isarray(A[i])) { + _dumparr_i1(A[i], lv, ls, ln + ls, _th0(f ? t2 : t, f = 1) "[" i "]") + } + } + if (! f) { + if (length(_dumparrd = _dumparrd t _CHR["EOL"]) > 262144) { + _DUMPARR[++_dumparrc] = _dumparrd + _dumparrd = "" + } + } +} + +#___________________________________________________________________________________ +#################################################################################### + + +#___________________________________________________________________________________ +# OTHER tFUNCTIONs ################################################################# + +#_____________________________________________________________________________ +function _dumpobj(p, f, t, s) +{ + ################################################### + s = _dumpobj_i0(p, f, t = t "." p "{") + if ((p = _rFCHLD(p))) { + return (s = s _dumpobjm(p, f, s ? _getchrln(" ", length(t) - 1) : t " ")) + } + return s +} + +#___________________________________________________________ +function _dumpobj_i0(p, f, t) +{ + if (f == "") { + return _dumpobj_i2(p, t) + } + if (f == 0) { + return _dumpobj_i1(p, t " ") + } + return (_dumpobj_i1(p, t " ") _dumpobj_i2(p, _getchrln(" ", length(t)))) +} + +#___________________________________________________________ +function _dumpobj_i1(p, t) +{ + return _ln(t substr(((p in _tPREV) ? "\253" _tPREV[p] : "") " ", 1, 7) " " substr(((p in _tPARENT) ? "\210" _tPARENT[p] : "") " ", 1, 7) " " substr(((p in _tFCHLD) ? _tFCHLD[p] : "") "\205" ((p in _tQCHLD) ? " (" _tQCHLD[p] ") " : "\205") "\205" ((p in _tLCHLD) ? _tLCHLD[p] : "") " ", 1, 22) substr(((p in _tNEXT) ? "\273" _tNEXT[p] : "") " ", 1, 8)) +} + +#___________________________________________________________ +function _dumpobj_i2(p, t) +{ + return (_dumpobj_i3(_[p], t " ") _dumpobj_i3(_ptr[p], _getchrln(" ", length(t)) "`", "`")) +} + +#___________________________________________________________ +function _dumpobj_i3(A, t, p, e, s, i, t2) +{ + if (isarray(A)) { + for (i in A) { + t2 = _getchrln(" ", length(t)) + for (i in A) { + if (isarray(A[i])) { + s = s _dumpobj_i3(A[i], t "[" _dumpobj_i4(i) "]", p, _ln()) + } else { + s = s _ln(t "[" _dumpobj_i4(i) "]=" p _dumpobj_i4(A[i]) "'") + } + t = t2 + } + return s + } + return (e == "" ? "" : t e) + } + if (A == 0 && A == "") { + return + } + return _ln(t "=" _dumpobj_i4(p A) "'") +} + +#___________________________________________________________ +function _dumpobj_i4(t) +{ + if (length(t) > 64) { + return (substr(t, 1, 28) " ... " substr(t, length(t) - 28)) + } + return t +} + +#_________________________________________________________________ +function _dumpobj_nc(p, f, t) +{ + ####################################### + return _dumpobj_i0(p, f, t "." p "{ ") +} + +#_________________________________________________________________ +function _dumpobjm(p, f, t, s, t2) +{ + ################################### + t2 = _getchrln(" ", length(t)) + do { + s = s _dumpobj(p, f, t) + t = t2 + } while ((p = _rNEXT(p))) + return s +} + +#_________________________________________________________________ +function _dumpobjm_nc(p, f, t, s, t2) +{ + ################################ + t2 = _getchrln(" ", length(t)) + do { + s = s _dumpobj_nc(p, f, t) + t = t2 + } while ((p = _rNEXT(p))) + return s +} + +function _dumpuidgen(p, pd, pc, ps) +{ + _conline("#" (++cntdm) ": " p "'") + _conl() + if (p in _tuidel) { + _conl("DEL: " _var(pd = _tuidel[p])) + _conl(_dumparr(_tUIDEL[pd]) _ln()) + } + _conl("PFX: " _tUIDPFX[p] "'") + _conl("SFX: " _tUIDSFX[p] "'") + _conl("COUNT: " (p in _tuidcnt ? (pc = _tuidcnt[p]) "'" : _th0("-", pc = -2))) + _con("CHARS: ") + if (p in _tuidchr) { + _conl((ps = _tuidchr[p]) "'") + _conl("HCHR: " (pc == -2 ? "-" : _tUIDCNTH[pc] "'")) + _conl(_dumparr(_tUIDCHRH[ps]) _ln()) + _conl("LCHR: " (pc == -2 ? "-" : _tUIDCNTL[pc] "'")) + _conl(_dumparr(_tUIDCHRL[ps]) _ln()) + } else { + _conl("-") + } +} + +#_____________________________________________________________________________ +function _dumpval(v, n) +{ + _dumpstr = _dumpstr (v = _ln((n == 0 && n == "" ? "RET" : n) ": " (v == 0 && v == "" ? "-" : v "'"))) + return v +} + +######################################################## +function _eXTFN(c, t, P) +{ + switch (c) { + case "_lib_CMDLN": + return t + #___________________________________________________________ + case "_lib_APPLY": + return + #___________________________________________________________ + case "_lib_HELP": + return + #___________________________________________________________ + case "_lib_NAMEVER": + return _ln("_extfn 1.0") + #___________________________________________________________ + case "_lib_BEGIN": + return + #___________________________________________________________ + case "_lib_END": + return + } +} + +#_________________________________________________________________ +function _endpass(t) +{ + _endpass_v0 = t +} + +#_______________________________________________________________________ +function _err(t, a, b) +{ + ################################################### + a = BINMODE + b = ORS + BINMODE = "rw" + ORS = "" + print(t) > _SYS_STDERR + fflush(_SYS_STDERR) + BINMODE = a + ORS = b + return t +} + +#_________________________________________________________________ +function _errnl(t) +{ + ################################################ + return _err(t (t ~ /\x0A$/ ? "" : _CHR["EOL"])) +} + +#_______________________________________________________________________ +function _error(t, d, A) +{ + ################################################# + if (_ERRLOG_EF) { + A["TYPE"] = "ERROR" + A["TEXT"] = t + _log(A, d) + } +} + +#_______________________________________________________________________ +function _exit(c) +{ + ####################################################### + exit c +} + +#_____________________________________________________________________________ +function _export_data(t, i, A) +{ + ################################################# + A["DATA"] = t + A["ID"] = i + _expout("_DATA: " _Zexparr(A) "\n") +} + +#___________________________________________________________________________________ +#################################################################################### + +#_____________________________________________________________________________ +function _expout(t, d, a, b) +{ + #################################################### + a = BINMODE + b = ORS + BINMODE = "rw" + ORS = "" + print(t) > (d ? d : (d = _errlog_file)) + fflush(d) + BINMODE = a + ORS = b +} + +#_________________________________________________________________________________________ +########################################################################################## +function _extfn_init() +{ + ############################################################## + _formatstrs_init() + _formatstrd_init() + _formatrexp_init() + _unformatstr_init() + _mac_init() +} + +function _faccl_i0(A, t, p, P, f, r) +{ + f = r = "" + if (isarray(A)) { + while ((f = A[f])) { + r = (@f(t, p, P)) r + } + } + return r +} + +function _faccr_i0(A, t, p, P, f, r) +{ + f = r = "" + if (isarray(A)) { + while ((f = A[f])) { + r = r @f(t, p, P) + } + } + return r +} + +#_______________________________________________________________________ +function _fatal(t, d, A) +{ + ################################################# + if (_ERRLOG_FF) { + A["TYPE"] = "FATAL" + A["TEXT"] = t + _log(A, d) + } + if (! d) { + exit + } +} + +function _fbaccl(A, t, p, P) +{ + return _faccl_i0(A["B"], t, p, P) +} + +function _fbaccr(A, t, p, P) +{ + return _faccr_i0(A["B"], t, p, P) +} + +function _ffaccl(A, t, p, P) +{ + return _faccl_i0(A["F"], t, p, P) +} + +function _ffaccr(A, t, p, P) +{ + return _faccr_i0(A["F"], t, p, P) +} + +################## + +#_______________________________________________________________________ +function _fframe(A, t, p) +{ + ################################################# + return _fframe_i0(A, t, p, A[""]) +} + +#___________________________________________________________ +function _fframe_i0(A, t, p, f) +{ + return (f ? ((@f(t, p)) _fframe_i0(A, t, p, A[f])) : "") +} + +#_________________________________________________________________ +function _file(f) +{ + ################################################# + if ((f = _filerdnehnd(f)) == "") { + return "" + } + return (f in _FILEXT ? _FILEXT[f] : "") +} + +#_______________________________________________________________________ +function _file_check(p) +{ + if (1 || "AGENT" in _[p]) { + _tframe("_file_check_i0", p, p) + } +} + +#_______________________________________________ +function _file_check_i0(p, pp, p1, p2, f, v) +{ + if (_[p]["TYPE"] == "defile") { + f = _[p]["FILE"] + f = (match(f, /^.:/) ? "" : _[_[pp]["AGENT"]][".Install Path"] "\\") _[p]["FILE"] + if ("RQVERSION" in _[p]) { + v = _[p]["RQVERSION"] + } else { + v = _[pp][".Product Version"] + } + ERRNO = "" + if (_th1(_[p]["DATA"] = _rdfile(f), ERRNO)) { + delete _[p]["DATA"] + return _dllerr(p, "read file: " ERRNO, f) + } + if (v != "" && v != (_[p]["VERSION"] = _getfilever(f))) { + return _dllerr(p, " file version mismatch: ==`" _[p]["VERSION"] "'; !=`" v "'", f) + } + _creport(p, substr("OK: FILE DETECTED" (v == "" ? "" : "(" v ")") ": " f, 1, 122)) + } else if (_[p]["TYPE"] == "defdir") { + if (_filexist(f = _[p]["DIR"])) { + _creport(p, substr("OK: DIR DETECTED: " f, 1, 112)) + } else { + _dllerr(p, "directory " f " is not detected") + } + } +} + +#_________________________________________________________________ +function _filed(f, dd, d) +{ + ########################################## + if ((f = _filerdnehnd(f)) == "") { + return "" + } + if (f in _FILEDIRFL) { + return _FILEDIR[f] + } + if (f in _FILEROOT) { + if ((d = filegetdrvdir(_FILEROOT[f]))) { + _FILEDIRFL[f] + } + return (_FILEDIR[f] = d _FILEDIR[f]) + } + if (((dd = dd ? dd : _FILEIO_RD), f) in _FILEDIR) { + return _FILEDIR[dd, f] + } + if ((d = filedi(dd) _FILEDIR[f]) ~ /^\\/) { + return (_FILEDIR[dd, f] = d) + } + return d +} + +#_________________________________________________________________ +function _filen(f) +{ + ################################################ + if ((f = _filerdnehnd(f)) == "") { + return "" + } + return (f in _FILENAM ? _FILENAM[f] : "") +} + +#_________________________________________________________________ +function _filene(f) +{ + ############################################### + if ((f = _filerdnehnd(f)) == "") { + return "" + } + return (f in _FILENAM ? _FILENAM[f] : "") (f in _FILEXT ? _FILEXT[f] : "") +} + +#_________________________________________________________________ +function _filenotexist(f, a) +{ + ###################################### + if (f == "") { + return "" + } + if ((a = _filepath(f)) == "") { + ERRNO = "Filepath error `" f "'" + return "" + } + _cmd("if exist \"" a "\" exit 1 2>NUL") + if (_exitcode == 1) { + return (ERRNO = _NOP) + } + return a +} + +#_______________________________________________________________________ +function _filepath(f, dd) +{ + ################################################ + if ((f = _filerdnehnd(f)) == "") { + return "" + } + return (filegetrootdir(f, dd) (f in _FILENAM ? _FILENAM[f] : "") (f in _FILEXT ? _FILEXT[f] : "")) +} + +#_________________________________________________________________ +function _filer(f, dd) +{ + ############################################# + if ((f = _filerdnehnd(f)) == "") { + return "" + } + if (f in _FILEROOT) { + return _FILEROOT[f] + } + if (((dd = dd ? dd : _FILEIO_RD), f) in _FILEROOT) { + return _FILEROOT[dd, f] + } + return (_FILEROOT[dd, f] = fileri(dd)) +} + +#_________________________________________________________________ +function _filerd(f, dd) +{ + ############################################ + if ((f = _filerdnehnd(f)) == "") { + return "" + } + return filegetrootdir(f, dd) +} + +#_________________________________________________________________ +function _filerdn(f, dd) +{ + ########################################### + if ((f = _filerdnehnd(f)) == "") { + return "" + } + return (f in _FILENAM ? (filegetrootdir(f, dd) _FILENAM[f]) : "") +} + +#_________________________________________________________________ +function _filerdne(f, dd) +{ + ########################################## + if ((f = _filerdnehnd(f)) == "") { + return "" + } + if ((f in _FILENAM)) { + return (filegetrootdir(f, dd) _FILENAM[f] (f in _FILEXT ? _FILEXT[f] : "")) + } + if (f in _FILEXT) { + return (filegetrootdir(f, dd) _FILEXT[f]) + } + return "" +} + +#___________________________________________________________ +function _filerdnehnd(st, c, r, d, n, A) +{ + if (st) { + if ((c = toupper(st)) in _FILECACHE) { + FLENGTH = length(st) + return _FILECACHE[c] + } + if (match(st, /^[ \t]*\\[ \t]*\\/)) { + if (match(substr(st, (FLENGTH = RLENGTH) + 1), /^[ \t]*([0-9A-Za-z\-]+)[ \t]*(\\[ \t]*([A-Za-z])[ \t]*\$[ \t]*)?(\\[ \t]*([0-9A-Za-z_\!\+\-\[\]\(\)\{\}\~\.]+( +[0-9A-Za-z_\!\+\-\[\]\(\)\{\}\~\.]+)*[ \t]*\\)+[ \t]*)?(([0-9A-Za-z_\!\+\.\~\-\[\]\{\}\(\)]+( +[0-9A-Za-z_\!\+\.\~\-\[\]\{\}\(\)]+)*)[ \t]*)?/, A)) { + FLENGTH = FLENGTH + RLENGTH + d = (A[3] ? ("\\" A[3] "$") : "") A[4] + gsub(/[ \t]*\\[ \t]*/, "\\", d) + if ((st = toupper((r = "\\\\" A[1]) d (n = A[8]))) in _FILECACHE) { + return (_FILECACHE[substr(c, 1, FLENGTH)] = _FILECACHE[st]) + } + _FILEDIR[c = _FILECACHE[substr(c, 1, FLENGTH)] = _FILECACHE[st] = ++_file_rootcntr] = d + _FILEDIRFL[c] + _FILEROOT[c] = r + } else { + FLENGTH = 0 + _filepath_err = "UNC" + return "" + } + } else { + match(st, /^(([ \t]*\.[ \t]*\\[ \t]*)|(([ \t]*([A-Za-z])[ \t]*(\:)[ \t]*)?([ \t]*(\\)[ \t]*)?))([ \t]*(([ \t]*[0-9A-Za-z_\!\+\-\[\]\(\)\{\}\~\.]+( +[0-9A-Za-z_\!\+\-\[\]\(\)\{\}\~\.]+)*[ \t]*\\)+)[ \t]*)?([ \t]*([0-9A-Za-z_\!\+\.\~\-\[\]\{\}\(\)]+( +[0-9A-Za-z_\!\+\.\~\-\[\]\{\}\(\)]+)*)[ \t]*)?/, A) + if (! (FLENGTH = RLENGTH)) { + return "" + } + d = A[8] A[10] + gsub(/[ \t]*\\[ \t]*/, "\\", d) + if ((st = toupper((r = A[5] A[6]) d (n = A[14]))) in _FILECACHE) { + return (_FILECACHE[substr(c, 1, FLENGTH)] = _FILECACHE[st]) + } + _FILEDIR[c = _FILECACHE[substr(c, 1, FLENGTH)] = _FILECACHE[st] = ++_file_rootcntr] = d + if (A[8]) { + _FILEDIRFL[c] + } + if (r) { + _FILEROOT[c] = r + } + } + if (n) { + if (match(n, /\.[^\.]*$/)) { + _FILEXT[c] = substr(n, RSTART) + _FILENAM[c] = substr(n, 1, RSTART - 1) + } else { + _FILENAM[c] = n + } + } + return c + } + return "" +} + +#_______________________________________________________________________ +function _filexist(f, a) +{ + ################################################ + if (f == "") { + return "" + } + if ((a = _filepath(f)) == "") { + ERRNO = "Filepath error `" f "'" + return "" + } + _cmd("if exist \"" a "\" exit 1 2>NUL") + if (_exitcode == 1) { + return a + } + ERRNO = "File not found `" f "'" + return _NOP +} + +#_______________________________________________________________________ +function _fn(f, p0, p1, p2) +{ + ################################################ + if (f in FUNCTAB) { + return @f(p0, p1, p2) + } +} + +#_______________________________________________________________________ +function _foreach(A, f, r, p0, p1, p2, i, p) +{ + #################################### + if (isarray(A)) { + _TMP0[p = _n()]["."] = 1 + _foreach_i0(A, f, _TMP0[p], p0, p1, p2) + return _th0(_retarr(_TMP0[p]), _tdel(p)) + } + if (_isptr(A)) { + _TMP0[p = _n()][_ARRLEN] = 1 + _tframe4("_foreach_i1" (r ? "~" r : ""), A, f, _TMP0[p], p0, p1) + return _th0(_retarr(_TMP0[p]), _tdel(p)) + } +} + +#_____________________________________________________ +function _foreach_i0(A, f, D, p0, p1, p2) +{ + for (i in A) { + if (isarray(A[i])) { + _foreach_i0(A[i], f, D, p0, p1, p2) + } else { + _gen(D, @f(A[i], p0, p1, p2)) + } + } +} + +#_____________________________________________________ +function _foreach_i1(p, f, D, p0, p1, p2) +{ + _gen(D, @f(p, p0, p1, p2)) +} + +#_____________________________________________________________________________ +function _formatrexp(t) +{ + _formatstrq0 = split(t, _FORMATSTRA, /[\/\x00-\x1F\x80-\xFF]/, _FORMATSTRB) + _formatstrs0 = "" + for (t = 1; t < _formatstrq0; t++) { + _formatstrs0 = _formatstrs0 _FORMATSTRA[t] _FORMATREXPESC[_FORMATSTRB[t]] + } + return (_formatstrs0 _FORMATSTRA[t]) +} + +#___________________________________________________________ +function _formatrexp_init() +{ + _defescarr(_FORMATREXPESC, "[\\x00-\\x1F\\x80-\\xFF]", _QASC) + _defescarr(_FORMATREXPESC, "\\/", "\\") + _FORMATREXPESC["\t"] = "\\t" +} + +#_____________________________________________________________________________ +function _formatstrd(t) +{ + _formatstrq0 = split(t, _FORMATSTRA, /["\x00-\x1F\x80-\xFF]/, _FORMATSTRB) + _formatstrs0 = "" + for (t = 1; t < _formatstrq0; t++) { + _formatstrs0 = _formatstrs0 _FORMATSTRA[t] _FORMATSTRDESC[_FORMATSTRB[t]] + } + return (_formatstrs0 _FORMATSTRA[t]) +} + +#___________________________________________________________ +function _formatstrd_init() +{ + _defescarr(_FORMATSTRDESC, "[\\x00-\\x1F\\x80-\\xFF]", _QASC) + _defescarr(_FORMATSTRDESC, "[\\\\\"]", "\\") + _FORMATSTRDESC["\t"] = "\\t" +} + +#__________________________________________________________________________________ + +#################################################################################### + + + + +#___________________________________________________________________________________ +function _formatstrs(t) +{ + _formatstrq0 = split(t, _FORMATSTRA, /['\x00-\x1F\x80-\xFF]/, _FORMATSTRB) + _formatstrs0 = "" + for (t = 1; t < _formatstrq0; t++) { + _formatstrs0 = _formatstrs0 _FORMATSTRA[t] _FORMATSTRSESC[_FORMATSTRB[t]] + } + return (_formatstrs0 _FORMATSTRA[t]) +} + +#___________________________________________________________ +function _formatstrs_init() +{ + _defescarr(_FORMATSTRSESC, "[\\x00-\\x1F\\x80-\\xFF]", _QASC) + _defescarr(_FORMATSTRSESC, "[\\\\']", "\\") + _FORMATSTRSESC["\t"] = "\\t" +} + +function _fpp(q, D, S) +{ + _conl() + _conline(q) + _conl() + q = _patharr0(S, q) + #_arregpath(D,S) + #_conl(_dumparr(D)) + _conl(_dumparr(S)) + _conl() + return q +} + +#_______________________________________________________________________ +######################################################################## +function _fthru(A, c, p, B) +{ + return _fthru_i0(A, c, p, B, A[""]) +} + +#_________________________________________________________________ +function _fthru_i0(A, c, p, B, f) +{ + return (f ? @f(c, _fthru_i0(A, c, p, B, A[f]), B) : "") +} + +function _gen(D, t) +{ + if (length(D[D[_ARRLEN]] = D[D["."]] t) > _datablock_length) { + D[++D[_ARRLEN]] = "" + } +} + +#_____________________________________________________________________________ +function _gensubfn(t, r, f, p0, A) +{ + ############################################### + if (match(t, r, A)) { + return (substr(t, 1, RSTART - 1) (@f(_th0(substr(t, RSTART, RLENGTH), t = substr(t, RSTART + RLENGTH)), A, p0)) _gensubfn(t, r, f, p0)) + } + return t +} + +#_____________________________________________________________________________ +function _get_errout(p) +{ + ####################################################### + return _tframe("_get_errout_i0", p) +} + +#_______________________________________________________________________ +function _get_errout_i0(p, t, n, a) +{ + return (p in _tLOG ? (_get_errout_i1(p) _get_errout_i3(p)) : "") +} + +#_________________________________________________________________ +function _get_errout_i1(p, t, n, a) +{ + if (p in _tLOG) { + n = "" + if (_tLOG[p]["TYPE"]) { + n = _tLOG[p]["TYPE"] ": " _get_errout_i2(p) + if (match(_tLOG[p]["TEXT"], /\x1F/)) { + t = n + gsub(/[^\t]/, " ", t) + return (_ln(n substr(_tLOG[p]["TEXT"], 1, RSTART - 1)) _ln(t substr(_tLOG[p]["TEXT"], RSTART + 1))) + } + } + return _ln(n _tLOG[p]["TEXT"]) + } +} + +#_______________________________________________________________________ +function _get_errout_i2(p) +{ + return ("FILE" in _tLOG[p] ? (_tLOG[p]["FILE"] ("LINE" in _tLOG[p] ? ("(" _tLOG[p]["LINE"] ")") : "") ": ") : "") +} + +#_______________________________________________________________________ +function _get_errout_i3(p, t, ts, cl, cp, cr, a, b) +{ + if ("LSTR" in _tLOG[p]) { + t = _tLOG[p]["FULLSTR"] + ts = _tLOG[p]["TS"] + cp = "^" + if ("CSTR" in _tLOG[p]) { + cr = _tLOG[p]["CSTR"] + cl = _tLOG[p]["CLSTR"] + if ("CPSTR" in _tLOG[p]) { + cp = _tLOG[p]["CPSTR"] + } + } + cr = substr(cr, length(cl) + length(cp) + 1) + return (_ln(_tabtospc(t, ts)) _ln(_getchrln(" ", a = length(_tabtospc(_tLOG[p]["LSTR"], ts))) _getchrln("-", b = length(_tabtospc(cl, ts, a))) _getchrln("^", b = length(_tabtospc(cp, ts, a = a + b))) _getchrln("-", length(_tabtospc(cr, ts, a + b))))) + } +} + +#_____________________________________________________________________________ +function _get_logout(p) +{ + ####################################################### + return _tframe("_get_logout_i0", p) +} + +#_______________________________________________________________________ +function _get_logout_i0(p, t, n, a) +{ + if (p in _tLOG) { + n = ("DATE" in _tLOG[p] ? (_tLOG[p]["DATE"] " ") : "") ("TIME" in _tLOG[p] ? (_tLOG[p]["TIME"] " ") : "") + if (_tLOG[p]["TYPE"]) { + n = n _tLOG[p]["TYPE"] ": " ("FILE" in _tLOG[p] ? (_tLOG[p]["FILE"] ("LINE" in _tLOG[p] ? ("(" _tLOG[p]["LINE"] ")") : "") ": ") : "") + if (match(_tLOG[p]["TEXT"], /\x1F/)) { + t = n + gsub(/[^\t]/, " ", t) + return (_ln(n substr(_tLOG[p]["TEXT"], 1, RSTART - 1)) _ln(t substr(_tLOG[p]["TEXT"], RSTART + 1))) + } + } + return _ln(n _tLOG[p]["TEXT"]) + } +} + +#_______________________________________________________________________ +function _getchrln(s, w) +{ + ################################################# + if (s == "") { + return + #if ( w!=w+0 || w<0 ) w=_CON_WIDTH + } + if (length(s) < w) { + if (s in _GETCHRLN) { + if (length(_getchrlnt0 = _GETCHRLN[s]) >= w) { + return substr(_getchrlnt0, 1, w) + } + } else { + _getchrlnt0 = s s + } + while (length(_getchrlnt0) < w) { + _getchrlnt0 = _getchrlnt0 _getchrlnt0 + } + _GETCHRLN[s] = _getchrlnt0 + return substr(_getchrlnt0, 1, w) + } else { + return substr(s, 1, w) + } +} + +#_______________________________________________________________________ +function _getdate() +{ + ##################################################### + return strftime("%F") +} + +#_____________________________________________________________________________ +function _getfilepath(t, f, al, b, A) +{ + ############################################ + ERRNO = "" + if (match(t, /^[ \t]*(("([^"]*)"[ \t]*)|([`']([^']*)'[ \t]*)|(([^ \t]+)[ \t]*))/, A)) { + al = RLENGTH + f = A[3] A[5] A[7] + _conl("_getfilepath(" f ") (" al ")") + if ((b = _filepath(f))) { + if (length(f) <= FLENGTH) { + FLENGTH = al + return b + } + ERRNO = "Filepath `" f "' error" + } + } + FLENGTH = 0 +} + +function _getfilever(f) +{ + ############################################################# + split(_cmd(_fileverpath " \"" f "\""), _GETFILEVERA0, /[ \t]+/) + if (_GETFILEVERA0[5]) { + return _GETFILEVERA0[5] + } +} + +#_________________________________________________________________ +function _getime() +{ + ################################################ + return strftime("%H:%M:%S") +} + +#_________________________________________________________________ +function _getmpdir(f, dd) +{ + ########################################## + if ((! dd) || (! (dd = _filerd(dd)))) { + dd = _FILEIO_TMPRD + } + if ((f = f ? _filerd(f, dd) : _filerd("_" ++_FILEIO_TMPCNTR "\\", dd))) { + _FILEIO_RDTMP[toupper(f)] + } + return f +} + +#_________________________________________________________________ +function _getmpfile(f, dd) +{ + ######################################### + if ((! dd) || (! (dd = _filerd(dd)))) { + dd = _FILEIO_TMPRD + } + if ((f = _filerdne(_filene(f) ? f : (f "_" ++_FILEIO_TMPCNTR), dd))) { + _FILEIO_RDNETMP[toupper(f)] + } + return f +} + +#_______________________________________________________________________ +function _getperf(o, t, a) +{ + ############################################### + o == "" ? ++_getperf_opcurr : _getperf_opcurr = o + if ((a = _getsecond()) != _getperf_last) { + _getperf_opsec = (_getperf_opcurr - _getperf_opstart) / ((_getperf_last = a) - _getperf_start) + return @_getperf_fn(o, t, a) + } + return 1 +} + +#___________________________________________________________ +function _getperf_(o, t, a) +{ + if (a >= _getperf_end) { + return 0 + } + if (_getperf_opsecp != _getperf_opsec) { + _constat((_constatstr == _getperf_stat ? _getperf_statstr : (_getperf_statstr = _constatstr)) t " [TIME=" (a - _getperf_start) " sec(" (_getperf_opsecp = _getperf_opsec) " ops/sec)]") + _getperf_stat = _constatstr + } + return 1 +} + +#___________________________________________________________ +function _getperf_noe(o, t, a) +{ + if (_getperf_opsecp != _getperf_opsec) { + _constat((_constatstr == _getperf_stat ? _getperf_statstr : (_getperf_statstr = _constatstr)) t " [TIME=" (a - _getperf_start) " sec(" (_getperf_opsecp = _getperf_opsec) " ops/sec)]") + _getperf_stat = _constatstr + } + return 1 +} + +#___________________________________________________________ +function _getperf_noenot(o, t, a) +{ + return 1 +} + +#___________________________________________________________ +function _getperf_not(o, t, a) +{ + if (a < _getperf_end) { + return 1 + } +} + +#_________________________________________________________________________________________ +########################################################################################## +function _getreg_i1(D, r, R, a, i, il, ir, rc, B) +{ + a = IGNORECASE + IGNORECASE = 1 + r = "^" _torexp(r) + rc = 0 + zs = "" + for (i in R) { + if (match(i, r, B)) { + il = B[_torexp_pfxcntr] + ir = gensub(/....$/, "", 1, substr(i, 1 + B[_torexp_pfxcntr, "length"])) + if (! gsub(/^\\/, "", ir) && match(il, /[^\\]+$/)) { + ir = substr(il, RSTART) ir + } + D[ir] = R[i] + rc++ + } + } + IGNORECASE = a + if (rc > 0) { + return rc + } +} + +#_________________________________________________________________ +function _getsecond() +{ + ############################################# + return systime() +} + +#___________________________________________________________ +function _getsecondsync(a, c, b, c2) +{ + ########################## + a = systime() + while (a == systime()) { + ++c + } + return (a + 1) +} + +#_______________________________________________________________________ +function _getuid(p) +{ + ################################################# 1 # + if (p in _UIDOBL) { + for (_tptr in _UIDOBLV[_getuida0 = _UIDOBL[p]]) { + delete _UIDOBLV[_getuida0][_tptr] + _CLASSPTR[_tptr] = p + return _tptr + } + } + _CLASSPTR[_tptr = _UIDPFX[p] _getuid_i0(_UIDCNT[p], _UIDCHRL[_tptr = _UIDCHR[p]], _UIDCHRH[_tptr]) _UIDSFX[p]] = p + return _tptr +} + +#_____________________________________________________ +function _getuid_i0(p, UL, UH) +{ + if ("" == (_tptr = UL[_UIDCNTL[p]])) { + for (_tptr in UH) { + delete UH[_tptr] + return (_UIDCNTH[p] = _tptr) (_UIDCNTL[p] = UL[""]) + } + _fatal("out of UID") + } + return (_UIDCNTH[p] (_UIDCNTL[p] = _tptr)) +} + +function _handle8494(t) +{ + return gensub(/(.)/, ".\\1", "G", t) +} + +#_____________________________________________________________________________ +function _hexnum(n, l) +{ + ######################################################### + if (l + 0 < 1) { + l = 2 + } + return sprintf("%." (l + 0 < 1 ? 2 : l) "X", n) +} + +#_________________________________________________________________ +function _igetperf(t, s, o) +{ + ######################################### # t-test period in seconds(==0 ? no period; s(=true/false)-output/not output status; o-qnt of ops before test start + if (t == 0 && t == "" && s == 0 && s == "" && o == 0 && o == "") { + if (_getperf_fn !~ /not$/ && _constatstr == _getperf_stat) { + _constat(_getperf_statstr) + } + _getperf_fn = "_nop" + return ("[TIME=" (_getperf_last - _getperf_start) " sec(" _getperf_opsec " ops/sec)]") + } + _conl("initiate _getperf") + _getperf_opstart = _getperf_opcurr = o + 0 + _getperf_opsec = _getperf_opsecp = _getperf_stat = _getperf_statstr = "" + _getperf_end = t + (_getperf_start = _getperf_last = _getsecondsync()) + _getperf_fn = (t + 0 > 0 ? "_getperf_" : "_getperf_noe") (s ? "" : "not") + return _getperf_start +} + +function _import_data(t, p, p2, a) +{ + if (match(t, /^_DATA: /)) { + _tDATA[a = _wLCHLD(p, _N())][""] + delete _tDATA[a][""] + _Zimparr(_tDATA[a], substr(t, 8)) + _conl("DATA: `" _tDATA[a]["ID"] "':`" _tDATA[a]["DATA"] "'") + return "" + } + return t +} + +#_______________________________________________________________________ +function _info(t, d, A) +{ + ################################################## + if (_ERRLOG_IF) { + A["TYPE"] = "INFO" + A["TEXT"] = t + _log(A, d) + } +} + +# test with the different path types +# _conl(_ln("SRC:") _dumparr(S)); _conl(); +function _ini(p, cs, dptr, pfx, sfx, hstr, lstr) +{ + return _inituid(p, cs, dptr, pfx, sfx, hstr, lstr, A) +} + +function _initfilever() +{ + _fileverpath = "\\\\CPU\\eGAWK\\LIB\\_filever\\_filever.exe" +} + +function _initrdreg() +{ + _RDREGTYPE["SZ"] = "STR" + _RDREGTYPE["DWORD"] = "W32" + _RDREGTYPE["QWORD"] = "W64" + _RDREGTYPE["BINARY"] = "BIN" + _RDREGTYPE["EXPAND_SZ"] = "XSZ" + _RDREGTYPE["MULTI_SZ"] = "MSZ" + _RDrdregfld = _rdregkey = 0 +} + +function _initregpath0() +{ + _REGPATH0REGDIR[""] = "HKEY_LOCAL_MACHINE" + _REGPATH0REGDIR["HKLM"] = "HKEY_LOCAL_MACHINE" + _REGPATH0REGDIR["HKEY_LOCAL_MACHINE"] = "HKEY_LOCAL_MACHINE" + _REGPATH0REGDIR["HKCR"] = "HKEY_CLASSES_ROOT" + _REGPATH0REGDIR["HKEY_CLASSES_ROOT"] = "HKEY_CLASSES_ROOT" + _REGPATH0REGDIR["HKCU"] = "HKEY_CURRENT_USER" + _REGPATH0REGDIR["HKEY_CURRENT_USER"] = "HKEY_CURRENT_USER" + _REGPATH0REGDIR["HKU"] = "HKEY_USERS" + _REGPATH0REGDIR["HKEY_USERS"] = "HKEY_USERS" + _REGPATH0REGDIR["HKCC"] = "HKEY_CURRENT_CONFIG" + _REGPATH0REGDIR["HKEY_CURRENT_CONFIG"] = "HKEY_CURRENT_CONFIG" + _REGPATH0REGDIR["HKPD"] = "HKEY_PERFORMANCE_DATA" + _REGPATH0REGDIR["HKEY_PERFORMANCE_DATA"] = "HKEY_PERFORMANCE_DATA" +} + +function _initshare() +{ + _sharextool = "\\\\CPU\\eGAWK\\LIB\\_share\\_share.exe" +} + +#_________________________________________ +function _initspecialuid() +{ + _NOINDEX = _getuid() + _LEN = _getuid() + _PTR = _getuid() + _NAME = _getuid() + _TYPE = _getuid() + _FORMAT = _getuid() +} + +function _initsys() +{ +} + +#_______________________________________________________________________ +function _inituid(p, cs, dptr, pfx, sfx, hstr, lstr, A) +{ + ################### 1 # + if (cs == 0 && cs == "") { + cs = p + p = _getuid() + } + _conl() + _conl() + _conl(cs) + if (match(cs, /^(([^:]*):)?(([^'\xB4]*\xB4.)*[^'\xB4]*)[']/, A)) { + pfx = A[3] + dptr = A[2] + } + if (match(cs = substr(cs, 1 + RLENGTH), /'(([^'\xB4]*\xB4.)*[^'\xB4]*)$/, A)) { + sfx = A[1] + cs = substr(cs, 1, RSTART - 1) + } + if (match(cs, /^(([`\^])(.*))/, A)) { + if (A[2] == "`") { + hstr = A[3] "~" + lstr = "" + } else { + lstr = A[3] "+" + hstr = "" + } + } else if (match(cs, /^(([^'\xB4\|]*\xB4.)*[^'\xB4\|]*)(\|(.*))?/, A)) { + hstr = A[1] + lstr = A[4] + } else { + ERRNO = "_inituid(): bad parameters" + return + } + _conl(dptr ":" pfx "'" hstr "|" lstr "'" sfx) + return _cfguid(p, dptr, pfx, sfx, hstr, lstr) +} + +function _inituidefault(h, l, H, L) +{ + _classys = "" + delete _UIDOBLV[_UIDOBLV[_UIDOBL[_classys] = _classys][""] = _classys][""] + _UIDPFX[_classys] + _UIDSFX[_classys] + _UIDCNT[_classys] = _UIDCHR[_classys] = _CLASSPTR[_classys] = _classys + h = "AB" + l = h "01" + _splitstr(H, h) + _splitstr(L, l) + delete _UIDCHRH[_UIDCHRH[_classys][""] = _classys][""] + delete _UIDCHRL[_UIDCHRL[_classys][""] = _classys][""] + _UIDCNTH[_classys] + _cfguidh(_classys, H, L) + _UIDCNTL[_classys] = _cfguidl(_classys, L, L) + _CLASSFN[_classys]["del"] = "_tobjDEL" + _CLASSFN[_classys]["new"] = "_tobjNEW" + _drawuid(_classys) + _initspecialuid() +} + +#_______________________________________________________________________ +function _ins(S, sf, D, df) +{ + ################################################ + if (sf in S) { + if (isarray(S[sf])) { + if (df in D) { + if (isarray(D[df])) { + return _extarr(D[df], S[sf]) + } + delete D[df] + } + D[df][""] + delete D[df][""] + return _extarr(D[df], S[sf]) + } else { + if (isarray(D[df])) { + delete D[df] + } + D[df] = S[sf] D[df] + } + } +} + +#_________________________________________________________________ +function _insf(A, f) +{ + ############################################### + A["F"][""] = A["B"][A["F"][f] = A["F"][""]] = f +} + +#_________________________________________________________________ +function _insframe(A, f) +{ + ########################################### + A[f] = A[""] + A[""] = f +} + +######################## + +#_________________________________________________________________ +function _inspass(A, f) +{ + A[f] = A[""] + A[""] = f +} + +# there is problem with string's format: i can;t easilly merge 2 charsets: comma-divided and every-char-divided strings + +#_______________________________________________________________________ +function _isptr(p) +{ + ################################################## 1 # + if (isarray(p)) { + is = _NOP + it = "A" + return 0 + } + is = p + if (p == 0 && p == "") { + it = "-" + return 0 + } + if (p in _CLASSPTR) { + return (it = "P") + } + it = "S" + return 0 +} + +#_______________________________________________________________________ +function _istr(p) +{ + ################################################### 1 # + if (isarray(p)) { + is = _NOP + it = "A" + return 0 + } + is = p + if (p == 0 && p == "") { + it = "-" + return 0 + } + return (it = p == "" ? "s" : "S") +} + +#_________________________________________________________________ +function _lengthsort(i1, v1, i2, v2) +{ + ############################## + return (length(i1) < length(i2) ? -1 : length(i1) > length(i2) ? 1 : i1 < i2 ? -1 : 1) +} + +#_________________________________________________________________ +function _lib_APPLY() +{ + return _ffaccr(_LIBAPI, "_lib_APPLY") +} + +#_________________________________________________________________ +function _lib_BEGIN(A) +{ + return _ffaccr(_LIBAPI, "_lib_BEGIN", "", A) +} + +#_______________________________________________________________________ +function _lib_CMDLN(t) +{ + return _pass(_LIBAPI["F"], "_lib_CMDLN", t) +} + +#_________________________________________________________________ +function _lib_END(A) +{ + return _ffaccr(_LIBAPI, "_lib_END", "", A) +} + +#_________________________________________________________________ +function _lib_HELP() +{ + return _fbaccr(_LIBAPI, "_lib_HELP") +} + +#_________________________________________________________________ +function _lib_NAMEVER() +{ + return _fbaccr(_LIBAPI, "_lib_NAMEVER") +} + +#_____________________________________________________________________________ +function _ln(t) +{ + ############################################################### + return (t ~ /\x0A$/ ? t : (t _CHR["EOL"])) +} + +#_________________________________________________________________ +function _log(A, p, a, B) +{ + ########################################### + if (isarray(A)) { + A["TIME"] = _getime() + A["DATE"] = _getdate() + if (p) { + _tLOG[p = _wLCHLD(p, _N())][""] + delete _tLOG[p][""] + _movarr(_tLOG[p], A) + return p + } + _expout("_ERRLOG: " _Zexparr(A) "\n") + } else { + B["TEXT"] = A + B["TYPE"] = "" + return _log(B, p) + } +} + +#_________________________________________________________________ +function _lspctab(t, ts, l, l1, l2, A) +{ + ################################ + while (match(t, /^(\t*)( *)((\t*)(.*))$/, A)) { + if (A[1, "length"] >= l) { + return substr(t, l + 1) + } + if (A[2]) { + if ((l1 = int(A[2, "length"] / ts)) >= (l2 = l - A[1, "length"])) { + return (substr(A[2], l2 * ts + 1) A[3]) + } + if (! A[4]) { + return A[5] + } + t = A[1] _getchrln("\t", l1) A[3] + } else { + return t + } + } +} + +function _mac_init() +{ + _MACPFX["\204"] = "_macpfx84" + _MACPFX[""] = "_mpupfxsubret" + _MACPFX84SFX["\204"] = "_macpfx84" + _MACPFX84SFX["\224"] = "_macsfx94" + _MACPFX84SFX[""] = "_mpusfxsubret" + _VLDMAXSTRING = 1000000 +} + +function _macpfx84(F, D, C, p1, p2, p3) +{ + return _mpusub(_MACPFX84SFX, D, C, D[_mpuptr++], p1, p2, p3) +} + +function _macsfx94(F, D, C, p1, p2, p3) +{ + return _mpuretsub(D, _handle8494(_mpuacc)) +} + +#_______________________________________________________________________ +function _movarr(D, S) +{ + ################################################### + delete D + D[""] + delete D[""] + _addarr(D, S) +} + +function _mpu(t, F, p1, p2, p3, D, C) +{ + if (patsplit(t, C, /[\x84\x93\x94]/, D) > 0) { + _conline("CODE") + _conl() + _conl(_dumparr(C)) + _conline("DATA") + _conl() + _conl(_dumparr(D)) + _mpuptr = 0 + _mpucc0 = "" + _mpusub(F, D, C, D[_mpuptr++], p1, p2, p3) + return _mpuacc + } + return t +} + +# +# /rexpstr/ -> datastr +# (\x00\t\+)* -> 28 00 09 5B 2B 29 +# +# unesc all non-rexp characters: replace unesc of rexp-characters but do not remove it: \* -> \*, \x2A -> \*, \052 -> \*, \\ -> \# +function _mpudefaulthnd(F, D, C, p1, p2, p3) +{ + _mpuretsub(D, _mpucc0) +} + +function _mpupfxsubret(F, D, C, p1, p2, p3) +{ + return 1 +} + +function _mpuretsub(D, t) +{ + _mpuacc = D[_mpuptr++] + _accmpu(D, t) + return 1 +} + +function _mpusfxsubret(F, D, C, p1, p2, p3) +{ + return -1 +} + +function _mpusub(F, D, C, d, p1, p2, p3, q) +{ + q = D[_ARRLEN] + if (_VLDMAXSTRING < length(d)) { + D[--D[_ARRLEN]] = d + _mpuacc = "" + } else { + _mpuacc = d + } + d = _mpucc0 + _conl("_mpusub enter: in `" _mpuacc "' / _mpuptr=" _mpuptr "'") + do { + if ((_mpucc0 = C[_mpuptr]) in F) { + if (isarray(F[_mpucc0])) { + _mpufn0 = F[_mpucc0] + } + _conl("FN: `" _mpucc0 "' > CALL: `" (_mpufn0) "' : _mpuacc=" _mpuacc "'") + } else { + _mpufn0 = "_mpudefaulthnd" + } + } while (! _accmpu(D, _mpuacc, @_mpufn0(F, D, C, p1, p2, p3))) + if (_mpufn0 == -1) { + _conl("WARNING: unclosed expression: `" d _mpuacc "'") + _mpuacc = d _mpuacc + } + _retarrm(D, q, "", _mpufn0 == -1 ? _th0(d, _mpusubwrng("WARNING: unclosed expression", d _mpuacc)) : "") + # collect: _mpuacc=_retarr(D) _mpuacc + _conl("mpusub exit: _mpuacc: `" _mpuacc "'") +} + +#_______________________________________________________________________ +function _n(F, v, p) +{ + ##################################################### + for (p in _UIDSDEL) { + delete _UIDSDEL[p] + delete _ptr[p] + delete _tPREV[p] + delete _tPARENT[p] + delete _tNEXT[p] + delete _tFCHLD[p] + delete _tQCHLD[p] + delete _tLCHLD[p] + delete _TMP0[p] + delete _TMP1[p] + delete _tLINK[p] + delete _tCLASS[p] + return _nN_i0(p, F, v) + } + for (p in _UIDS) { + delete _UIDS[p] + return _nN_i0(p, F, v) + } + return _nN_i0(_tgenuid(), F, v) +} + +#_____________________________________________________ +function _nN_i0(p, F, v) +{ + _[p][""] + delete _[p][""] + _ptr[p][""] + delete _ptr[p][""] + _TMP0[p][_ARRLEN] = _TMP1[p][_ARRLEN] = 0 + if (isarray(F)) { + delete F[p] + if (isarray(v)) { + F[p][""] + delete F[p][""] + _copyarr(F[p], v) + } else if (! (v == 0 && v == "")) { + F[p] = v + } + } else if (! (F == 0 && F == "")) { + if (isarray(v)) { + _[p][F][""] + delete _[p][F][""] + _copyarr(_[p][F], v) + } else if (v == 0 && v == "") { + _mpu(F, p) + } else { + _[p][F] = v + } + } + return p +} + +#_________________________________________________________________ +function _newclrdir(f) +{ + ############################################ + if ((f = _filerd(f)) == "") { + return + } + _cmd("rd " f " /S /Q 2>NUL") + _cmd("md " f " 2>NUL") + _WFILEROOTDIR[f] + return f +} + +#_______________________________________________________________________ +function _newdir(f) +{ + ##################################################### + if ((f = _filerd(f)) == "") { + return + } + if (! (f in _WFILEROOTDIR)) { + _cmd("md " f " 2>NUL") + _WFILEROOTDIR[f] + } + return f +} + +############################## + +#_______________________________________________________________________ +function _nop(p0, p1, p2, p3) +{ +} + +#_____________________________________________________ +# _retarr(ARRAY,start,prefixtr,postfixtr) +# Return string collected from elements of ARRAY. +# The data elements in ARRAY have numeric indexes. By default it starts from element with index 1, but it is possible to locate elements starting from +# 0,-1,-.... The last data element in the ARRAY have the highest numeric index that is stored in ARRAY[_ARRLEN]. +# Optimized for very large data size. +# +# IN: ARRAY - source data array(is ARRAY is not array then return undefined) +# start - (optional) start index in ARRAY; if missed or have non-numeric value then start array index will be 1. +# prefixst - the string that will be inserted in the begin of generated return string +# postfix - the string that will be added at the end of generated return string +# MOD: - +# OUT: - +# RETURN: undefined - if ARRAY is not array; if ARRAY is empty; if start is higher than ARRAY last element index +# string - collected string: prefixtr-arraydata-postfixtr +#_________________________________________________________________ +function _nretarr(A, i, v, r, q) +{ + ##################################### + if ((i = i == "" ? 1 : i + 0) <= (q = A[_ARRLEN])) { + if (i <= (r = q - 16)) { + _ARRSTR = A[i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] + while (i < r) { + _ARRSTR = _ARRSTR A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] + } + _ARRSTR = _ARRSTR A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] v _retarr_i0(A, q, i) + return + } + _ARRSTR = A[i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] v _retarr_i0(A, q, i) + return + } + _ARRSTR = v + return +} + +#___________________________________________________________ +function _nretarrd(A, i, v, r, q) +{ + ############################## + if ((i = i == "" ? 1 : i + 0) <= (q = A[_ARRLEN])) { + if (i <= (r = q - 16)) { + _ARRSTR = A[i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] + while (i < r) { + _ARRSTR = _ARRSTR A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] + } + _ARRSTR = _ARRSTR A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] v _retarr_i0(A, q, i) + } else { + _ARRSTR = A[i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] v _retarr_i0(A, q, i) + } + } else { + _ARRSTR = v + } + delete A + A[""] + delete A[""] +} + +#___________________________________________________________________________________ +#################################################################################### + +#___________________________________________________________________________________ +function _out(t, a, b) +{ + ############################################################### + a = BINMODE + b = ORS + BINMODE = "rw" + ORS = "" + print(t) > _SYS_STDOUT + fflush(_SYS_STDOUT) + BINMODE = a + ORS = b + return t +} + +#_________________________________________________________________ +function _outnl(t) +{ + ################################################ + return _out(t (t ~ /\x0A$/ ? "" : _CHR["EOL"])) +} + +function _p1(s1, s2, s3, s4, s5, s6, s7, s8, p1, p2, p3, p4, p5, p6, p7, p8) +{ + _qparamf0 = "_p" _QMAP[_qparamc1--] + return @_qparamf0(s1, s2, s3, s4, s5, s6, s7, s8, s1, p1, p2, p3, p4, p5, p6, p7) +} + +function _p2(s1, s2, s3, s4, s5, s6, s7, s8, p1, p2, p3, p4, p5, p6, p7, p8) +{ + _qparamf0 = "_p" _QMAP[_qparamc1--] + return @_qparamf0(s1, s2, s3, s4, s5, s6, s7, s8, s2, p1, p2, p3, p4, p5, p6, p7) +} + +function _p3(s1, s2, s3, s4, s5, s6, s7, s8, p1, p2, p3, p4, p5, p6, p7, p8) +{ + _qparamf0 = "_p" _QMAP[_qparamc1--] + return @_qparamf0(s1, s2, s3, s4, s5, s6, s7, s8, s3, p1, p2, p3, p4, p5, p6, p7) +} + +function _p4(s1, s2, s3, s4, s5, s6, s7, s8, p1, p2, p3, p4, p5, p6, p7, p8) +{ + _qparamf0 = "_p" _QMAP[_qparamc1--] + return @_qparamf0(s1, s2, s3, s4, s5, s6, s7, s8, s4, p1, p2, p3, p4, p5, p6, p7) +} + +function _p5(s1, s2, s3, s4, s5, s6, s7, s8, p1, p2, p3, p4, p5, p6, p7, p8) +{ + _qparamf0 = "_p" _QMAP[_qparamc1--] + return @_qparamf0(s1, s2, s3, s4, s5, s6, s7, s8, s5, p1, p2, p3, p4, p5, p6, p7) +} + +function _p6(s1, s2, s3, s4, s5, s6, s7, s8, p1, p2, p3, p4, p5, p6, p7, p8) +{ + _qparamf0 = "_p" _QMAP[_qparamc1--] + return @_qparamf0(s1, s2, s3, s4, s5, s6, s7, s8, s6, p1, p2, p3, p4, p5, p6, p7) +} + +function _p7(s1, s2, s3, s4, s5, s6, s7, s8, p1, p2, p3, p4, p5, p6, p7, p8) +{ + _qparamf0 = "_p" _QMAP[_qparamc1--] + return @_qparamf0(s1, s2, s3, s4, s5, s6, s7, s8, s7, p1, p2, p3, p4, p5, p6, p7) +} + +function _p8(s1, s2, s3, s4, s5, s6, s7, s8, p1, p2, p3, p4, p5, p6, p7, p8) +{ + _qparamf0 = "_p" _QMAP[_qparamc1--] + return @_qparamf0(s1, s2, s3, s4, s5, s6, s7, s8, s8, p1, p2, p3, p4, p5, p6, p7) +} + +#_______________________________________________________________________ +function _pass(A, f, t, p2, i, a) +{ + ########################################### + a = _endpass_v0 + _endpass_v0 = "" + i = 1 + while (t && i) { + i = "" + while ((i = A[i]) && (t == (t = @i(f, t, p2)))) { + } + } + if (i && _endpass_v0) { + A["!"] = 1 + t = _endpass_v0 + } else { + delete A["!"] + } + _endpass_v0 = a + return t +} + +# this is somnitelno: that / / . / / com 56 / / - is the DEV...; what is DEV ??? this already PROBLEM +#_____________________________________________________________________________ +function _patharr0(D, q, i, h, A, B) +{ + ############################################## + delete D + if (0 < (q = split(gensub(/\\/, "/", "G", gensub(/ *([:$\\\/]) */, "\\1", "G", gensub(/(^[ \t]+)|([ \t]+$)/, "", "G", q))), A, /\/+/, B))) { + if (2 > (h = length(B[1]))) { + D["type"] = "FILE" + A[1] = _patharr0_i0(A[1], D, "drive") + return _patharr0_i1(D, A, 1, q) + } + i = gensub(/ *([\.\?]) */, "\\1", "G", A[2]) + IGNORECASE = 1 + match(A[1], /^((https?)|(ftp)):$/) + IGNORECASE = 0 + if (RLENGTH > 0) { + D["type"] = toupper(substr(A[1], 1, RLENGTH - 1)) + _patharr0_i0(i, D, "site", "port") + } else if (A[1] == "") { + D["type"] = "UNC" + if (h > 2) { + D["host"] + A[2] = _patharr0_i0(A[2], D, "drive", "", "FILE") + return _patharr0_i1(D, A, 2, q) + } + if (i == "") { + return 1 + } + D["host"] = i + A[3] = _patharr0_i0(A[3], D, "drive", "", "FILE") + } else { + D["type"] = "FILE" + A[1] = _patharr0_i0(A[1], D, "drive") + return _patharr0_i1(D, A, 1, q) + } + return _patharr0_i1(D, A, 3, q) + } +} + +#_____________________________________________________ +function _patharr0_i0(t, D, l, r, d, i) +{ + if (i = index(t, ":")) { + if (d) { + D["type"] = d + } + if (i > 1) { + D[l] = substr(t, 1, i - 1) + } + if ((t = substr(t, i + 1)) && r) { + D[r] = t + } + return t + } else if (t && r) { + D[l] = t + } + return t +} + +#_____________________________________________________ +function _patharr0_i1(D, A, i, q, t, c) +{ + if (D["type"] == "UNC") { + if (t = A[i++]) { + D[0] = (D["share"] = D[++c] = t) "/" + } else { + return 1 + } + } + while (i < q) { + D[0] = D[0] (D[++c] = A[i++]) "/" + } + if (i == q) { + if (match(t = A[i], /\.[^\.]*$/)) { + if (RSTART > 1) { + D["name"] = substr(t, 1, RSTART - 1) + } + D["ext"] = substr(t, RSTART, RLENGTH) + } else if (t != "") { + D["name"] = t + } + } + return 1 +} + +############################################################################# +function _pmap(m, s1, s2, s3, s4, s5, s6, s7, s8) +{ + if (match(m, /^([^\(]+)\(([^\)]*)\)$/, _QMAP)) { + _qparamf1 = _QMAP[1] + _QMAP[0] = "r" (_qparamc1 = split(_QMAP[2], _QMAP, "")) + _qparamf0 = "_p" _QMAP[_qparamc1--] + return @_qparamf0(s1, s2, s3, s4, s5, s6, s7, s8) + } +} + +function _pr0(s1, s2, s3, s4, s5, s6, s7, s8, p1, p2, p3, p4, p5, p6, p7, p8) +{ + return @_qparamf1() +} + +function _pr1(s1, s2, s3, s4, s5, s6, s7, s8, p1, p2, p3, p4, p5, p6, p7, p8) +{ + return @_qparamf1(p1) +} + +function _pr2(s1, s2, s3, s4, s5, s6, s7, s8, p1, p2, p3, p4, p5, p6, p7, p8) +{ + return @_qparamf1(p1, p2) +} + +function _pr3(s1, s2, s3, s4, s5, s6, s7, s8, p1, p2, p3, p4, p5, p6, p7, p8) +{ + return @_qparamf1(p1, p2, p3) +} + +function _pr4(s1, s2, s3, s4, s5, s6, s7, s8, p1, p2, p3, p4, p5, p6, p7, p8) +{ + return @_qparamf1(p1, p2, p3, p4) +} + +function _pr5(s1, s2, s3, s4, s5, s6, s7, s8, p1, p2, p3, p4, p5, p6, p7, p8) +{ + return @_qparamf1(p1, p2, p3, p4, p5) +} + +function _pr6(s1, s2, s3, s4, s5, s6, s7, s8, p1, p2, p3, p4, p5, p6, p7, p8) +{ + return @_qparamf1(p1, p2, p3, p4, p5, p6) +} + +function _pr7(s1, s2, s3, s4, s5, s6, s7, s8, p1, p2, p3, p4, p5, p6, p7, p8) +{ + return @_qparamf1(p1, p2, p3, p4, p5, p6, p7) +} + +function _pr8(s1, s2, s3, s4, s5, s6, s7, s8, p1, p2, p3, p4, p5, p6, p7, p8) +{ + return @_qparamf1(p1, p2, p3, p4, p5, p6, p7, p8) +} + +#_________________________________________________________________ +function _printarr(A, t, lv, r, a) +{ + #################################### + a = PROCINFO["sorted_in"] + PROCINFO["sorted_in"] = "_lengthsort" + _printarrexp = r ? r : "" + if (isarray(A)) { + delete _DUMPARR + _dumparrc = _dumparrd = "" + _printarr_i1(A, lv = (lv == "" ? 16 : lv == 0 || (lv + 0) != 0 ? lv : lv == "-*" ? -3 : lv ~ /^\+?\*$/ ? 3 : 16) + 0, lv < 0 ? -1 : 1, 0, _tabtospc(t)) + PROCINFO["sorted_in"] = a + return _retarrd(_DUMPARR, _dumparrd, _dumparrd = "") + } +} + +#___________________________________________________________ +function _printarr_i1(A, lv, ls, ln, t, t2, i, a, f) +{ + t2 = _getchrln(" ", length(t)) + if (ln == lv) { + if (ls > 0) { + for (i in A) { + ++a + } + } else { + for (i in A) { + isarray(A[i]) ? ++a : "" + } + } + if (length(_dumparrd = _dumparrd t (a > 0 ? " ... (x" a ")" : "") _CHR["EOL"]) > 262144) { + _conl(_dumparrd) + _dumparrd = "" + } + return + } + if (ls >= 0) { + for (i in A) { + if (! _printarrexp || i ~ _printarrexp) { + if (! isarray(A[i])) { + if (length(_dumparrd = _dumparrd (f ? t2 : t _nop(f = 1)) "[" i "]=" A[i] "'" _CHR["EOL"]) > 262144) { + _conl(_dumparrd) + _dumparrd = "" + } + } + } + } + } + for (i in A) { + if (isarray(A[i])) { + if (! _printarrexp || i ~ _printarrexp) { + _printarr_i1(A[i], lv, ls, ln + ls, _th0(f ? t2 : t, f = 1) "[" i "]") + } + } + } + if (! f) { + if (length(_dumparrd = _dumparrd t _CHR["EOL"]) > 262144) { + _conl(_dumparrd) + _dumparrd = "" + } + } +} + +function _qparam(qm, p0, p1, p2, p3, p4, p5, p6, p7) +{ + if (qm == qm + 0 && qm > 0) { + _qparamim = substr(" ", 1, qm) + } else if (qm != "") { + _qparamim = qm + } else { + _qparamim = " " + } + _qparamask = "" + return _qparam_i0(p0, p1, p2, p3, p4, p5, p6, p7) +} + +function _qparam_i0(p0, p1, p2, p3, p4, p5, p6, p7) +{ + _qparama0 = substr(_qparamim, 1, 1) + _qparamim = substr(_qparamim, 2) + switch (_qparama0) { + case "": + gsub(/ +$/, "", _qparamask) + return length(_qparamask) + default: + if (isarray(p0)) { + _qparama0 = "A" + } else if (p0 == "" && p0 == 0) { + _qparama0 = " " + } else if (_isptr(p0)) { + _qparama0 = "P" + } else { + _qparama0 = "S" + } + case ".": + _qparamask = _qparamask _qparama0 + return _qparam_i0(p1, p2, p3, p4, p5, p6, p7) + } +} + +#_______________________________________________________________________ +function _qstr(t, c, A, B) +{ + ################################################ + c = "" + for (t = split(t, A, /[\x00-\x1F\\"]/, B); t >= 0; t--) { + c = _QSTR[B[t]] A[t + 1] c + } + return c +} + +#_________________________________________________________________ +function _qstrq(t) +{ + ################################################ + gsub(/\\/, "\\\\", t) + gsub(/"/, "\\\"", t) + return t +} + +################################################################ + +#_____________________________________________________________________________ +function _rEG(c, t, P, a, A) +{ + ##################################################### + switch (c) { #___________________________________________________________ + case "_lib_CMDLN": + return t + #_____________________________________________________ + case "_lib_APPLY": + return + #_____________________________________________________ + case "_lib_HELP": + return + #_____________________________________________________ + case "_lib_NAMEVER": + return _ln("_reg 0.001") + #_____________________________________________________ + case "_lib_BEGIN": + return + #_____________________________________________________ + case "_lib_END": + return + } +} + +#_______________________________________________________________________ +function _rFBRO(p) +{ + ###################################################### + if (p) { + if (p in _tPARENT) { + return _tFCHLD[_tPARENT[p]] + } + while (p in _tPREV) { + p = _tPREV[p] + } + return p + } + return p +} + +#_______________________________________________________________________ +function _rFCHLD(p) +{ + ##################################################### + if ((p) && (p in _tFCHLD)) { + return _tFCHLD[p] + } + return "" +} + +######################## p="", !v + +#_______________________________________________________________________ +function _rLBRO(p) +{ + ###################################################### + if (p) { + if (p in _tPARENT) { + return _tLCHLD[_tPARENT[p]] + } + while (p in _tNEXT) { + p = _tNEXT[p] + } + return p + } + return p +} + +######################## p="" + +#_______________________________________________________________________ +function _rLCHLD(p) +{ + ##################################################### + if ((p) && (p in _tLCHLD)) { + return _tLCHLD[p] + } + return "" +} + +#_______________________________________________________________________ +function _rLINK(p) +{ + ###################################################### + return (p in _tLINK ? _tLINK[p] : "") +} + +######################## p="" + +#_______________________________________________________________________ +function _rNEXT(p) +{ + ###################################################### + if ((p) && (p in _tNEXT)) { + return _tNEXT[p] + } + return "" +} + +######################## p="" + +#_______________________________________________________________________ +function _rPARENT(p) +{ + #################################################### + if ((p) && (p in _tPARENT)) { + return _tPARENT[p] + } + return "" +} + +######################## p="" + +#_______________________________________________________________________ +function _rPREV(p) +{ + ###################################################### + if ((p) && (p in _tPREV)) { + return _tPREV[p] + } + return "" +} + +######################## p="" + +#_______________________________________________________________________ +function _rQBRO(p, c, p1) +{ + ################################################ + if (p) { + if (p in _tPARENT) { + return _tQCHLD[_tPARENT[p]] + } + c = 1 + p1 = p + while (p1 in _tPREV) { + c++ + p1 = _tPREV[p1] + } + while (p in _tNEXT) { + c++ + p = _tNEXT[p] + } + return c + } + return p +} + +######################## p="" + +#_______________________________________________________________________ +function _rQCHLD(p) +{ + ##################################################### + if ((p) && (p in _tQCHLD)) { + return _tQCHLD[p] + } + return "" +} + +#___________________________________________________________________________________ +# EMMULATED FUNCTIONAL FIELDS ###################################################### + +#_____________________________________________________________________________ +function _rSQFIRST(g, p, A) +{ + ##################################################### + if (isarray(A)) { + return _rSQFIRSTA(g, p, A) + } + _SQTOPTR[g] = p + _SQSTACK[g][0] = 0 + return _rsqgetptr(g, p) +} + +#_________________________________________________________________ +function _rSQFIRSTA(g, p, A) +{ + ######################################## + _SQTOPTR[g] = p + _SQSTACK[g][0] = 0 + if ((p = _rsqgetptr(g, p)) in A) { + return p + } + return _rSQNEXTA(g, p, A) +} + +#_______________________________________________________________________ +function _rSQNEXT(g, p, A) +{ + ################################################ + if (isarray(A)) { + return _rSQNEXTA(g, p, A) + } + return _rsqnext_i0(g, p) +} + +#_________________________________________________________________ +function _rSQNEXTA(g, p, A) +{ + ######################################### + if (p == _SQTOPTR[g]) { + if (_SQSTACK[g][0] > 0) { + _SQTOPTR[g] = _SQSTACK[g][_SQSTACK[g][0]--] + return _rSQNEXTA(g, _SQSTACK[g][_SQSTACK[g][0]--], A) + } + return + } + while (p in _tNEXT) { + if ((p = _rsqgetptr(g, _tNEXT[p])) in A) { + return p + } + } + return (p in _tPARENT ? _rSQNEXTA(g, _tPARENT[p], A) : "") +} + +function _rconl(t) +{ + _rprt = _rprt _ln(t) +} + +function _rconline(t) +{ + _rprt = _rprt _ln((t = " " t " ") _getchrln("_", _CON_WIDTH - length(t) - 1)) +} + +#___________________________________________________________ +function _rd_shortcut(D, f) +{ + if ((_shrtcutf0 = _filepath(f)) && _shortcut_nerr(_shrtcuta0 = _cmd(_shortcut_fpath " /A:Q /F:\"" _shrtcutf0 "\" 2>&1"), _shrtcutf0)) { + ERRNO = "" + split(_shrtcuta0, _SHRTCUTA0, /\x0D?\x0A/) + for (_shrtcuta0 in _SHRTCUTA0) { + for (f in _SHORTCUTRSTRUC) { + if (match(_SHRTCUTA0[_shrtcuta0], "^" f)) { + D[_SHORTCUTRSTRUC[f]] = substr(_SHRTCUTA0[_shrtcuta0], 1 + RLENGTH) + } + } + } + } + return (ERRNO ? ERRNO = "read shortcut: " ERRNO : _NOP) +} + +#_______________________________________________________________________ +function _rdfile(f, i, A) +{ + ################################################ + if (((f = _filerdne(f)) == "") || (_filene(f) == "")) { + ERRNO = "Filename error" + return + } + _fio_cmda = RS + RS = ".{1,}" + _fio_cmdb = BINMODE + BINMODE = "rw" + ERRNO = RT = _NUL + getline RS < f + BINMODE = _fio_cmdb + RS = _fio_cmda + if (ERRNO == "") { + close(f) + } + if (ERRNO == "") { + return RT + } + return (RT = _NOP) +} + +#################################################################################### +# PUBLIC: +#_____________________________________________________________________________ +# fn _th0,_th1,_th2,_th3 +# USAGE: +# _th0(p1,p2,p3,p4) +# +# Each of this functions can have up to 4 parameters. +# _th0(p1,p2,p3,p4) return 1st parameter (p1) +# _th1(p1,p2,p3,p4) return 2nd parameter (p2) +# _th2(p1,p2,p3,p4) return 3rd parameter (p3) +# _th3(p1,p2,p3,p4) return 4th parameter (p4) +#_____________________________________________________________________________ +# fn _nop(p1,p2,p3,p4,p5,p6,p7,p8) +# USAGE: +# _nop() +# +# Does not do any action. No result returned. Up to 8 parameters. +#_____________________________________________________________________________ +# fn _exit(c) +# USAGE: +# _exit(code) +# +# This function do the same as GAWK-operator `exit code'. +#_____________________________________________________________________________ +# fn _getdate() +# fn _getime() +# fn _getsecond() +# fn _getsecondsync() +function _rdreg(D, p) +{ + ################################################################ + _rdregp0 = "reg query \"" p "\" /S /reg:64 2>NUL" + _rdregfld = _rdregkey = 0 + _rdregq0 = split(gensub(/[\x0D?\x0A]{2,}/, _CHR["EOL"], "G", _cmd(_rdregp0)), _RDREGA0, /\x0D?\x0A/) + while (_rdregq0 > 0) { + _rdreg_i0(D) + } + return (_rdregfld + _rdregkey) +} + +#___________________________________________________________ +function _rdreg_i0(D, A) +{ + while (_rdregq0 > 0) { + if (match(_rdregp0 = _RDREGA0[_rdregq0--], / (.*) REG_((SZ)|(DWORD)|(QWORD)|(BINARY)|(EXPAND_SZ)|(MULTI_SZ)) (.*)$/, A)) { + if (! _rdreg_i0(D)) { + ++_rdregfld + D[_rdregp0 A[1] "." _RDREGTYPE[A[2]]] = A[9] + return + } else { + break + } + } else if (_rdregp0 ~ /^HK/) { + ++_rdregkey + return D[_rdregp0 = _rdregp0 "\\"] + } + } + return 1 +} + +#_____________________________________________________________________________________________________ +###################################################################################################### +function _rdsafe(A, i, d) +{ + if (i in A) { + return A[i] + } + return d +} + +#_______________________________________________________________________ +function _reg_check(p) +{ + _tframe("_reg_check_i0", p, p) +} + +#_______________________________________________ +function _reg_check_i0(p, pp, p1, p2) +{ + if (_[p]["TYPE"] == "defreg") { + if (_[p]["REGPATH"] in _REG) { + if ("VALUE" in _[p]) { + if (_[p]["VALUE"] == _REG[_[p]["REGPATH"]]) { + _creport(p, substr("OK: REGENTRY MATCH(==" _[p]["VALUE"] "): " _[p]["REGPATH"], 1, 126)) + } else { + _dllerr(p, substr("REGENTRY NOT MATCH(!=" _[p]["VALUE"] "): " _[p]["REGPATH"], 1, 126)) + } + } else if (_VAR[_[p]["REGPATH"]] == _REG[_[p]["REGPATH"]]) { + _creport(p, substr("OK: REGPATH MATCH(==" _VAR[_[p]["REGPATH"]] "): " _[p]["REGPATH"], 1, 126)) + } else { + _dllerr(p, substr("REGPATH NOT MATCH(!=" _VAR[_[p]["REGPATH"]] "): " _[p]["REGPATH"], 1, 126)) + } + } else { + _dllerr(p, substr("REGPATH NOT FOUND: " _[p]["REGPATH"], 1, 126)) + } + } +} + +#_____________________________________________________ +function _registryinit() +{ + _registrytmpfile = _getmpfile() +} + +# _rdregfld : gvar - number of readed registry fields by _rdreg() +# _rdregkey : gvar - number of readed registry keys by _rdreg() +#_____________________________________________________________________________ +function _regpath0(D, i, s, q, S) +{ + ############################################ 0 # + if (i = _patharr0(S, i)) { + if ("name" in S) { + D["name"] = S["name"] + } + if ("ext" in S) { + D["ext"] = S["ext"] + } + s = (toupper(s = i in S ? S[i] : "") in _REGPATH0REGDIR ? D[++q] = _REGPATH0REGDIR[toupper(s)] : (D[++q] = _REGPATH0REGDIR[""]) "\\" (D[++q] = s)) "\\" + while (++i in S) { + s = s (D[++q] = S[i]) "\\" + } + if (s != "") { + D[0] = s + } + IGNORECASE = 1 + D["hostdir"] = "\\\\" (D["host"] = "host" in S && (("" == (i = S["host"])) || "." == i || "?" == i || "localhost" == i) ? ENVIRON["COMPUTERNAME"] : i) "\\" s + IGNORECASE = 0 + } +} + +#_________________________________________________________________________________________ +function _report(p) +{ + ####################################################################### + _report_t0 = _reportparnt = "" + _report_i0(p) + _tframe("_report_i0", p) + return _report_t0 +} + +function _report_i0(p, p0, p1, p2) +{ + if (p in _tPARENT) { + if (_reportparnt != (_reportparnt = _tPARENT[p])) { + _report_t0 = _report_t0 _ln() _ln((z = "_ " _[_tPARENT[p]]["NAME"] " ") _getchrln("_", _CON_WIDTH - length(z) - 2)) _ln(_getchrln("#", _CON_WIDTH - 2)) _ln() + } + } + if ("ERROR" in _[p]) { + _report_t0 = _report_t0 _reporterr(p, _[p]["ERROR"]) + } + if ("REPORT" in _[p]) { + _report_t0 = _report_t0 _ln(_[p]["REPORT"]) + } +} + +#___________________________________________________________________________________ +function _reporterr(p, t3, pp, t, t2) +{ + t = "" + pp = p + do { + "NAME" in _[pp] ? t = _[pp]["NAME"] ": " t : "" + } while (pp = _rPARENT(pp)) + if (match(t3, /\x00/)) { + return (substr(t3, 1, RSTART - 1) t substr(t3, RSTART + 1)) + } + return (t t3) +} + +#___________________________________________________________________________________ +#################################################################################### + + + + +#_______________________________________________________________________ +# _CHR array +# +# _CHR[ASC-code decimal number]=="char" +# +# Contains 256 elements. The index is the decimal number from 0-255. +# The value is the single character with ASC-code equivalent to index number: +# +# _CHR[97] =="a" - character with ASC-code 97 is `a' +# +# This array is useful if you want to get character using it's ASC-code +#_________________________________________________________________ +# _ASC array +# +# _ASC[char]==number: ASC-code of char +# +# Contains 256 elements. The index is the any single character with ASC-code \x00-\xFF. +# The value is the number equivalent of character's ASC-code: +# +# _ASC["A"] ==65 - ASC-code of character `A' is 65 +# +# This array is useful if you want to get ASC-code of the character. +#_________________________________________________________________ +# _QASC array +# +# _QASC[char]=="string: octal ASC-code of char in 3-digit octal format" +# +# Contains 256 elements. The index is the any single charcter with ASC-code \x00-\xFF. +# The value is the octal number equivalent of character's ASC-code in fixed-length - 3-digit - string: +# +# _QASC["!"] =="041" - ASC-code of character `!' is 33(decimal) == 41(in octal) +# _QASC["\x0D"] =="015" +# +# This array is useful when some type of string escape conversion is performed. It allows quickly get +# replace string for the characters that can be specified only by character code in result string: +# +# "\x0D" -> "\\015" +#_______________________________________________________________________ + + + + + + + +#################################################################################### +# PUBLIC: +#_____________________________________________________________________________ +# fn _getchrln(ptt,len) +#_____________________________________________________________________________ +# fn _tabtospc(src,tabstep,xcoord) +#################################################################################### + +#_____________________________________________________________________________ +function _retarr(A, i, p, a, q) +{ + ################################################## + if (isarray(A)) { + i = i == "" ? 0 : i + 0 + q = A[_ARRLEN] + 0 + if (i < q) { + return (p A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] _retarr_i0(A, q, i, a)) + } + } +} + +function _retarr_i0(A, q, i, a) +{ + if (i < q) { + return (A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] A[++i] _retarr_i0(A, q, i, a)) + } + while (q < i) { + delete A[++q] + } + return a +} + +#_________________________________________________________________ +function _retarrd(A, v, i) +{ + ######################################### + if (1 in A) { + return (A[1] A[2] A[3] A[4] A[5] A[6] A[7] A[8] A[9] A[10] A[11] A[12] A[13] A[14] A[15] A[16] ((i = 17) in A ? _retarrd_i0(A, i) v : v)) + } + delete A + return v +} + +#_____________________________________________________ +function _retarrd_i0(A, i) +{ + if (i in A) { + return (A[i++] A[i++] A[i++] A[i++] A[i++] A[i++] A[i++] A[i++] A[i++] A[i++] A[i++] A[i++] A[i++] A[i++] A[i++] A[i++] (i in A ? _retarrd_i0(A, i) : "")) + } + delete A +} + +#_______________________________________________________________________ +######################################################################## +#EXPERIMENTAL +function _rexpfn(R, t, p) +{ + _REXPFN[""] = "" + while (t) { + t = _rxpfn(R, t, p) + } + return _REXPFN[""] +} + +function _rexpfnend(t) +{ + _REXPFN[""] = t +} + +#_____________________________________________________________________________ +function _rexpstr(r, i, c, A) +{ + ################################################### + c = split(r, A, "") + r = "" + for (i = 1; i <= c; i++) { + r = r _REXPSTR[A[i]] + } + return r +} + +#_____________________________________________________________________________ +function _rexpstr_i0(t, A, p0) +{ + return (_REXPSTR[t] = "\\" t) +} + +#___________________________________________________________ +function _rmtsharerr(h, t) +{ + gsub(/[\x0D\x0A]+/, "", t) + if (t ~ /^The command failed: 53/) { + ERRNO = "host not found: \\\\" h + } else { + ERRNO = t ": \\\\" h + } +} + +function _rpp(q, D, S) +{ + _conl() + _conline(q) + _conl() + _regpath0(D, q) + #_conl(_dumparr(D)) + _conl(_ln("DEST:") _dumparr(D)) + _conl() + return q +} + +#_________________________________________________________________________________________ +function _rrdreg(DD, p, k, t, v, c, i, q, tT, A, B, C, D) +{ + ############################################# old; regedit + if (! _registrytmpfile) { + _registryinit() + } + _cmd("regedit /E \"" _registrytmpfile "\" \"" p "\" 2>&1") + q = patsplit(gensub(/[\x00\xFF\xFE]+/, "", "G", _rdfile(_registrytmpfile)), A, /\x0D?\x0A\[[^\]]+\]\x0D?\x0A/, B) + for (i = 1; i <= q; i++) { + p = gensub(/(^[ \t\x0D\x0A]*\[)|((\\)\\+)|(\][ \t\x0D\x0A]*$)/, "\\3", "G", A[i]) + DD[p "\\"] + delete C[split(B[i], C, /[\x0D\x0A]+/)] + for (c = 1; c in C; c++) { + tt = tt C[c] + if (gsub(/\\$/, "", tt)) { + continue + } + if (tt == "") { + continue + } + if (match(_th0(tt, tt = ""), /((^"(([^\\"]|\\.)*)")|(@))=(("(([^\\"]|\\.)*)")|(dword:([[:xdigit:]]{8}))|(hex(\(([27b])\))?:(.*)))$/, D)) { + if (D[7]) { + t = "STR" + v = _unstr(D[8]) + } else if (D[10]) { + t = "W32" + v = D[11] + } else { + v = D[15] + if (D[13]) { + switch (D[14]) { + case "2": + t = "XSZ" + break + case "7": + t = "MSZ" + break + default: + t = "W64" + } + } else { + t = "BIN" + } + } + DD[gensub(/(\\)\\+/, "\\1", "G", p "\\" _unstr(D[3] (D[5] ? "(Default)" : "")) "." t)] = v + } else { + _fatal("regedit: unknown output format(" c "): `" C[c] "'") + } + } + } +} + +#_________________________________________________________________ +function _rsqgetptr(g, p, A) +{ + if (p in _tLINK) { + _SQSTACK[g][++_SQSTACK[g][0]] = p + _SQSTACK[g][++_SQSTACK[g][0]] = _SQTOPTR[g] + while ((p = _tLINK[p]) in _tLINK) { + _con(".") + } + _SQTOPTR[g] = p + } + if (p in _tFCHLD) { + return _rsqgetptr(g, _tFCHLD[p]) + } + return p +} + +#___________________________________________________________ +function _rsqnext_i0(g, p) +{ + if (p == _SQTOPTR[g]) { + if (_SQSTACK[g][0] > 0) { + _SQTOPTR[g] = _SQSTACK[g][_SQSTACK[g][0]--] + return _rsqnext_i0(g, _SQSTACK[g][_SQSTACK[g][0]--]) + } + return + } + if (p in _tNEXT) { + return _rsqgetptr(g, _tNEXT[p]) + } + return _rsqnext_i0(g, _tPARENT[p]) +} + +function _rtn(v, A) +{ + _conl() + _conline(_val(v) " : " _val(A)) + _conl() + _rtn2(v, A) + _conl() +} + +function _rtn2(v, A, r, t) +{ + r = isarray(A) ? _typa(v, A) : _typ(v) + if ("`" > _t0 && _t0) { + _conl("ggggg") + } + t = (r ? "TRUE" : "FALSE") " / " (r > 0 ? r ">0" : r "!>0") " / " (r + 0 > 0 ? r "+0>0" : r "+0!>0") " / " (r + 0 != r ? r "+0!=" r : r "+0==" r) " / " (r && "`" > r ? "'`'>" r " && " r : "!('`'>" r " && " r ")") + _conl("`" r "' : " t) + return r +} + +function _rxpfn(R, t, p, i, f, A) +{ + for (i in R) { + if (match(t, i, A)) { + f = R[i] + if (t != (t = @f(A, substr(t, RLENGTH + 1), p))) { + return t + } + } + } + return _rexpfnend(t) +} + +############################################################## + +#_____________________________________________________________________________ +function _sHARE(c, t, P, a, A) +{ + ################################################### + switch (c) { #___________________________________________________________ + case "_lib_CMDLN": + return t + #_____________________________________________________ + case "_lib_APPLY": + return + #_____________________________________________________ + case "_lib_HELP": + return + #_____________________________________________________ + case "_lib_NAMEVER": + return _ln("_share 1.000") + #_____________________________________________________ + case "_lib_BEGIN": + return + #_____________________________________________________ + case "_lib_END": + return + } +} + +################################################################ + +#_____________________________________________________________________________ +function _sYS(c, t, P, a, A) +{ + ##################################################### + switch (c) { #___________________________________________________________ + case "_lib_CMDLN": + return t + #_____________________________________________________ + case "_lib_APPLY": + return + #_____________________________________________________ + case "_lib_HELP": + return + #_____________________________________________________ + case "_lib_NAMEVER": + return + #_____________________________________________________ + case "_lib_BEGIN": + return + #_____________________________________________________ + case "_lib_END": + return + } +} + +#_______________________________________________________________________ +function _serv_check(p) +{ + _tframe("_serv_check_i0", p, p) +} + +#_______________________________________________ +function _serv_check_i0(p, p0, p1, p2, p3, i, q, c) +{ + if (_[p]["TYPE"] == "defsrv") { + i = IGNORECASE + IGNORECASE = 1 + if (match(_servoutput, roi = "\\012DISPLAY_NAME: " _torexp(_[p]["SERVNAME"]))) { + _creport(p, "OK: SERVICE DETECTED: " substr(_[p]["SERVNAME"], 1, 112)) + } else { + _dllerr(p, "service " _[p]["SERVNAME"] " not detected") + } + } + IGNORECASE = i +} + +#_______________________________________________________________________ +function _setarrsort(f, a) +{ + ############################################## + a = PROCINFO["sorted_in"] + if (! f) { + delete PROCINFO["sorted_in"] + } else { + PROCINFO["sorted_in"] = f + } + return a +} + +#_______________________________________________________________________ +function _setmpath(p, a) +{ + ################################################ + ERRNO = "" + if ((p) && (a = _filerd(p))) { + if (_FILEIO_TMPRD) { + _FILEIO_TMPATHS[_FILEIO_TMPRD] + #if ( _filexist(a) ) _del(a) + #_cmd("rd " a " /S /Q 2>NUL"); _cmd("del " a " /Q 2>NUL") + } + return (_FILEIO_TMPRD = a) + } else { + return _warning("`" p "': cannot set temporary folder" (ERRNO ? (": " ERRNO) : "")) + } +} + +#_________________________________________________________________________________________ +########################################################################################## +function _sharelist(D, h, q, c, l, A, B) +{ + ################################################# + delete D + c = _sharextool " \\\\" (h == "" ? h = ENVIRON["COMPUTERNAME"] : h) " 2>&1" + if (match(c = _cmd(c), /\x0AShare[^\x0A]*Remark/)) { + gsub(/(^[^-]*\x0D?\x0A-+\x0D?\x0A[ \t]*)|(\x0D?\x0AThe command completed successfully.*$)/, "", c) + l = RLENGTH - 7 + split(c, A, /([ \t]*\x0D?\x0A)+[ \t]*/) + for (c in A) { + if (match(A[c], /((([^ \t:]+[ \t]+)*[^ \t:]+)[ \t]+)([A-Za-z])[ \t]*:/, B) && ++q) { + D[B[2]] = A[c] ~ /\.\.\.$/ ? _sharepath(h, B[2]) : gensub(/[ \t\\\/]*$/, "\\\\", 1, substr(A[c], 1 + B[1, "length"], l - B[1, "length"])) + } + } + return q + } + return _rmtsharerr(h, c) +} + +#_____________________________________________________________________________ +function _sharepath(h, s, A) +{ + ################################################### + s = _sharextool " \\\\" (h == "" ? h = ENVIRON["COMPUTERNAME"] : h) "\\\"" s "\" 2>&1" + if (match(s = _cmd(s), /\x0APath[ \t]+([^\x0D\x0A]+)/, _SHAREPATHA0)) { + return gensub(/[ \t\\\/]*$/, "\\\\", 1, _SHAREPATHA0[1]) + } + return _rmtsharerr(h, s) +} + +function _shortcut(D, S) +{ + ############################################################# + if (isarray(D)) { + if (isarray(S)) { + _addarrmask(D, S, _SHORTCUTWSTRUC) + } else if (S == 0 && S == "") { + _addarrmask(D, _SHORTCUTDEFAULT, _SHORTCUTWSTRUC) # array,array2* - copy from array2 to array shorcut-specific elements + } else if (_isnotfileptr(S)) { + _addarrmask(D, _[S], _SHORTCUTWSTRUC) # array* - define shortcut-specific elements in array by default values + } else if (_rd_shortcut(D, S)) { + return + } # array,ptr* - copy from array _[ptr] to array shorcut-specific elements + } else if (D == 0 && D == "") { + return _NOP # -* - no action(return -) + } else if (_isnotfileptr(D)) { + if (isarray(S)) { + _addarrmask(_[D], S, _SHORTCUTWSTRUC) # array,filepath* - define in array shortcut-specific elements by reading its from shortcut file filepath(load shortcut) + } else if (S == 0 && S == "") { + _addarrmask(_[D], _SHORTCUTDEFAULT, _SHORTCUTWSTRUC) # ptr,array* - copy from array to array _[ptr] shorcut-specific elements + } else if (_isnotfileptr(S)) { + _addarrmask(_[D], _[S], _SHORTCUTWSTRUC) # ptr* - define shortcut-specifc elements in array _[ptr] by default values + } else if (_rd_shortcut(_[D], S)) { + return + } # ptr,ptr2* - copy from array _[ptr2] to array _[ptr] shorcut-specific elements + } else { + if (isarray(S) && _wr_shortcut(D, S)) { + return # filepath,array* - [over]write shorcut file filepath; shortcut parameters will be defined by shortcut-specific elements in array(save shortcut) + } else if (S == 0 && S == "" && _wr_shortcut(D, _SHORTCUTDEFAULT)) { + return # filepath* - [over]write shorcut file filepath; shortcut parameters will be defined by default values + } else if (_isnotfileptr(S) && _wr_shortcut(D, _[S])) { + return # filepath,ptr* - [over]write shorcut file filepath; shortcut parameters will be defined by shortcut-specific elements in array _[ptr](save shortcut) + } else if (_rd_shortcut(_SHRTCUTA1, S) || _wr_shortcut(D, _SHRTCUTA1)) { + return + } # ptr,filepath* - define in array _[ptr] shortcut-specific elements by reading its from shortcut file filepath(load shortcut) + } # filepath,filepath2* - [over]write shorcut file filepath; shortcut parameters will be defined from shortcut file filepath2(copy shortcut) + return 1 +} + +#________________________________________________ +function _shortcut_init(A, B, q) +{ + _SHORTCUTERR[2] = "file not found" + _SHORTCUTERR[3] = "no such filepath" + _SHORTCUTERR["The system cannot find the file specified."] = "no such filepath" + _SHORTCUTERR[5] = "file is folder" + _SHORTCUTERR["Access is denied."] = "file is folder" + _SHORTCUTERR[123] = "filepath syntax error" + _SHORTCUTERR["The filename, directory name, or volume label syntax is incorrect."] = "filepath syntax error" + q = "target\t\t\t/T:\t\t\t\tTargetPath=\t\t\t\t\ttarget?\t\t\t;\t\t\t_target\t\t\t\t\t\t\tTargetPathExpanded=\t\t\t\t\t\t\t;\t\t\tparameters\t\t\t/P:\t\t\t\tArguments=\t\t\t\t\tparaneters?\t\t\t;\t\t\t_parameters\t\t\t\t\t\t\tArgumentsExpanded=\t\t\t\t\t\t\t;\t\t\tstartdir\t\t\t/W:\t\t\t\tWorkingDirectory=\t\t\t\tstartdir?\t\t\t;\t\t\t_startdir\t\t\t\t\t\t\tWorkingDirectoryExpanded=\t\t\t\t\t\t;\t\t\trunstyle\t\t\t/R:\t\t\t\tRunStyle=\t\t\t\t\t1\t\t\t\t;\t\t\ticon,index\t\t\t/I:\t\t\t\tIconLocation=\t\t\t\ticon,index?\t\t\t;\t\t\txicon,index\t\t\t\t\t\t\tIconLocationExpanded=\t\t\t\t\t\t\t;\t\t\tshortcut key\t\t/H:\t\t\t\tHotKey=\t\t\t\t\t0\t\t\t\t;\t\t\tdescription\t\t\t/D:\t\t\t\tDescription=\t\t\t\t_env4: default shortcut\t" + split(q, _SHRTCUTA0, /[ \t]*;[ \t]*/) + for (q in _SHRTCUTA0) { + if (match(_SHRTCUTA0[q], /^([^\t]+)\t+([^\t]+)(\t+([^\t]+)(\t+([^\t]+))?)?/, B)) { + if (B[3] == "") { + _SHORTCUTRSTRUC[B[2]] = B[1] + } else if (B[5] == "") { + _SHORTCUTWSTRUC[_SHORTCUTRSTRUC[B[4]] = B[1]] = B[2] + delete _SHORTCUTDEFAULT[B[1]] + } else { + _SHORTCUTWSTRUC[_SHORTCUTRSTRUC[B[4]] = B[1]] = B[2] + _SHORTCUTDEFAULT[B[1]] = B[6] + } + } else { + _fatal("_shortcut.init: _shortcut_struc: syntax error: `" _SHRTCUTA0[q] "'") + } + } + _SHRTCUTA1[""] + delete _SHRTCUTA1[""] + _shortcut_fpath = "\\\\localhost\\eGAWK\\LIB\\_shortcut\\_shortcut.exe" +} + +#_____________________________________________________ +function _shortcut_nerr(t, s, A) +{ + if (match(t, /\x0ASystem error (-?[0-9]+)[^\x0D\x0A]*[\x0D\x0A]+([^\x0D\x0A]+)/, A)) { + ERRNO = (A[1] in _SHORTCUTERR ? _SHORTCUTERR[A[1]] : A[2] in _SHORTCUTERR ? _SHORTCUTERR[A[2]] : tolower(gensub(/^(The )?(((.*)\.$)|(.*[^\.]$))/, "\\4\\5", "G", A[2])) "(" A[1] ")") (s ? ": `" s "'" : "") + } else { + return 1 + } +} + +function _split_regpath() +{ + _rpp(" / / / / ") + _rpp(" / / / / huj ") + _rpp(" / / / / huj / ") + _rpp(" / / / / huj / pizda.TSR ") + _rpp(" / / / / hklm ") + _rpp(" / / / / hklm / ") + _rpp(" / / / / hklm / huj ") + _rpp(" / / / / hklm / huj / ") + _rpp(" / / / / hklm / huj / \tpizda.TSR ") + _conl() + _conl("########################################################################################") + _conl() + _rpp(" / / / / hklm / software / altiris / fi le . ex t ") + _rpp(" / / . / / hkcr / software / altiris / fi le . ex t ") + _rpp(" / / ? / / hKcU / software / altiris / fi le . ex t ") + _rpp(" / / lOcAlHoSt / / hKu / software / altiris / fi le . ex t ") + _rpp(" / / ho st / / hKcc / software / altiris / fi le . ex t ") + _rpp(" / / ho st / / hKPd / software / altiris / fi le . ex t ") + _conl() + _conl("########################################################################################") + _conl() +} + +function _splitpath_test() +{ + _conl() + _conl("########################################################################################") + _conl() + _fpp(" ") + _fpp(" fi le . ex t ") + _fpp(" di r0 / / ") + _fpp(" di r0 / / fi le . ex t ") + _fpp(" / ") + _fpp(" / fi le . ex t ") + _fpp(" / di r0 / / ") + _fpp(" / di r0 / / fi le . ex t ") + _conl() + _conl("########################################################################################") + _conl() + _fpp(" c : ") + _fpp(" c : fi le . ex t ") + _fpp(" c : di r0 / / ") + _fpp(" c : di r0 / / fi le . ex t ") + _fpp(" c : / / ") + _fpp(" c : / / fi le . ex t ") + _fpp(" c : / / di r0 / / ") + _fpp(" c : / / di r0 / / fi le . ex t ") + _conl() + _conl("########################################################################################") + _conl() + _fpp(" / / ") + _fpp(" / / ho st . hs t ") + _fpp(" / / ho st / / ") + _fpp(" / / ho st / / fi le . ex t ") + _fpp(" / / ho st / / di r0 / / ") + _fpp(" / / ho st / / di r0 / / fi le . ex t ") + _conl() + _conl("########################################################################################") + _conl() + _fpp(" / / ho st / / c : ") + _fpp(" / / ho st / / c : fi le . ex t ") + _fpp(" / / ho st / / c : di r0 / / ") + _fpp(" / / ho st / / c : di r0 / / fi le . ex t ") + _fpp(" / / ho st / / c : / / ") + _fpp(" / / ho st / / c : / / fi le . ex t ") + _fpp(" / / ho st / / c : / / di r0 / / ") + _fpp(" / / ho st / / c : / / di r0 / / fi le . ex t ") + _conl() + _conl("########################################################################################") + _conl() + _fpp(" http : / / / ") + _fpp(" http : / / / si te . ex t ") + _fpp(" http : / / / si te / / ") + _fpp(" http : / / / si te / / fi le . ex t ") + _fpp(" http : / / / si te / / di r0 / / ") + _fpp(" http : / / / si te / / di r0 / / fi le . ex t ") + _conl() + _conl("########################################################################################") + _conl() + _fpp(" ftp : / / / : po rt ") + _fpp(" ftp : / / / si te . ex t : po rt ") + _fpp(" ftp : / / / si te : po rt / / ") + _fpp(" ftp : / / / si te : po rt / / fi le . ex t ") + _fpp(" ftp : / / / si te : po rt / / di r0 / / ") + _fpp(" ftp : / / / si te : po rt / / di r0 / / fi le . ex t ") + _conl() + _conl("## //. ######################################################################################") + _conl() + _fpp(" / / . ") + _fpp(" / / . / / ") + _fpp(" / / . / / com 56 ") + _fpp(" / / . / / com 56 / / ") + _fpp(" / / . / / c : ") + _fpp(" / / . / / c : / / ") + _fpp(" / / . / / c : com 56 ") + _fpp(" / / . / / c : com 56 / / ") + _fpp(" / / . / / c : / / com 56 ") + _fpp(" / / . / / c : / / com 56 / / ") + _conl() + _conl("## //? ######################################################################################") + _conl() + _fpp(" / / ? ") + _fpp(" / / ? / / ") + _fpp(" / / ? / / com 56 ") + _fpp(" / / ? / / com 56 / / ") + _fpp(" / / ? / / c : ") + _fpp(" / / ? / / c : / / ") + _fpp(" / / ? / / c : com 56 ") + _fpp(" / / ? / / c : com 56 / / ") + _fpp(" / / ? / / c : / / com 56 ") + _fpp(" / / ? / / c : / / com 56 / / ") + _conl() + _conl("########################################################################################") + _conl() + _fpp(" / / / ") + _fpp(" / / / . hs t ") + _fpp(" / / / / fi le . ex t ") + _fpp(" / / / / di r0 / / ") + _fpp(" / / / / di r0 / / di r1 / fi le . ex t ") + _fpp(" / / / / c : ") + _fpp(" / / / / c : fi le . ex t ") + _fpp(" / / / / c : di r0 / / ") + _fpp(" / / / / c : di r0 / / fi le . ex t ") + _fpp(" / / / / c : / / ") + _fpp(" / / / / c : / / fi le . ex t ") + _fpp(" / / / / c : / / di r0 / / ") + _fpp(" / / / / c : / / di r0 / / fi le . ex t ") + _conl() + _conl("########################################################################################") + _conl() + return +} + +#_______________________________________________________________________ +function _splitstr(A, t, r) +{ + ########################################### 1 # + if (_istr(t)) { + if (_splitstr_i0(A, t) > 0) { + return _splitstrp0 + } + if (_istr(r)) { + return _splitstr_i0(A, r) + } + } else { + if (it == "A") { + if (length(t) > 0) { + _movarr(A, t) + return (0 - length(A)) + } + } + _istr(r) + } + if (it == "A") { + if (length(r) > 0) { + _movarr(A, r) + return (0 - length(A)) + } + } +} + +#_____________________________________________________ +function _splitstr_i0(A, t, C) +{ + if (2 > (_splitstrq0 = patsplit(t, _SPLITSTRA0, /([^,\xB4]*\xB4.)*[^,\xB4]*/))) { + _splitstrq0 = split(gensub(/\xB4(.)/, "\\1", "G", t), _SPLITSTRA0, "") + } + delete A + _splitstri0 = _splitstrp0 = 0 + while (_splitstri0++ < _splitstrq0) { + if ((t = gensub(/\xB4(.)/, "\\1", "G", _SPLITSTRA0[_splitstri0])) in C || t == "") { + continue + } + C[A[++_splitstrp0] = t] + } + return _splitstrp0 +} + +#_______________________________________________ +function _strtorexp(t) +{ + gsub(/[\\\.\?\*\+\-\(\)\{\}\[\]\^\$\/\|]/, "\\\\&", t) + t = split(t, _TOREXP_STRA, /[\x00-\x1F]/, _TOREXP_STRB) + _torexp_strt0 = "" + for (_torexp_stri0 = 1; _torexp_stri0 < t; _torexp_stri0++) { + _torexp_strt0 = _torexp_strt0 _TOREXP_STRA[_torexp_stri0] "\\" _QASC[_TOREXP_STRB[_torexp_stri0]] + } + return (_torexp_strt0 _TOREXP_STRA[_torexp_stri0]) +} + +function _subseqoff(r, B) +{ + patsplit(r, B, /\x84[^\x94]*\x94/) + return gensub(/\x84[^\x94]*\x94/, "\204", "G", r) +} + +function _subseqon(B, r, F, f, s, e, q, i, A) +{ + q = split(r, A, /\x84/) + r = "" + f = F[""] + for (i = 1; i < q; i++) { + s = substr(e = B[i], 2, 1) + #_conl("curr r==`" r "': A[" i "]=`" A[i] "'") + #s=s in F ? _th0(F[s],_conl("handler `" F[s] "' for `" s "' ost=`" substr(e,3,length(e)-3) "'")) : _th0(F[""],_conl("default handler for `" s "'")) + s = s in F ? F[s] : F[""] + #_conl("`" f "'") + r = r (@f(A[i])) (@s(substr(e, 3, length(e) - 3))) + } + return (r (@f(A[i]))) +} + +#_____________________________________________________________________________ +# _rdreg(ARRAY,reg_path) +# Import into ARRAY the content of the whole registree tree with the higher point specified by reg_path. +# ARRAY will be filled by the strings with following format: +# +# HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\GnuWin32\CoreUtils\5.3.0\pck\InstallPath.STR=C:\Program Files (x86)\GnuWin32 +# where: +# HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\GnuWin32\CoreUtils\5.3.0\pck <- REG KEY PATH +# InstallPath <- DATA FIELD +# STR <- TYPE +# C:\Program Files (x86)\GnuWin32 <- VALUE +# TYPE: +# STR - REG_SZ (String Value) +# W32 - REG_DWORD (DWORD (32-bit) Value) +# W64 - REG_QWORD (QWORD (64-bit) Value) +# BIN - REG_BINARY (Binary Value) +# XSZ - REG_EXPAND_SZ (Expandable String Value) +# MSZ - REG_MULTI_SZ (Multi-String Value) +#_________________________________________________________________________________________ + + + + +# HKCR HKEY_CLASSES_ROOT +# HKCU HKEY_CURRENT_USER +# HKLM HKEY_LOCAL_MACHINE +# HKU HKEY_USERS +# HKCC HKEY_CURRENT_CONFIG +# HKPD HKEY_PERFORMANCE_DATA + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#___________________________________________________________________________________ +#################################################################################### +function _sysinfo(D, h) +{ + ############################################################## + h = "wmic /NODE: \"" h "\" OS 2>NUL" + if (split(_cmd(h), _SYSINFOA0, /[\x0D\x0A]+/) == 3) { + _sysinfol0 = length(h = _SYSINFOA0[2]) + 1 + _sysinfoq0 = _sysinfoq1 = split(_SYSINFOA0[1], _SYSINFOA0, / +/, _SYSINFOB0) + while (--_sysinfoq0 > 0) { + D[_sysinfof0] = gensub(/^ +| +$/, "", "G", substr(h, _sysinfol0 = _sysinfol0 - (_sysinfol1 = length(_sysinfof0 = _SYSINFOA0[_sysinfoq0]) + length(_SYSINFOB0[_sysinfoq0])), _sysinfol1)) + } + return (_sysinfoq1 - 1) + } +} + +######################################################### +function _tOBJ(c, t, P) +{ + switch (c) { #___________________________________________________________ + case "_lib_CMDLN": + return t + #___________________________________________________________ + case "_lib_APPLY": + return + #___________________________________________________________ + case "_lib_HELP": + return + #___________________________________________________________ + case "_lib_NAMEVER": + return _ln("_tOBJ 3.0") + #___________________________________________________________ + case "_lib_BEGIN": + return + #___________________________________________________________ + case "_lib_END": + return + #___________________________________________________________ + case "_lib_CLEANUP": + return _tOBJ_CLEANUP() + } +} + +#_______________________________________________________________________ +function _tOBJ_CLEANUP(p) +{ + ############################################## + for (p in UIDSDEL) { + delete _ptr[p] + delete _tPREV[p] + delete _tPARENT[p] + delete _tNEXT[p] + delete _tFCHLD[p] + delete _tQCHLD[p] + delete _tLCHLD[p] + delete _TMP0[p] + delete _TMP1[p] + delete _tLINK[p] + delete _tCLASS[p] + } +} + +#_______________________________________________________________________ +function _tabtospc(t, ts, xc, a, c, n, A, B) +{ + ################################## + if (! ts) { + ts = _TAB_STEP_DEFAULT + } + c = split("." t, A, /\t+/, B) + A[1] = substr(A[1], 2) + t = "" + for (n = 1; n <= c; n++) { + t = t A[n] _getchrln(" ", (xc = length(B[n]) * ts + int((a = xc + length(A[n])) / ts) * ts) - a) + } + return t +} + +#___________________________________________________________________________________ +#################################################################################### +function _tapi(p, f, p0, p1, p2, p3, c) +{ + c = p + do { + if (f in _[c]["API"]) { + f = _[c]["API"][f] + return @f(p, p0, p1, p2, p3) + } + c = _[c]["CLASS"] + } while ("CLASS" in _[c]) +} + +#_____________________________________________________________________________ +function _tbframe(f, p, p0, p1) +{ + ################################################## + delete _t_ENDF[++_t_ENDF[0]] + f = p ? _tbframe_i0(f, p, p0, p1) : "" + --_t_ENDF[0] + return f +} + +#___________________________________________________________ +function _tbframe_i0(f, p, p0, p1, a) +{ + while (p in _tLINK) { + p = _tLINK[p] + } + return (p in _tLCHLD ? _tmbframe(f, _tLCHLD[p], p0, p1) : @f(p, p0, p1)) +} + +#_______________________________________________________________________ +function _tbframex(f, p, p0, p1) +{ + ########################################### + delete _t_ENDF[++_t_ENDF[0]] + f = p ? _tbframex_i0(f, p, p0, p1) : "" + --_t_ENDF[0] + return f +} + +#___________________________________________________________ +function _tbframex_i0(f, p, p0, p1) +{ + while (p in _tLINK) { + p = _tLINK[p] + } + return (p in _tLCHLD ? _tmbframex(f, _tLCHLD[p], p0, p1) : @f(p, p0, p1)) +} + +#_____________________________________________________________________________ +function _tbpass(f, p, p0, p1) +{ + ################################################### + delete _t_ENDF[++_t_ENDF[0]] + f = p ? _tbpass_i0(f, p, p0, p1) : "" + --_t_ENDF[0] + return f +} + +#___________________________________________________________ +function _tbpass_i0(f, p, p0, p1, a) +{ + while (p in _tLINK) { + p = _tLINK[p] + } + return (p in _tLCHLD ? _tmbpass(f, _tLCHLD[p], p0, p1) : @f(p, p0, p1)) +} + +#_____________________________________________________________________________ +function _tbpassx(f, p, p0, p1) +{ + ################################################## + delete _t_ENDF[++_t_ENDF[0]] + f = p ? _tbpassx_i0(f, p, p0, p1) : "" + --_t_ENDF[0] + return f +} + +#___________________________________________________________ +function _tbpassx_i0(f, p, p0, p1) +{ + while (p in _tLINK) { + p = _tLINK[p] + } + return (p in _tLCHLD ? _tmbpassx(f, _tLCHLD[p], p0, p1) : @f(p, p0, p1)) +} + +#_____________________________________________________________________________ +function _tbrochld(p, f, pp) +{ + ################################################### # TEST!!! + if (p) { + if (p in _tFCHLD) { + f = _tFCHLD[p] + delete _tFCHLD[p] + delete _tLCHLD[p] + if (p in _tPARENT) { + pp = _tPARENT[p] + delete _tPARENT[p] + if (p in _tPREV) { + _tNEXT[_tPREV[f] = _tPREV[p]] = f + delete _tPREV[p] + } else { + _tFCHLD[pp] = f + } + for (; f in _tNEXT; f = _tNEXT[f]) { + _tPARENT[f] = pp + } + _tPARENT[f] = pp + if (p in _tNEXT) { + _tPREV[_tNEXT[f] = _tNEXT[p]] = f + delete _tNEXT[p] + } else { + _tLCHLD[pp] = f + } + _tQCHLD[pp] = _tQCHLD[pp] + _tQCHLD[p] - 1 + delete _tQCHLD[p] + return f + } else { + delete _tQCHLD[p] + if (p in _tPREV) { + _tNEXT[_tPREV[f] = _tPREV[p]] = f + delete _tPREV[p] + } + for (; f in _tNEXT; f = _tNEXT[f]) { + delete _tPARENT[f] + } + delete _tPARENT[f] + if (p in _tNEXT) { + _tPREV[_tNEXT[f] = _tNEXT[p]] = f + delete _tNEXT[p] + } + return f + } + } else if (p in _tPARENT) { + pp = _tPARENT[p] + delete _tPARENT[p] + if (p in _tPREV) { + if (p in _tNEXT) { + _tNEXT[_tPREV[f] = _tPREV[p]] = f = _tNEXT[p] + delete _tNEXT[p] + } else { + delete _tNEXT[_tLCHLD[pp] = _tPREV[p]] + } + delete _tPREV[p] + _tQCHLD[pp]-- + } else if (p in _tNEXT) { + delete _tPREV[_tFCHLD[pp] = _tNEXT[p]] + delete _tNEXT[p] + _tQCHLD[pp]-- + } else { + delete _tFCHLD[pp] + delete _tLCHLD[pp] + delete _tQCHLD[pp] + } + } else if (p in _tPREV) { + if (p in _tNEXT) { + _tNEXT[_tPREV[f] = _tPREV[p]] = f = _tNEXT[p] + delete _tNEXT[p] + } else { + delete _tNEXT[_tPREV[p]] + } + delete _tPREV[p] + } else if (p in _tNEXT) { + delete _tPREV[_tNEXT[p]] + delete _tNEXT[p] + } + } + return p +} + +#_________________________________________________________________ +function _tbrunframe(f, p, p0, p1) +{ + ################################### + return _tbframe(f ? f : "_trunframe_i0", p, p0, p1) +} + +#_________________________________________________________________ +function _tbrunframex(f, p, p0, p1) +{ + ################################## + return _tbframex(f ? f : "_trunframe_i0", p, p0, p1) +} + +#_________________________________________________________________ +function _tbrunpass(f, p, p0, p1) +{ + #################################### + return _tbpass(f ? f : "_trunframe_i0", p, p0, p1) +} + +#_________________________________________________________________ +function _tbrunpassx(f, p, p0, p1) +{ + ################################### + return _tbpassx(f ? f : "_trunframe_i0", p, p0, p1) +} + +#_____________________________________________________________________________ +function _tdel(p, i) +{ + ########################################################## + if (p in _) { + _texclude(p) + for (i in _ptr[p]) { + if (isarray(_ptr[p][i])) { + _tdel_i1(_ptr[p][i]) + } else if ((i = _ptr[p][i])) { + _tdel(i) + } + } + if (p in _tFCHLD) { + i = _tFCHLD[p] + do { + i = (i in _tNEXT ? _tNEXT[i] : "") _tdel_i0(i) + } while (i) + } + delete _[p] + _UIDSDEL[p] + } +} + +#_____________________________________________________ +function _tdel_i0(p, i) +{ + for (i in _ptr[p]) { + if (isarray(_ptr[p][i])) { + _tdel_i1(_ptr[p][i]) + } else if ((i = _ptr[p][i])) { + _tdel(i) + } + } + if (p in _tFCHLD) { + i = _tFCHLD[p] + do { + i = (i in _tNEXT ? _tNEXT[i] : "") _tdel_i0(i) + } while (i) + } + delete _[p] + _UIDSDEL[p] +} + +#_____________________________________________________ +function _tdel_i1(A, i) +{ + for (i in A) { + if (isarray(A[i])) { + _tdel_i1(A[i]) + } else if ((i = A[i])) { + _tdel(i) + } + } +} + +#_____________________________________________________________________________ +function _tdelete(p, v) +{ + ####################################################### # REMAKE EXCLUDE + if (p) { + _wLCHLD(_tDELPTR, p) + } + return v +} + +#_________________________________________________________________ +function _tdelitem(p) +{ + ############################################# + if (p) { + if ("HOST" in _PTR[p] && "ITEMNAME" in _[p]) { + return _wLCHLD(_PTR[_PTR[p]["HOST"]]["ITEM"][_[p]["ITEMNAME"]], p) + } + _tdelete(p) + return p + } +} + +#_______________________________________________________________________ +function _tend(a, b) +{ + ##################################################### + if (b == "") { + return (_t_ENDF[_t_ENDF[0]] = a) + } else { + return (_t_ENDF[_t_ENDF[0] + a] = b) + } +} + +#_____________________________________________________________________________ +function _texclude(p, v, pp) +{ + ################################################### # TEST!!! + if (p in _) { + if (p in _tPARENT) { + pp = _tPARENT[p] + delete _tPARENT[p] + if (p in _tPREV) { + if (p in _tNEXT) { + _tPREV[_tNEXT[v] = _tNEXT[p]] = v = _tPREV[p] + delete _tNEXT[p] + } else { + delete _tNEXT[_tLCHLD[pp] = _tPREV[p]] + } + delete _tPREV[p] + } else if (p in _tNEXT) { + delete _tPREV[_tFCHLD[pp] = _tNEXT[p]] + delete _tNEXT[p] + } else { + delete _tFCHLD[pp] + delete _tLCHLD[pp] + delete _tQCHLD[pp] + return p + } + --_tQCHLD[pp] + } else if (p in _tPREV) { + if (p in _tNEXT) { + _tPREV[_tNEXT[v] = _tNEXT[p]] = v = _tPREV[p] + delete _tNEXT[p] + } else { + delete _tNEXT[_tPREV[p]] + } + delete _tPREV[p] + } else if (p in _tNEXT) { + delete _tPREV[_tNEXT[p]] + delete _tNEXT[p] + } + return p + } +} + +# _tDLINK progressive development: concrete _tDLINK function\processing algo; all frame's families support +#_____________________________________________________________________________ +function _tframe(fF, p, p0, p1, p2) +{ + ############################################### + delete _t_ENDF[++_t_ENDF[0]] + p = _isptr(p) ? isarray(fF) ? _tframe_i1(fF, p, p0, p1, p2) : _tframe_i0(fF, p, p0, p1, p2) : "" + --_t_ENDF[0] + return p +} + +#_____________________________________________________________________________ +function _tframe0(f, p, p0, p1, p2, p3, A) +{ + ######################################### + if (_isptr(p)) { + if (isarray(f)) { + return _tframe0_i0(f, p) + } + _tframex_p0(A, f, 0) + return _th0(_tframe0_i0(A, p), --_TEND[_ARRLEN]) + } +} + +#_______________________________________________ +function _tframe0_i0(A, p, f) +{ + if (p in _tLINK) { + _tframe_link = p + if ("`" in A) { + f = A["`"] + while (p in _tLINK) { + @f(p = _tLINK[p]) + } + } else { + while (p in _tLINK) { + p = _tLINK[p] + } + } + } else { + _tframe_link = "" + } + if (p in _tFCHLD) { + return (_tframe0_i2(A, "^", p) _tframe0_i1(A, _tFCHLD[p])) + } + return _tframe0_i2(A, ".", p) +} + +#_______________________________________________ +function _tframe0_i1(A, p) +{ + if (_TEND[_ARRLEN] in _TEND) { + return + } + if (p in _tNEXT) { + return (_tframe0_i0(A, p) _tframe0_i1(A, _tNEXT[p])) + } + return _tframe0_i0(A, p) +} + +#_______________________________________________ +function _tframe0_i2(A, m, p) +{ + _tframe_dlink = p + while (p in _tDLINK) { + p = _tDLINK[p] + } + if (m in A) { + if ((m "~") in A) { + if (! (_TYPEWORD in _[p]) || A[m "~"] !~ _[p][_TYPEWORD]) { + return + } + } + m = A[m] + return @m(p) + } +} + +#_________________________________________________________________ +function _tframe1(f, p, p0, p1, p2, p3, A) +{ + ############################# + if (_isptr(p)) { + if (isarray(f)) { + return _tframe1_i0(f, p, p0) + } + _tframex_p0(A, f, 1) + return _th0(_tframe1_i0(A, p, p0), --_TEND[_ARRLEN]) + } +} + +#_______________________________________________ +function _tframe1_i0(A, p, p0) +{ + _tframe_link = p + while (p in _tLINK) { + p = _tLINK[p] + } + if (p in _tFCHLD) { + return (_tframe1_i2(A, "^", p, p0) _tframe1_i1(A, _tFCHLD[p], p0)) + } + return _tframe1_i2(A, ".", p, p0) +} + +#_______________________________________________ +function _tframe1_i1(A, p, p0) +{ + if (_TEND[_ARRLEN] in _TEND) { + return + } + if (p in _tNEXT) { + return (_tframe1_i0(A, p, p0) _tframe1_i1(A, _tNEXT[p], p0)) + } + return _tframe1_i0(A, p, p0) +} + +#_______________________________________________ +function _tframe1_i2(A, m, p, p0) +{ + _tframe_dlink = p + while (p in _tDLINK) { + p = _tDLINK[p] + } + if (m in A) { + if ((m "~") in A) { + if (! (_TYPEWORD in _[p]) || A[m "~"] !~ _[p][_TYPEWORD]) { + return + } + } + m = A[m] + return @m(p, p0) + } +} + +#_________________________________________________________________ +function _tframe2(f, p, p0, p1, p2, p3, A) +{ + ############################# + if (_isptr(p)) { + if (isarray(f)) { + return _tframe2_i0(f, p, p0, p1) + } + _tframex_p0(A, f, 2) + return _th0(_tframe2_i0(A, p, p0, p1), --_TEND[_ARRLEN]) + } +} + +#_______________________________________________ +function _tframe2_i0(A, p, p0, p1) +{ + _tframe_link = p + while (p in _tLINK) { + p = _tLINK[p] + } + if (p in _tFCHLD) { + return (_tframe2_i2(A, "^", p, p0, p1) _tframe2_i1(A, _tFCHLD[p], p0, p1)) + } + return _tframe2_i2(A, ".", p, p0, p1) +} + +#_______________________________________________ +function _tframe2_i1(A, p, p0, p1) +{ + if (_TEND[_ARRLEN] in _TEND) { + return + } + if (p in _tNEXT) { + return (_tframe2_i0(A, p, p0, p1) _tframe2_i1(A, _tNEXT[p], p0, p1)) + } + return _tframe2_i0(A, p, p0, p1) +} + +#_______________________________________________ +function _tframe2_i2(A, m, p, p0, p1) +{ + _tframe_dlink = p + while (p in _tDLINK) { + p = _tDLINK[p] + } + if (m in A) { + if ((m "~") in A) { + if (! (_TYPEWORD in _[p]) || A[m "~"] !~ _[p][_TYPEWORD]) { + return + } + } + m = A[m] + return @m(p, p0, p1) + } +} + +#_________________________________________________________________ +function _tframe3(f, p, p0, p1, p2, p3, A) +{ + ############################# + if (_isptr(p)) { + if (isarray(f)) { + return _tframe3_i0(f, p, p0, p1, p2) + } + _tframex_p0(A, f, 3) + return _th0(_tframe3_i0(A, p, p0, p1, p2), --_TEND[_ARRLEN]) + } +} + +#_______________________________________________ +function _tframe3_i0(A, p, p0, p1, p2) +{ + _tframe_link = p + while (p in _tLINK) { + p = _tLINK[p] + } + if (p in _tFCHLD) { + return (_tframe3_i2(A, "^", p, p0, p1, p2) _tframe3_i1(A, _tFCHLD[p], p0, p1, p2)) + } + return _tframe3_i2(A, ".", p, p0, p1, p2) +} + +#_______________________________________________ +function _tframe3_i1(A, p, p0, p1, p2) +{ + if (_TEND[_ARRLEN] in _TEND) { + return + } + if (p in _tNEXT) { + return (_tframe3_i0(A, p, p0, p1, p2) _tframe3_i1(A, _tNEXT[p], p0, p1, p2)) + } + return _tframe3_i0(A, p, p0, p1, p2) +} + +#_______________________________________________ +function _tframe3_i2(A, m, p, p0, p1, p2) +{ + _tframe_dlink = p + while (p in _tDLINK) { + p = _tDLINK[p] + } + if (m in A) { + if ((m "~") in A) { + if (! (_TYPEWORD in _[p]) || A[m "~"] !~ _[p][_TYPEWORD]) { + return + } + } + m = A[m] + return @m(p, p0, p1, p2) + } +} + +#_________________________________________________________________ +function _tframe4(f, p, p0, p1, p2, p3, A) +{ + ############################# + if (_isptr(p)) { + if (isarray(f)) { + return _tframe4_i0(f, p, p0, p1, p2, p3) + } + _tframex_p0(A, f, 4) + return _th0(_tframe4_i0(A, p, p0, p1, p2, p3), --_TEND[_ARRLEN]) + } +} + +#_______________________________________________ +function _tframe4_i0(A, p, p0, p1, p2, p3) +{ + _tframe_link = p + while (p in _tLINK) { + p = _tLINK[p] + } + if (p in _tFCHLD) { + return (_tframe4_i2(A, "^", p, p0, p1, p2, p3) _tframe4_i1(A, _tFCHLD[p], p0, p1, p2, p3)) + } + return _tframe4_i2(A, ".", p, p0, p1, p2, p3) +} + +#_______________________________________________ +function _tframe4_i1(A, p, p0, p1, p2, p3) +{ + if (_TEND[_ARRLEN] in _TEND) { + return + } + if (p in _tNEXT) { + return (_tframe4_i0(A, p, p0, p1, p2, p3) _tframe4_i1(A, _tNEXT[p], p0, p1, p2, p3)) + } + return _tframe4_i0(A, p, p0, p1, p2, p3) +} + +#_______________________________________________ +function _tframe4_i2(A, m, p, p0, p1, p2, p3) +{ + _tframe_dlink = p + while (p in _tDLINK) { + p = _tDLINK[p] + } + if (m in A) { + if ((m "~") in A) { + if (! (_TYPEWORD in _[p]) || A[m "~"] !~ _[p][_TYPEWORD]) { + return + } + } + m = A[m] + return @m(p, p0, p1, p2, p3) + } +} + +#___________________________________________________________ +function _tframe_i0(f, p, p0, p1, p2, a) +{ + while (p in _tLINK) { + p = _tLINK[p] + } + return (p in _tFCHLD ? _tmframe_i0(f, _tFCHLD[p], p0, p1, p2) : (p in _tDLINK ? @f(_tDLINK[p], p0, p1, p2) : @f(p, p0, p1, p2))) +} + +#___________________________________________________________ +function _tframe_i1(F, p, p0, p1, p2, a) +{ + while (p in _tLINK) { + p = _tLINK[p] + } + return (p in _tFCHLD ? ("." in F ? _th1(a = F["."], @a(p, p0, p1, p2)) : "") _tmframe_i1(F, _tFCHLD[p], p0, p1, p2) : (">" in F ? _th1(a = F[">"], p in _tDLINK ? @a(_tDLINK[p], p0, p1, p2) : @a(p, p0, p1, p2)) : "")) +} + +#_______________________________________________________________________ +function _tframex(f, p, p0, p1) +{ + ############################################ + delete _t_ENDF[++_t_ENDF[0]] + f = p ? _tframex_i0(f, p, p0, p1) : "" + --_t_ENDF[0] + return f +} + +#___________________________________________________________ +function _tframex_i0(f, p, p0, p1) +{ + while (p in _tLINK) { + p = _tLINK[p] + } + return (p in _tFCHLD ? _tmframex(f, _tFCHLD[p], p0, p1) : @f(p, p0, p1)) +} + +#_____________________________________________________ +function _tframex_p0(A, f, q, i, B, C) +{ + _tframe_qparam = q + delete _TEND[++_TEND[_ARRLEN]] + if (match(f, /\~(.*)$/, B)) { + A["^~"] = A[".~"] = B[1] + f = substr(f, 1, RSTART - 1) + } + A["."] = A["^"] = f + return + q = split(f, B, /;/) + i = 0 + while (i < q) { + _tframex_p1(A, C[i]) + while (++i <= q) { + _tframex_p1(A, C[i], B[i]) + } + } +} + +#_______________________________________________ +function _tframex_p1(A, v, i, r, B) +{ + gsub(/[ \t]+/, "", v) + while (match(v, /^([^~]*)~\/(([^\/\\]*\\.)*[^\/\\]*)\//, B)) { + v = B[1] substr(v, RSTART + RLENGTH) + r = B[2] + } + if (i == "") { + if (v != "") { + A["."] = v + delete A["`"] + delete A["^"] + } + if (r != "") { + A[".~"] = A["`~"] = A["^~"] = r + } + } else if (match(v, /!/)) { + delete A[i] + } else { + A[i] = v + if (r != "") { + A[i "~"] = r + } + } +} + +#_____________________________________________________ +# F v action +#----------------------------------------------------- +# - * no additional action +# A B delete A[p] and define A[p] as array; copy array B to array A[p] +# A - delete A[p] +# A "*" delete A[p]; A[p]="*" +# "*" B define _[p]["*"] as array; copy array B to array _[p]["*"] +# "*" - run _mpu program "*" for `p +# "*0" "*1" _[p]["*0"]="*1" +#___________________________________________________________ +function _tgenuid(c) +{ + for (_uidcntr in _UIDARR1) { + delete _UIDARR1[_uidcntr] + for (c in _UIDARR0) { + _UIDS[_uidcntr c] + } + delete _UIDS[_uidcntr c] + return (_uidcntr c) + } + return _fatal("_tUID: Out of UID range") +} + +#_____________________________________________________ +function _tgenuid_init(a, b, A) +{ + _ptrlength = 4 + a = "\222\223\224\225\226\227\230\231\232" "\240\241\242\243\244\245\246\247" "\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277" "\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317" "\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337" + split(a, A, "") + for (a in A) { + for (b in A) { + _UIDARR0[A[a] A[b]] _UIDARR1[A[a] A[b]] + } + } + _uidcntr = A[a] A[b] +} + +# if ( F in _TCLASS ) { _[p]["CLASS"]=_TCLASS[F]; _tapi(p); return p } +# # ??? _mpu(F,p) ??? +# return p } +# _[p][F]=v; return p } + +#_______________________________________________________________________ +function _tgetitem(p, n, a, b) +{ + ############################################ + if (p) { + if (isarray(_PTR[p]["ITEM"]) && (n in _PTR[p]["ITEM"])) { + a = _PTR[p]["ITEM"][n] + } else { + a = _PTR[p]["ITEM"][n] = _N() + } + if (! (b = _rFCHLD(a))) { + b = _wLCHLD(a, _N()) + _PTR[b]["HOST"] = p + _[b]["ITEMNAME"] = n + } + return b + } +} + +#_________________________________________________________________ +function _tgetsp(p) +{ + ############################################### + return _tSTACK[p][0] +} + +#################################################################################### + +#_____________________________________________________________________________ +function _th0(p, p1, p2, p3) +{ + return p +} + +########################################## + +#_________________________________________________________________ +function _th1(p0, p, p2, p3) +{ + return p +} + +############################## + +#_________________________________________________________________ +function _th10(p0, p1) +{ + return (p1 p0) +} + +############################## + +#_________________________________________________________________ +function _th2(p0, p1, r, p3) +{ + return p +} + +############################## + +#_________________________________________________________________ +function _th3(p0, p1, p2, r) +{ + return p +} + +#_________________________________________________________________ +function _tifend(l) +{ + ############################################### + return (_t_ENDF[0] + l) in _t_ENDF ? (_t_ENDF[_t_ENDF[0] + l] ? _t_ENDF[_t_ENDF[0] + l] : 1) : "" +} + +# test _tbrochld fn; develope tOBJ r\w func specification for brochld func + +#_________________________________________________________________ +function _tinit_i0(D, S, i) +{ + for (i in S) { + if (isarray(S[i])) { + if (! isarray(D[i][""])) { + delete D[i] + D[i][""] + delete D[i][""] + } + _N_i0(D[i], S[i]) + } else { + if (isarray(D[i])) { + delete D[i] + } + D[i] = S[i] + } + } +} + +#_______________________________________________________________________ +######################################################################## + + + + + + + + + + + + + + + + + + + + + + +#_______________________________________________________________________ +# _N(arr\str\mpuptr,val) \ _n(arr\str\mpuptr,val) +# This functions create new object and return ptr. +# _n() - creates object from list of deleted objects or if it's empty create new one, while _N() always create new one +# It is strongly recommended to use _N() for the objects that have some data outside of standart object arrays. Or - make routines +# that will clear outsided object data in case if object deleting. +# +# IN: arr\str\mpu,val - (both missed) just create obj and return ptr +# arr,val - create object and write arr[ptr]=val +# str,val - create object and write _[ptr][str]=val +# mpuptr - NOT ALLOWED (val missed) create object and run MPU-code specified by mpuptr with created object ptr as primary parameter +# MOD: - +# OUT: - +# RETURN: ptr - pointer to newly created object +#_________________________________________________________________ +# _tdel(ptr) +# This function exclude object from it's current structure and delete it. ptr can be later used by function: _n() for creating new object +# Also same story will occured with all chields and subchields of object specified by ptr. +# ??? What happened with linked py _ptr[ptr] objects ??? +# +# IN: ptr - pointer to object that will deleted +# MOD: - +# OUT: - +# RETURN: undefined +#_________________________________________________________________ +# _isptr(ptr) +# This function checks: is ptr is the object pointer that is currently exist? +# Unescaped remained data will be in data of src_dst_ptr. +# +# IN: ptr - string that will be tested +# MOD: - +# OUT: - +# RETURN: undefined - if ptr is not pointer to exist object +# ptr - if ptr is the pointer to exist object +#_________________________________________________________________ + + + +#_________________________________________________________________ +# +# TO DESIGN: +# +# create basic objectapi interface support +# modify everywhere checking ptr not by `if ( ptr )...', but by `if ( ptr in _ )...' +# _TMP0, _TMP1 name change to something like _DATA name ??? +# think about redesigning routines for not depending if ptr is exist in tsysarrs: reason: performance\light code +function _tlist(L, p, f) +{ + _tlisti1 = _tlisti0 = L[_ARRLEN] + 0 + if (f == 0 && f == "") { + _tlist_i0(L, p) + } else { + _tlistf0 = f in _TAPI ? _TAPI[f] : f + _tlist_i1(L, p) + } + return (_tlisti0 - _tlisti1) +} + +function _tlist_i0(L, p, q, i) +{ + if (isarray(p)) { + q = p[_ARRLEN] + i = 0 + while (i++ < q) { + _tlist_i0(L, p[i]) + } + return + } + if (p in _) { + while (p in _tLINK) { + p = _tLINK[p] + } + L[++_tlisti0] = p + if (p in _tFCHLD) { + for (p = _tFCHLD[p]; p; p = p in _tNEXT ? _tNEXT[p] : "") { + _tlist_i0(L, p) + } + } + } +} + +function _tlist_i1(L, p) +{ + if (isarray(p)) { + q = p[_ARRLEN] + i = 0 + while (i++ < q) { + _tlist_i1(L, p[i]) + } + return + } + if (p in _) { + while (p in _tLINK) { + p = _tLINK[p] + } + if (_tlistf0 in _[p]) { + L[++_tlisti0] = p + } + if (p in _tFCHLD) { + for (p = _tFCHLD[p]; p; p = p in _tNEXT ? _tNEXT[p] : "") { + _tlist_i1(L, p) + } + } + } +} + +#_________________________________________________________________ +function _tmbframe(f, p, p0, p1, t) +{ + ################################## + while ((p) && (! (_t_ENDF[0] in _t_ENDF))) { + t = t _tbframe_i0(f, p, p0, p1, p = p in _tPREV ? _tPREV[p] : "") + } + return t +} + +#_________________________________________________________________ +function _tmbframex(f, p, p0, p1, t) +{ + ################################# + while ((p) && (! (_t_ENDF[0] in _t_ENDF))) { + t = t _tbframex_i0(f, p, p0, p1) + p = p in _tPREV ? _tPREV[p] : "" + } + return t +} + +#_________________________________________________________________ +function _tmbpass(f, p, p0, p1) +{ + ###################################### + while ((p) && (! (_t_ENDF[0] in _t_ENDF))) { + p0 = _tbpass_i0(f, p, p0, p1, p = p in _tPREV ? _tPREV[p] : "") + } + return p0 +} + +#_________________________________________________________________ +function _tmbpassx(f, p, p0, p1) +{ + ##################################### + while ((p) && (! (_t_ENDF[0] in _t_ENDF))) { + p0 = _tbpassx_i0(f, p, p0, p1) + p = p in _tPREV ? _tPREV[p] : "" + } + return p0 +} + +#_________________________________________________________________ +function _tmframe(f, p, p0, p1, p2) +{ + ################################### + delete _t_ENDF[++_t_ENDF[0]] + f = p ? _tmframe_i0(f, p, p0, p1, p2) : "" + --_t_ENDF[0] + return f +} + +#___________________________________________________________ +function _tmframe_i0(f, p, p0, p1, p2, t) +{ + while ((p) && (! (_t_ENDF[0] in _t_ENDF))) { + t = t _tframe_i0(f, p, p0, p1, p2, p = p in _tNEXT ? _tNEXT[p] : "") + } + return t +} + +#___________________________________________________________ +function _tmframe_i1(F, p, p0, p1, p2, t) +{ + while ((p) && (! (_t_ENDF[0] in _t_ENDF))) { + t = t _tframe_i1(F, p, p0, p1, p2, p = p in _tNEXT ? _tNEXT[p] : "") + } + return t +} + +#_________________________________________________________________ +function _tmframex(f, p, p0, p1, t) +{ + ################################## + while ((p) && (! (_t_ENDF[0] in _t_ENDF))) { + t = t _tframex_i0(f, p, p0, p1) + p = p in _tNEXT ? _tNEXT[p] : "" + } + return t +} + +#_________________________________________________________________ +function _tmpass(f, p, p0, p1) +{ + ####################################### + while ((p) && (! (_t_ENDF[0] in _t_ENDF))) { + p0 = _tbpass_i0(f, p, p0, p1, p = p in _tNEXT ? _tNEXT[p] : "") + } + return p0 +} + +#_________________________________________________________________ +function _tmpassx(f, p, p0, p1) +{ + ###################################### + while ((p) && (! (_t_ENDF[0] in _t_ENDF))) { + p0 = _tbpassx_i0(f, p, p0, p1) + p = p in _tNEXT ? _tNEXT[p] : "" + } + return p0 +} + +function _torexp(r) +{ + return _subseqon(_TOREXPB0, gensub(/(^[ \t]+)|(([ \t]*(\\)+)+[ \t]*)|([ \t]+$)/, "\\4", "G", _subseqoff(r, _TOREXPB0)), _TOREXPFN) +} + +function _torexp_cmdstr(t) +{ + return _strtorexp(gensub(/\^(.)/, "\\1", "G", t)) +} + +function _torexp_fmask(t) +{ + return gensub(/\\\*/, ".*", "G", gensub(/\\\?/, ".?", "G", _strtorexp(t))) +} + +#_______________________________________________ +function _torexp_init() +{ + _TOREXPFN[""] = "_strtorexp" + _TOREXPFN["~"] = "_torexp_rexp" + _TOREXPFN["="] = "_strtorexp" + _TOREXPFN[">"] = "_torexp_cmdstr" + _TOREXPFN["#"] = "_torexp_fmask" + _TOREXPFN["\""] = "_torexp_dqstr" + _TOREXPFN["'"] = "_torexp_sqstr" +} + +#_______________________________________________ +function _torexp_rexp(t) +{ + return t +} + +#_____________________________________________________________________________ +function _tpass(f, p, p0, p1) +{ + #################################################### + delete _t_ENDF[++_t_ENDF[0]] + f = p ? _tpass_i0(f, p, p0, p1) : "" + --_t_ENDF[0] + return f +} + +#___________________________________________________________ +function _tpass_i0(f, p, p0, p1, a) +{ + while (p in _tLINK) { + p = _tLINK[p] + } + return (p in _tFCHLD ? _tmpass(f, _tFCHLD[p], p0, p1) : @f(p, p0, p1)) +} + +#_____________________________________________________________________________ +function _tpassx(f, p, p0, p1) +{ + ################################################### + delete _t_ENDF[++_t_ENDF[0]] + f = p ? _tpassx_i0(f, p, p0, p1) : "" + --_t_ENDF[0] + return f +} + +#___________________________________________________________ +function _tpassx_i0(f, p, p0, p1) +{ + while (p in _tLINK) { + p = _tLINK[p] + } + return (p in _tFCHLD ? _tmpassx(f, _tFCHLD[p], p0, p1) : @f(p, p0, p1)) +} + +#_________________________________________________________________ +function _tpop(p, aA, a) +{ + ########################################### + if ((a = _tSTACK[p][0]) > 0) { + _tSTACK[p][0]-- + if (isarray(_tSTACK[p][a])) { + delete aA + _movarr(aA, _tSTACK[p][a]) + return + } + return _tSTACK[p][a] + } + _fatal("^" p ": Out of tSTACK") +} + +#_____________________________________________________________________________ +function _tpush(p, aA, a) +{ + ###################################################### + if (isarray(aA)) { + delete _tSTACK[p][a = ++_tSTACK[p][0]] + _tSTACK[p][a][""] + delete _tSTACK[p][a][""] + _movarr(_tSTACK[p][a], aA) + return + } + delete _tSTACK[p][a = ++_tSTACK[p][0]] + return (_tSTACK[p][a] = aA) +} + +# prefix - +# prichr - aware character `{', `^',`]' +# sechr - aware character `.' as the first char of sechr, and character `}' +# suffix - aware character `]' +# cntptr - aware character `]' +function _tr(n, cs, H) +{ + #_tuidinitcs[p]=cs + #2 uidel, 5 pfx, 7 hichr,11(10) lochr,14 suffix + _rconline(n ": " cs) + _rconl() + if (match(cs, /^((([^\xB4:\[\|\]]*\xB4.)*[^\xB4:\[\|\]]*):)?((([^\xB4\[\|\]]*\xB4.)*[^\xB4\[\|\]]*)\[)?(([^\xB4\|\]]*\xB4.)*[^\xB4\|\]]*)?(\|(\.)?(([^\xB4\]]*\xB4.)*[^\xB4\]]*))?(\](.*))?$/, H)) { + _rconl("delptr: " _une(H[2]) "'") + _rconl("pfxstr: " _une(H[5]) "'") + _rconl("hichr: " _une(H[7]) "'") + _rconl("lochr: " _une(H[10] ? H[7] "' and " H[11] "'" : H[11] "'")) + _rconl("sfxstr: " _une(H[14]) "'") + } else { + _rconl("NOT MATCH!") + } + _rconl() +} + +#_______________________________________________________________________ +function _trace(t, d, A) +{ + ################################################# + if (_ERRLOG_TF) { + A["TYPE"] = "TRACE" + A["TEXT"] = t + _log(A, d) + } +} + +#_________________________________________________________________ +function _trunframe(f, p, p0, p1, p2) +{ + ################################# + return _tframe(f ? f : "_trunframe_i0", p, p0, p1, p2) +} + +#_________________________________________________________________ +function _trunframe_i0(p, p0, p1, p2, f) +{ + if (p in _tFN) { + f = _tFN[p] + return @f(p, p0, p1, p2) + } +} + +#_________________________________________________________________ +function _trunframex(f, p, p0, p1) +{ + ################################### + return _tframex(f ? f : "_trunframe_i0", p, p0, p1) +} + +#_________________________________________________________________ +function _trunpass(f, p, p0, p1) +{ + ##################################### + return _tpass(f ? f : "_trunframe_i0", p, p0, p1) +} + +#_________________________________________________________________ +function _trunpassx(f, p, p0, p1) +{ + #################################### + return _tpassx(f ? f : "_trunframe_i0", p, p0, p1) +} + +#_________________________________________________________________ +function _tsetsp(p, v) +{ + ############################################# + return (_tSTACK[p][0] = v) +} + +# dptr - morg ptr; in case if object deleted then _CLASSPTR[ptr] will be deleted(object is death), but +# _tUIDEL[_CLASSPTR[ptr]] will be created that object can be resurrected from morg +# dptr can be any string containing any characters except `:'. It's not verified +# pfx,sfx - uid prefix str, and uid suffix str; this strings specifies string that can be inserted before/after +# uid generated by uid generator: +# +# class uid: pfx uidgen sfx +# +# Both can be any string(including ""), and can contains any character with B4-escaping feature. +# Note: that this strings cannot contains "'" character: it's should be escaped by B4-escaper. +# hstr,lstr - this values configure uid-generator itself. ther is a 3 combinations regarding its: +# +# hstr lstr function +# +# `ptr * - specify pointer to external uid-generator +# All uids and chars will be generated by external uid-generator +# * ^ptr - class will have it's own uid generator using external character set +# str str - class will have it's own uid generator with it's own character set +# character set inmplemented in hstr(high-charset) and in lstr(low-charset) in 2 ways: +# 1) "AB" "AB01" - this mean that high-charset contain chars: `A' and `B' +# low-charset contains chars: `A', `B', `0', `1' +# +# 2) "Az,By" "Ax,Bw,0v,1u" - this mean that high-charset contain chars: `Az' and `By' +# low-charset contains chars: `Ax', `Bw', `0v', `1u' +# Note: both: hstr and lstr cannot contain char `,' directly, but it's can uses +# B4-escaper to escape any char including `,' + + + +# !!!! in case of using `,' in hstr/lstr - the escaped `,' will leads to interpretate hstr and lstr as divided by `,' +# if parameters error then i should be more specific about what error in parameters detected +# document _inituid(): parameters; document cs: uid initialization string format +# test with escape char +# adv hstr and lstr splitting? +# chk if hstr len==0 ? +# return _tclass & report error? +# _tapi thru function + +# additional syntax checking ??? +# implement syntax and uid srv in docs +# add _dumpuid() ???? +# make performance measurement +# protection against badchar list +# additional feature to specify _getuid() to not resurrect uid; and informative that uid was ressurected or not +# build _defclass fn + +# _tuidinitcs ???? +# _tuidchrh[p] +# _tuidchrl[p] +# _tuidchr[p] +# _tuidcnt[p] +# _tUIDPFX[p] +# _tUIDSFX[p] +# _tUIDEL +# _tUIDCNTH +# _tUIDCNTL +# _tUIDCHRL +# _tUIDCHRH + +# create default class basic `new' and `del' functions +function _tstini() +{ + _ini("uidel:pfx'hstr|lstr'sfx") + _ini("uidel:pfx'hstr|lstr'") + _ini("uidel:'hstr|lstr'sfx") + _ini("uidel:'hstr|lstr'") + _ini("uidel:pfx'hstr'sfx") + _ini("uidel:pfx'hstr'") + _ini("uidel:'hstr'sfx") + _ini("uidel:'hstr'") + _conl() + _conl("########################################################################################") + _conl() + _ini("pfx'hstr|lstr'sfx") + _ini("pfx'hstr|lstr'") + _ini("'hstr|lstr'sfx") + _ini("'hstr|lstr'") + _ini("pfx'hstr'sfx") + _ini("pfx'hstr'") + _ini("'hstr'sfx") + _ini("'hstr'") + _conl() + _conl("########################################################################################") + _conl() + _ini("uidel:pfx'`cntptr'sfx") + _ini("uidel:pfx'`cntptr'") + _ini("uidel:'`cntptr'sfx") + _ini("uidel:'`cntptr'") + _conl() + _conl("########################################################################################") + _conl() + _ini("pfx'`cntptr'sfx") + _ini("pfx'`cntptr'") + _ini("'`cntptr'sfx") + _ini("'`cntptr'") + _conl() + _conl("########################################################################################") + _conl() + _ini("uidel:pfx'^chrptr'sfx") + _ini("uidel:pfx'^chrptr'") + _ini("uidel:'^chrptr'sfx") + _ini("uidel:'^chrptr'") + _conl() + _conl("########################################################################################") + _conl() + _ini("pfx'^chrptr'sfx") + _ini("pfx'^chrptr'") + _ini("'^chrptr'sfx") + _ini("'^chrptr'") + _conl() + _conl("########################################################################################") + _conl() +} + +function _tstv(p, A, r, f) +{ + if (f == "") { + f = "tst_splitstr" + } + @f(_NOP, A, p) + @f(AA0, A, p) + @f(AB0, A, p) + @f(AC0, A, p) + @f("", A, p) + @f("a", A, p) + @f("\264a", A, p) + @f("\264", A, p) + @f("a\264\264\264,ba\264\264\264,", A, p) + @f("\264,", A, p) + @f(",", A, p) + @f("\264a,", A, p) + @f("ab,", A, p) + @f("ab,\264", A, p) + @f("\264a\264,,ba", A, p) + @f(",a,,b\264,c,,\264a,,\264,,,", A, p) +} + +function _typ(p) +{ + return (_t0 = isarray(p) ? "#" : p == 0 ? p == "" ? 0 : p in _CLASSPTR ? "`" : p ? 3 : 4 : p in _CLASSPTR ? "`" : p + 0 == p ? 5 : p ? 3 : 2) +} + +function _typa(p, A) +{ + return (_t0 = isarray(p) ? "#" : p == 0 ? p == "" ? 0 : p in A ? "`" : p ? 3 : 4 : p in A ? "`" : p + 0 == p ? 5 : p ? 3 : 2) +} + +#_____________________________________________________ +# _tframe0(hndstr,ptr) +# +# +# IN: +# MOD: +# OUT: +# RETURN: +# +# handler string: +# Handler-string divides to words. Word splitter is char ";" +# +# Note that handler-string processed left to right. This mean that next word(more rightly) will overwrite fields implemented before(leftmost). +# Note that if word-string contains more than one rexp-field then only last rexp-field(most rightly) will be applied. +#_______________________________________________ +# TO DESIGN: +# +# 0-4: complete design of tlink handler call +# 1-4: add new tlink handler call +# 1-4: add new run fn (changed rexp to different for each type: see _tframe0) +# +# hndstr: +# may be add rexp for each type of handler and also total rexp for all ??? ADDED (test) +# may be add separator char ";" ??? ADDED (test) +#_______________________________________________________________________ +function _tzend(a, b) +{ + ##################################################### + if (b == 0 && b == "") { + return (_TEND[_TEND[_ARRLEN]] = a) + } else { + return (_TEND[_TEND[_ARRLEN] + a] = b) + } +} + +function _uidcyc(p, i) +{ + _dumpuidgen(p) + for (i = 1; i < (64 * 8 * 6 - 1); i++) { + _conl(i ":" _var(_getuid(p))) + } + _dumpuidgen(p) +} + +function _une(t) +{ + return gensub(/\xB4(.)/, "\\1", "G", t) +} + +#___________________________________________________________________________________ +function _unformatrexp(t) +{ + _formatstrq0 = split(t, _FORMATSTRA, /(\\[0-9]{1,3})|(\\x[[:xdigit:]]+)|(\\.)/, _FORMATSTRB) + _formatstrs0 = "" + for (t = 1; t < _formatstrq0; t++) { + _formatstrs0 = _formatstrs0 _FORMATSTRA[t] (_FORMATSTRB[t] in _QESCHR ? _QESCREXP[_FORMATSTRB[t]] : _QESCREXP[toupper(substr(_FORMATSTRB[t], length(_FORMATSTRB[t]) - 1))]) + } + return (_formatstrs0 _FORMATSTRA[t]) +} + +#___________________________________________________________ +function _unformatrexp_init(i, a) +{ + _formatstrs0 = "\\^$.[]|()*+?{}-sSwW<>yB`'" + delete _FORMATSTRB + for (i = 0; i < 256; i++) { + _QESCREXP["\\" _CHR[i]] = index(_formatstrs0, _CHR[i]) ? "\\" _CHR[i] : _CHR[i] + } + for (i = 0; i < 256; i++) { + a = index(_formatstrs0, _CHR[i]) ? "\\" : "" + _QESCREXP[sprintf("%.2X", i)] = a _CHR[i] + _QESCREXP["\\" sprintf("%.3o", i)] = a _CHR[i] + if (i < 8) { + _QESCREXP["\\" sprintf("%.1o", i)] = a _CHR[i] + } + if (i < 64) { + _QESCREXP["\\" sprintf("%.2o", i)] = a _CHR[i] + } + if (i < 16) { + _QESCREXP["\\x" sprintf("%.1X", i)] = _QESCREXP["\\x" sprintf("%.1x", i)] = a _CHR[i] + } + } + patsplit("a" 7 "b" 8 "f" 12 "n" 10 "r" 13 "t" 9 "v" 11, _FORMATSTRA, /[^0-9]/, _FORMATSTRB) + for (i in _FORMATSTRA) { + _QESCREXP["\\" _FORMATSTRA[i]] = _CHR[_FORMATSTRB[i] + 0] + } +} + +#___________________________________________________________________________________ +function _unformatstr(t) +{ + _formatstrq0 = split(t, _FORMATSTRA, /(\\[0-9]{1,3})|(\\x[[:xdigit:]]+)|(\\.)/, _FORMATSTRB) + _formatstrs0 = "" + for (t = 1; t < _formatstrq0; t++) { + _formatstrs0 = _formatstrs0 _FORMATSTRA[t] (_FORMATSTRB[t] in _QESCHR ? _QESCHR[_FORMATSTRB[t]] : _QESCHR[toupper(substr(_FORMATSTRB[t], length(_FORMATSTRB[t]) - 1))]) + } + return (_formatstrs0 _FORMATSTRA[t]) +} + +#___________________________________________________________ +function _unformatstr_init(i) +{ + for (i = 0; i < 256; i++) { + _QESCHR["\\" _CHR[i]] = _CHR[i] + } + for (i = 0; i < 256; i++) { + _QESCHR[sprintf("%.2X", i)] = _CHR[i] + _QESCHR["\\" sprintf("%.3o", i)] = _CHR[i] + if (i < 8) { + _QESCHR["\\" sprintf("%.1o", i)] = _CHR[i] + } + if (i < 64) { + _QESCHR["\\" sprintf("%.2o", i)] = _CHR[i] + } + if (i < 16) { + _QESCHR["\\x" sprintf("%.1X", i)] = _QESCHR["\\x" sprintf("%.1x", i)] = _CHR[i] + } + } + i = "a" 7 "b" 8 "f" 12 "n" 10 "r" 13 "t" 9 "v" 11 + patsplit(i, _FORMATSTRA, /[^0-9]/, _FORMATSTRB) + for (i in _FORMATSTRA) { + _QESCHR["\\" _FORMATSTRA[i]] = _CHR[_FORMATSTRB[i] + 0] + } +} + +#_____________________________________________________________________________ +function _uninit_del(A, i, p0) +{ + _del(i) +} + +#################################################################################### +# PUBLIC: +#_____________________________________________________________________________ +# var _SYS_STDOUT - (by default = "/dev/stdout") standart output pipe filename +# var _SYS_STDERR - (by default = "/dev/stderr") standart error output pipe filename +# var _SYS_STDCON - (by default = "CON") standart console output device +#_____________________________________________________________________________ +# var _CHR["CR"] - return cursor to the position 0 without newline(normally ="\x0D") +# var _CHR["EOL"] - return cursor to the position 0 & newline (MS:="\x0D\x0A" / UX:="\x0D") +# var _CON_WIDTH - console width(columns number) +#_____________________________________________________________________________ +# fn _cmd(c) - execute shell command c and return output +# fn _err - output string w\o any addition into _SYS_STDERR device +# fn _errnl - output string with addition _CHR["EOL"] at the end of the string into _SYS_STDERR device +# fn _out - output string w\o any addition into _SYS_STDOUT device +# fn _outnl - output string with addition _CHR["EOL"] at the end of the string into _SYS_STDOUT device +#_____________________________________________________________________________ +# fn _con(text[,tabspace]) +# fn _conl(text[,tabspace]) +# fn _conline(text[,tabspace]) +# fn _constat(status[,tabspace]) +# fn _constatpush([status[,tabspace]]) +# fn _constatpop() +#_______________________________________________________________________ +# var _constatstr +#################################################################################### +function _unstr(t) +{ + return gensub(/\\(.)/, "\\1", "G", t) +} + +#_________________________________________________________________ +function _untmp(f, a) +{ + ############################################# + if ((f = filepath(f))) { + if (match(f, /\\$/)) { + _deletepfx(_FILEIO_RDTMP, a = toupper(f)) + _deletepfx(_FILEIO_RDNETMP, a) + } else { + delete _FILEIO_RDNETMP[toupper(f)] + } + return f + } + return "" +} + +#_____________________________________________________________________________ +function _val(v, t) +{ + if (isarray(v)) { + return (_dumparr(v) _ln(t)) + } + if (v == 0 && v == "") { + return (_ln("- (ERRNO=" ERRNO ")") _ln(t)) + } + return (_ln(v "'") _ln(t)) +} + +#_____________________________________________________________________________ +function _val0(v) +{ + if (isarray(v)) { + return _dumparr(v) + } + if (v == 0 && v == "") { + return "-" + } + return ("\"" v "\"") +} + +#_____________________________________________________________________________ +function _var(v, t) +{ + if (isarray(v)) { + return (_dumparr(v) _ln(t)) + } + if (v == 0 && v == "") { + return (_ln("- (ERRNO=" ERRNO ")") _ln(t)) + } + return (_ln(v "'") _ln(t)) +} + +#_______________________________________________________________________ +function _verb(t, d, A) +{ + ################################################## + if (_ERRLOG_VF) { + A["TYPE"] = "VERB" + A["TEXT"] = t + _log(A, d) + } +} + +#_________________________________________________________________ +function _wFBRO(p, v, a) +{ + ########################################### + if (p) { + if (v) { + for (a = p; a in _tPARENT; ) { + if ((a = _tPARENT[a]) == v) { + return v + } + } ######################## v is parentesis of p + if (p in _tPARENT) { + p = _tPARENT[p] + if (v in _tNEXT) { + if (v in _tPREV) { + _tPREV[_tNEXT[a] = _tNEXT[v]] = a = _tPREV[v] + delete _tPREV[v] + if (v in _tPARENT) { + if (p == (a = _tPARENT[v])) { + return (_tFCHLD[p] = _tPREV[_tNEXT[v] = _tFCHLD[p]] = v) + } + --_tQCHLD[a] + } + } else if (v in _tPARENT) { + if (p == (a = _tPARENT[v])) { + return v + } + delete _tPREV[_tFCHLD[a] = _tNEXT[v]] + --_tQCHLD[a] + } else { + delete _tPREV[_tNEXT[v]] + } + ++_tQCHLD[p] + return (_tFCHLD[p] = _tPREV[_tNEXT[v] = _tFCHLD[_tPARENT[v] = p]] = v) + } else { + if (v in _tPREV) { + if (v in _tPARENT) { + delete _tNEXT[_tLCHLD[a = _tPARENT[v]] = _tPREV[v]] + if (p == a) { + delete _tPREV[v] + return (_tFCHLD[p] = _tPREV[_tNEXT[v] = _tFCHLD[p]] = v) + } + --_tQCHLD[a] + } else { + delete _tNEXT[_tPREV[v]] + } + delete _tPREV[v] + } else if (v in _tPARENT) { + if (p == (a = _tPARENT[v])) { + return v + } + delete _tFCHLD[a] + delete _tLCHLD[a] + delete _tQCHLD[a] + } + ++_tQCHLD[p] + return (_tFCHLD[p] = _tPREV[_tNEXT[v] = _tFCHLD[_tPARENT[v] = p]] = v) + } + } else { + while (p in _tPREV) { + p = _tPREV[p] + } + if (v in _tPREV) { + if (v in _tPARENT) { + --_tQCHLD[a = _tPARENT[v]] + delete _tPARENT[v] + if (v in _tNEXT) { + _tNEXT[_tPREV[a] = _tPREV[v]] = a = _tNEXT[v] + } else { + delete _tNEXT[_tLCHLD[a] = _tPREV[v]] + } + } else if (v in _tNEXT) { + _tNEXT[_tPREV[a] = _tPREV[v]] = a = _tNEXT[v] + } else { + delete _tNEXT[_tPREV[v]] + } + delete _tPREV[v] + } else { + if (p == v) { + return v + } + if (v in _tPARENT) { + if (v in _tNEXT) { + delete _tPREV[_tFCHLD[a = _tPARENT[v]] = _tNEXT[v]] + --_tQCHLD[a] + } else { + delete _tLCHLD[a = _tPARENT[v]] + delete _tFCHLD[a] + delete _tQCHLD[a] + } + delete _tPARENT[v] + } else if (v in _tNEXT) { + delete _tPREV[_tNEXT[v]] + } + } + return (_tPREV[_tNEXT[v] = p] = v) + } + } else { + if (v == 0) { + return v + } ######################## p=ptr, v=0 + return v + } + } else { + if (p == 0) { + return v ######################## p=0 + } ######################## p=ptr, v="" + if (v) { + return _texclude(v) ######################## p="", v=ptr - exclude v + } + return v + } +} + +#_________________________________________________________________ +function _wFCHLD(p, v, a) +{ + ########################################## + if (p) { + if (v) { + if (p == v) { + return v + } ######################## p=v=ptr + for (a = p; a in _tPARENT; ) { + if ((a = _tPARENT[a]) == v) { + return v + } + } ######################## v is parentesis of p + if (v in _tNEXT) { + if (v in _tPREV) { + _tPREV[_tNEXT[a] = _tNEXT[v]] = a = _tPREV[v] + delete _tPREV[v] + if (v in _tPARENT) { + if (p == (a = _tPARENT[v])) { + return (_tFCHLD[p] = _tPREV[_tNEXT[v] = _tFCHLD[p]] = v) + } + --_tQCHLD[a] + } + } else if (v in _tPARENT) { + if (p == (a = _tPARENT[v])) { + return v + } + delete _tPREV[_tFCHLD[a] = _tNEXT[v]] + --_tQCHLD[a] + } else { + delete _tPREV[_tNEXT[v]] + } + if (p in _tFCHLD) { + ++_tQCHLD[p] + return (_tFCHLD[p] = _tPREV[_tNEXT[v] = _tFCHLD[_tPARENT[v] = p]] = v) + } + delete _tNEXT[v] + } else { + if (v in _tPREV) { + if (v in _tPARENT) { + delete _tNEXT[_tLCHLD[a = _tPARENT[v]] = _tPREV[v]] + if (p == a) { + delete _tPREV[v] + return (_tFCHLD[p] = _tPREV[_tNEXT[v] = _tFCHLD[p]] = v) + } + --_tQCHLD[a] + } else { + delete _tNEXT[_tPREV[v]] + } + delete _tPREV[v] + } else if (v in _tPARENT) { + if (p == (a = _tPARENT[v])) { + return v + } + delete _tFCHLD[a] + delete _tLCHLD[a] + delete _tQCHLD[a] + } + if (p in _tFCHLD) { + ++_tQCHLD[p] + return (_tFCHLD[p] = _tPREV[_tNEXT[v] = _tFCHLD[_tPARENT[v] = p]] = v) + } + } + _tQCHLD[p] = 1 + return (_tFCHLD[_tPARENT[v] = p] = _tLCHLD[p] = v) + } else { + if (v == 0) { + if (p in _tFCHLD) { ######################## p=ptr, v=0 > delete all chld + v = _tFCHLD[p] + delete _tFCHLD[p] + delete _tLCHLD[p] + delete _tQCHLD[p] + do { + delete _tPARENT[v] + } while ((v in _tNEXT) && (v = _tNEXT[v])) + } + } + return v + } + } else { + if (p == 0) { + return v ######################## p=0 + } ######################## p=ptr, v="" > ignore action + return v + } +} + +#_________________________________________________________________ +function _wLBRO(p, v, a) +{ + ########################################### + if (p) { + if (v) { + for (a = p; a in _tPARENT; ) { + if ((a = _tPARENT[a]) == v) { + return v + } + } ######################## v is parentesis of p + if (p in _tPARENT) { + p = _tPARENT[p] + if (v in _tPREV) { + if (v in _tNEXT) { + _tNEXT[_tPREV[a] = _tPREV[v]] = a = _tNEXT[v] + delete _tNEXT[v] + if (v in _tPARENT) { + if (p == (a = _tPARENT[v])) { + return (_tLCHLD[p] = _tNEXT[_tPREV[v] = _tLCHLD[p]] = v) + } + --_tQCHLD[a] + } + } else if (v in _tPARENT) { + if (p == (a = _tPARENT[v])) { + return v + } + delete _tNEXT[_tLCHLD[a] = _tPREV[v]] + --_tQCHLD[a] + } else { + delete _tNEXT[_tPREV[v]] + } + ++_tQCHLD[p] + return (_tLCHLD[p] = _tNEXT[_tPREV[v] = _tLCHLD[_tPARENT[v] = p]] = v) + } else { + if (v in _tNEXT) { + if (v in _tPARENT) { + delete _tPREV[_tFCHLD[a = _tPARENT[v]] = _tNEXT[v]] + if (p == a) { + delete _tNEXT[v] + return (_tLCHLD[p] = _tNEXT[_tPREV[v] = _tLCHLD[p]] = v) + } + --_tQCHLD[a] + } else { + delete _tPREV[_tNEXT[v]] + } + delete _tNEXT[v] + } else if (v in _tPARENT) { + if (p == (a = _tPARENT[v])) { + return v + } + delete _tLCHLD[a] + delete _tFCHLD[a] + delete _tQCHLD[a] + } + ++_tQCHLD[p] + return (_tLCHLD[p] = _tNEXT[_tPREV[v] = _tLCHLD[_tPARENT[v] = p]] = v) + } + } else { + while (p in _tNEXT) { + p = _tNEXT[p] + } + if (v in _tNEXT) { + if (v in _tPARENT) { + --_tQCHLD[a = _tPARENT[v]] + delete _tPARENT[v] + if (v in _tPREV) { + _tPREV[_tNEXT[a] = _tNEXT[v]] = a = _tPREV[v] + } else { + delete _tPREV[_tFCHLD[a] = _tNEXT[v]] + } + } else if (v in _tPREV) { + _tPREV[_tNEXT[a] = _tNEXT[v]] = a = _tPREV[v] + } else { + delete _tPREV[_tNEXT[v]] + } + delete _tNEXT[v] + } else { + if (p == v) { + return v + } + if (v in _tPARENT) { + if (v in _tPREV) { + delete _tNEXT[_tLCHLD[a = _tPARENT[v]] = _tPREV[v]] + --_tQCHLD[a] + } else { + delete _tFCHLD[a = _tPARENT[v]] + delete _tLCHLD[a] + delete _tQCHLD[a] + } + delete _tPARENT[v] + } else if (v in _tPREV) { + delete _tNEXT[_tPREV[v]] + } + } + return (_tNEXT[_tPREV[v] = p] = v) + } + } else { + if (v == 0) { + return v + } ######################## p=ptr, v=0 + return v + } + } else { + if (p == 0) { + return v ######################## p=0 + } ######################## p=ptr, v="" + if (v) { + return _texclude(v) ######################## p="", v=ptr - exclude v + } + return v + } +} + +#_________________________________________________________________ +function _wLCHLD(p, v, a) +{ + ########################################## + if (p) { + if (v) { + if (p == v) { + return v + } ######################## p=v=ptr + for (a = p; a in _tPARENT; ) { + if ((a = _tPARENT[a]) == v) { + return v + } + } ######################## v is parentesis of p + if (v in _tPREV) { + if (v in _tNEXT) { + _tNEXT[_tPREV[a] = _tPREV[v]] = a = _tNEXT[v] + delete _tNEXT[v] + if (v in _tPARENT) { + if (p == (a = _tPARENT[v])) { + return (_tLCHLD[p] = _tNEXT[_tPREV[v] = _tLCHLD[p]] = v) + } + --_tQCHLD[a] + } + } else if (v in _tPARENT) { + if (p == (a = _tPARENT[v])) { + return v + } + delete _tNEXT[_tLCHLD[a] = _tPREV[v]] + --_tQCHLD[a] + } else { + delete _tNEXT[_tPREV[v]] + } + if (p in _tLCHLD) { + ++_tQCHLD[p] + return (_tLCHLD[p] = _tNEXT[_tPREV[v] = _tLCHLD[_tPARENT[v] = p]] = v) + } + delete _tPREV[v] + } else { + if (v in _tNEXT) { + if (v in _tPARENT) { + delete _tPREV[_tFCHLD[a = _tPARENT[v]] = _tNEXT[v]] + if (p == a) { + delete _tNEXT[v] + return (_tLCHLD[p] = _tNEXT[_tPREV[v] = _tLCHLD[p]] = v) + } + --_tQCHLD[a] + } else { + delete _tPREV[_tNEXT[v]] + } + delete _tNEXT[v] + } else if (v in _tPARENT) { + if (p == (a = _tPARENT[v])) { + return v + } + delete _tLCHLD[a] + delete _tFCHLD[a] + delete _tQCHLD[a] + } + if (p in _tLCHLD) { + ++_tQCHLD[p] + return (_tLCHLD[p] = _tNEXT[_tPREV[v] = _tLCHLD[_tPARENT[v] = p]] = v) + } + } + _tQCHLD[p] = 1 + return (_tLCHLD[_tPARENT[v] = p] = _tFCHLD[p] = v) + } else { + if (v == 0) { + if (p in _tFCHLD) { ######################## p=ptr, v=0 > delete all chld + v = _tFCHLD[p] + delete _tFCHLD[p] + delete _tLCHLD[p] + delete _tQCHLD[p] + do { + delete _tPARENT[v] + } while ((v in _tNEXT) && (v = _tNEXT[v])) + } + } + return v + } + } else { + if (p == 0) { + return v ######################## p=0 + } ######################## p=ptr, v="" > ignore action + return v + } +} + +#_________________________________________________________________ +function _wLINK(p, v) +{ + ############################################## + return (_tLINK[p] = v) +} + +#_________________________________________________________________ +function _wNEXT(p, v, a, b) +{ + ######################################### + if (p) { + if (v) { + if (p == v) { + return v + } ######################## p=v=ptr + for (a = p; a in _tPARENT; ) { + if ((a = _tPARENT[a]) == v) { + return v + } + } ######################## v is parentesis of p + if (v in _tPREV) { + if (p == (a = _tPREV[v])) { + return v + } + if (v in _tNEXT) { + _tPREV[_tNEXT[a] = _tNEXT[v]] = a + if (v in _tPARENT) { + --_tQCHLD[_tPARENT[v]] + } + } else { + delete _tNEXT[a] + if (v in _tPARENT) { + _tLCHLD[b = _tPARENT[v]] = a + --_tQCHLD[b] + } + } + } else if (v in _tNEXT) { + if (v in _tPARENT) { + delete _tPREV[_tFCHLD[a = _tPARENT[v]] = _tNEXT[v]] + --_tQCHLD[a] + } else { + delete _tPREV[_tNEXT[v]] + } + } else if (v in _tPARENT) { + delete _tFCHLD[a = _tPARENT[v]] + delete _tLCHLD[a] + delete _tQCHLD[a] + } + if (p in _tNEXT) { + _tPREV[_tNEXT[v] = _tNEXT[p]] = v + if (p in _tPARENT) { + ++_tQCHLD[_tPARENT[v] = _tPARENT[p]] + } else { + delete _tPARENT[v] + } + } else { + delete _tNEXT[v] + if (p in _tPARENT) { + ++_tQCHLD[_tPARENT[_tLCHLD[a] = v] = a = _tPARENT[p]] + } else { + delete _tPARENT[v] + } + } + return (_tNEXT[_tPREV[v] = p] = v) + } else { + if (v == 0) { + return v + } ######################## p=ptr, v=0 + return v + } + } else { + if (p == 0) { + return v ######################## p=0 + } ######################## p=ptr, v="" + if (v) { + return _texclude(v) ######################## p="", v=ptr - exclude v + } + return v + } +} + +#_________________________________________________________________ +function _wPARENT(p, v) +{ + ############################################ + return v +} + +#_________________________________________________________________ +function _wPREV(p, v, a, b) +{ + ######################################### + if (p) { + if (v) { + if (p == v) { + return v + } ######################## p=v=ptr + for (a = p; a in _tPARENT; ) { + if ((a = _tPARENT[a]) == v) { + return v + } + } ######################## v is parentesis of p + if (v in _tNEXT) { + if (p == (a = _tNEXT[v])) { + return v + } + if (v in _tPREV) { + _tNEXT[_tPREV[a] = _tPREV[v]] = a + if (v in _tPARENT) { + --_tQCHLD[_tPARENT[v]] + } + } else { + delete _tPREV[a] + if (v in _tPARENT) { + _tFCHLD[b = _tPARENT[v]] = a + --_tQCHLD[b] + } + } + } else if (v in _tPREV) { + if (v in _tPARENT) { + delete _tNEXT[_tLCHLD[a = _tPARENT[v]] = _tPREV[v]] + --_tQCHLD[a] + } else { + delete _tNEXT[_tPREV[v]] + } + } else if (v in _tPARENT) { + delete _tLCHLD[a = _tPARENT[v]] + delete _tFCHLD[a] + delete _tQCHLD[a] + } + if (p in _tPREV) { + _tNEXT[_tPREV[v] = _tPREV[p]] = v + if (p in _tPARENT) { + ++_tQCHLD[_tPARENT[v] = _tPARENT[p]] + } else { + delete _tPARENT[v] + } + } else { + delete _tPREV[v] + if (p in _tPARENT) { + ++_tQCHLD[_tPARENT[_tFCHLD[a] = v] = a = _tPARENT[p]] + } else { + delete _tPARENT[v] + } + } + return (_tPREV[_tNEXT[v] = p] = v) + } else { + if (v == 0) { + return v + } ######################## p=ptr, v=0 + return v + } + } else { + if (p == 0) { + return v ######################## p=0 + } ######################## p=ptr, v="" + if (v) { + return _texclude(v) ######################## p="", v=ptr - exclude v + } + return v + } +} + +#_________________________________________________________________ +function _wQBRO(p, v) +{ + ############################################## + return v +} + +#_________________________________________________________________ +function _wQCHLD(p, v) +{ + ############################################# + if (p) { + if (v) { + } else { + if (v == 0) { + if (p in _tFCHLD) { ######################## p=ptr, v=0 > delete all chld + v = _tFCHLD[p] ######################## p=ptr, v=ptr + delete _tFCHLD[p] + delete _tLCHLD[p] + delete _tQCHLD[p] + do { + delete _tPARENT[v] + } while ((v in _tNEXT) && (v = _tNEXT[v])) + } + } + return v + } + } else { + if (p == 0) { + return v ######################## p=ptr, v="" > ignore action + } ######################## p=0 + return v + } +} + +#_______________________________________________________________________ +function _warning(t, d, A) +{ + ############################################### + if (_ERRLOG_WF) { + A["TYPE"] = "WARNING" + A["TEXT"] = t + _log(A, d) + } +} + +#___________________________________________________________ +function _wfilerdnehnd(f, t) +{ + if ((f = _filerdne(f)) == "") { + return "" + } + if (! ((t = _filerd(f)) in _WFILEROOTDIR)) { + _cmd("md \"" t "\" 2>NUL") + _WFILEROOTDIR[t] + } + return f +} + +function _wonl(t) +{ + wonl = wonl _ln(t) +} + +function _wonline(t) +{ + wonl = wonl _ln(substr(" _ " t " _____________________________________________________________________________________________________________________________________", 1, 126)) +} + +#___________________________________________________________ +function _wr_shortcut(f, S) +{ + if ((_shrtcutf0 = _filepath(f))) { + ERRNO = "" + _shrtcuta0 = _shortcut_fpath " /A:C /F:\"" _shrtcutf0 "\" 2>&1" + for (f in _SHORTCUTWSTRUC) { + if (f in S) { + _shrtcuta0 = _shrtcuta0 " " _SHORTCUTWSTRUC[f] "\"" (gensub(/(\\?)$/, "\\1\\1", 1, S[f])) "\"" + } + } + if (_shortcut_nerr(_cmd(_shrtcuta0), _shrtcutf0)) { + return + } + } + return (ERRNO ? ERRNO = "write shortcut: " ERRNO : _NOP) +} + +#_________________________________________________________________ +function _wrfile(f, d, a, b) +{ + ######################################### + if (((f = _wfilerdnehnd(f)) == "") || (_filene(f) == "")) { + ERRNO = "Filename error" + return + } + a = BINMODE + BINMODE = "rw" + b = ORS + ORS = "" + ERRNO = "" + print(d) > f + if (ERRNO) { + return "" + } + close(f) + BINMODE = a + ORS = b + if (ERRNO) { + return "" + } + return f +} + +#___________________________________________________________ +function _wrfile1(f, d, a, b) +{ + ################################## + if (((f = _wfilerdnehnd(f)) == "") || (_filene(f) == "")) { + ERRNO = "Filename error" + return + } + a = BINMODE + BINMODE = "rw" + b = ORS + ORS = "" + ERRNO = "" + print(d) > f + if (ERRNO) { + return "" + } + close(f) + BINMODE = a + ORS = b + if (ERRNO) { + return "" + } + return d +} + +#_______________________________________________________________________ +function _yexport(p) +{ + ##################################################### + return _tframe("_yexport_i0", p) +} + +#_______________________________________________________________________ +function _yexport_i0(p, p0, p1, p2) +{ + if (p in _tLOG) { + return ("_ERRLOG: " _Zexparr(_tLOG[p]) "\n") + } + if (p in _tSTR) { + p = _tSTR[p] + gsub(/\x1B/, "\033;", p) + gsub(/\x0A/, "\033:", p) + return (p "\n") + } +} + +#_________________________________________________________________ +function cmp_str_idx(i1, v1, i2, v2) +{ + ############################## + return (i1 < i2 ? -1 : 1) +} + +#___________________________________________________________ +function filedi(f, d) +{ + if ((f = filerdnehndi(f)) == "") { + return _FILEIO_D + } + if (f in _FILEDIRFL) { + return _FILEDIR[f] + } + if (f in _FILEROOT) { + if ((d = filegetdrvdir(_FILEROOT[f]))) { + _FILEDIRFL[f] + } + return (_FILEDIR[f] = d _FILEDIR[f]) + } + if ((_FILEIO_RD, f) in _FILEDIR) { + return _FILEDIR[_FILEIO_RD, f] + } + return (_FILEDIR[_FILEIO_RD, f] = _FILEIO_D _FILEDIR[f]) +} + +#___________________________________________________________ +function filegetdrvdir(t, r) +{ + if (t in _FILEDRV) { + return _FILEDRV[t] + } + if (match(r = _cmd("cd " t " 2>NUL"), /[^\x00-\x1F]+/)) { + r = gensub(/[ \t]*([\\\$\:])[ \t]*/, "\\1", "G", substr(r, RSTART, RLENGTH)) + gsub(/(^[ \t]*)|([ \t]*$)/, "", r) + if (match(r, /\:(.*)/)) { + return (_FILEDRV[tolower(t)] = _FILEDRV[toupper(t)] = substr(r, RSTART + 1) (r ~ /\\$/ ? "" : "\\")) + } + } + return "" +} + +#___________________________________________________________ +function filegetrootdir(f, dd, d) +{ + if (f in _FILEDIRFL) { + if (f in _FILEROOT) { + return (_FILEROOT[f] _FILEDIR[f]) + } + if (((dd = dd ? dd : _FILEIO_RD), f) in _FILEROOT) { + return (_FILEROOT[dd, f] _FILEDIR[f]) + } + return (_FILEROOT[dd, f] = fileri(dd)) _FILEDIR[f] + } + if (f in _FILEROOT) { + if ((d = filegetdrvdir(_FILEROOT[f]))) { + _FILEDIRFL[f] + return (_FILEROOT[f] (_FILEDIR[f] = d _FILEDIR[f])) + } else { + return (_FILEROOT[f] _FILEDIR[f]) + } + } + if (((dd = dd ? dd : _FILEIO_RD), f) in _FILEROOT) { + if ((dd, f) in _FILEDIR) { + return (_FILEROOT[dd, f] _FILEDIR[dd, f]) + } + if ((d = filedi(dd) _FILEDIR[f]) ~ /^\\/) { + return (_FILEROOT[dd, f] (_FILEDIR[dd, f] = d)) + } + return (_FILEROOT[dd, f] d) + } + if ((dd, f) in _FILEDIR) { + return (_FILEROOT[dd, f] = fileri(dd)) _FILEDIR[dd, f] + } + if ((d = filedi(dd) _FILEDIR[f]) ~ /^\\/) { + return (_FILEROOT[dd, f] = fileri(dd)) (_FILEDIR[dd, f] = d) + } + return (_FILEROOT[dd, f] = fileri(dd)) d +} + +#___________________________________________________________ +function filerdnehndi(st, a, c, r, d, n, A) +{ + if (st) { + if ((c = toupper(st)) in _FILECACHE) { + return _FILECACHE[c] + } + if (match(st, /^[ \t]*\\[ \t]*\\/)) { + if (match(substr(st, a = RLENGTH + 1), /^[ \t]*([0-9A-Za-z\-]+)[ \t]*(\\[ \t]*([A-Za-z])[ \t]*\$[ \t]*)?(\\[ \t]*([0-9A-Za-z_\!\+\-\[\]\(\)\{\}\~\.]+( +[0-9A-Za-z_\!\+\-\[\]\(\)\{\}\~\.]+)*[ \t]*\\)*[ \t]*)?(([0-9A-Za-z_\!\+\.\~\-\[\]\{\}\(\)]+( +[0-9A-Za-z_\!\+\.\~\-\[\]\{\}\(\)]+)*)[ \t]*)?/, A)) { + a = a + RLENGTH + d = (A[3] ? ("\\" A[3] "$") : "") "\\" A[5] + gsub(/[ \t]*\\[ \t]*/, "\\", d) + if ((st = toupper((r = "\\\\" A[1]) d (n = A[8]))) in _FILECACHE) { + return (_FILECACHE[substr(c, 1, a)] = _FILECACHE[st]) + } + _FILEDIR[c = _FILECACHE[substr(c, 1, a)] = _FILECACHE[st] = ++_file_rootcntr] = d + _FILEDIRFL[c] + _FILEROOT[c] = r + } else { + _filepath_err = "UNC" + return "" + } + } else { + match(st, /^(([ \t]*\.[ \t]*\\[ \t]*)|(([ \t]*([A-Za-z])[ \t]*(\:)[ \t]*)?([ \t]*(\\)[ \t]*)?))([ \t]*(([ \t]*[0-9A-Za-z_\!\+\-\[\]\(\)\{\}\~\.]+( +[0-9A-Za-z_\!\+\-\[\]\(\)\{\}\~\.]+)*[ \t]*\\)+)[ \t]*)?([ \t]*([0-9A-Za-z_\!\+\.\~\-\[\]\{\}\(\)]+( +[0-9A-Za-z_\!\+\.\~\-\[\]\{\}\(\)]+)*)[ \t]*)?/, A) + if (! RLENGTH) { + return "" + } + d = A[8] A[10] + gsub(/[ \t]*\\[ \t]*/, "\\", d) + if ((st = toupper((r = A[5] A[6]) d (n = A[14]))) in _FILECACHE) { + return (_FILECACHE[substr(c, 1, RLENGTH)] = _FILECACHE[st]) + } + _FILEDIR[c = _FILECACHE[substr(c, 1, RLENGTH)] = _FILECACHE[st] = ++_file_rootcntr] = d + if (A[8]) { + _FILEDIRFL[c] + } + if (r) { + _FILEROOT[c] = r + } + } + if (n) { + if (match(n, /\.[^\.]*$/)) { + _FILEXT[c] = substr(n, RSTART) + _FILENAM[c] = substr(n, 1, RSTART - 1) + } else { + _FILENAM[c] = n + } + } + return c + } + return "" +} + +#_____________________________________________________ +function fileri(f) +{ + if ((f = filerdnehndi(f)) == "") { + return _FILEIO_R + } + if (f in _FILEROOT) { + return _FILEROOT[f] + } + if ((_FILEIO_RD, f) in _FILEROOT) { + return _FILEROOT[_FILEIO_RD, f] + } + return (_FILEROOT[_FILEIO_RD, f] = _FILEIO_R) +} + +function hujf(a, b, c) +{ + _conl("hujf(" a "," b "," c ")") +} + +#___________________________________________________________ +function ncmp_str_idx(i1, v1, i2, v2) +{ + ####################### + return (i1 < i2 ? 1 : -1) +} + +function test_cfg(p, z, AA0, a) +{ + AA0[1] + _fclass = _cfguid(p = _getuid(_classys), _NOP, _NOP, _NOP, _NOP, _classys) + _conl() + _conline() + _conl() + _drawuid(p) + _fclass = _cfguid(p = _getuid(_classys), AA0, AA0, AA0, AA0, _classys) + _conl() + _conline() + _conl() + _drawuid(p) + a = _getuid(z = _fclass = _cfguid(p = _getuid(_classys), p, "<", ">", "ab", "cd")) + _conl("### " a "########") + _conline() + _conl() + _drawuid(p) + a = _getuid(_fclass = _cfguid(p = _getuid(_classys), z, 0, 0, _NOP, z)) + _conl("### " a "########") + _conline() + _conl() + _drawuid(p) + a = _getuid(_fclass = _cfguid(p = _getuid(_classys), z, "^", "$", z, _classys)) + _conl("### " a "########") + _conline() + _conl() + _drawuid(p) + _fclass = _cfguid(p = _getuid(_classys), "oblptr", "pfx", "sfx", "abcd") + _conl() + _conline() + _conl() + _drawuid(p) + _conl("```````````````````" z "'''''''''" (_isptr(z) ? " ptr" : " not ptr")) + _drawuid(z) +} + +function test_splitstr(A) +{ + AA0[-1] = "huj" + AA0["A"] = "pizda" + AA0[1] = "zhopa" + delete AB0[AB0[""] = ""] + AC0[-1] = "HUJ" + AC0["A"] = "PIZDA" + AC0[1] = "ZHOPA" + _SPLITSTRB0["1"] + wonl = "" + _tstv(0, A, 0, "_tstv") + _conl(wonl) + _wrfile("wonl.out", wonl) +} + +function test_uid(p, i) +{ + #test_cfg() + #return + _fclass = _cfguid(p = _getuid(_classys), p, "pfx", "sfx", "abc") + #_fclass=_cfguid(p=_getuid(_classys),_NOP,_NOP,_NOP,"",_classys) + _conl("_fclass uid: " _getuid(_fclass)) + _drawuid(_fclass) + _conl("_classys uid: " _getuid(_classys)) _drawuid(_classys) + for (i = 1; i < 81; i++) { + _conl(i ": " _getuid(_fclass)) + } + _drawuid(_fclass) +} + +function tst_splitstr(t, A, R, r) +{ + delete A + A["not cleared"] + _wonl() + _wonline("_splitstr(" (isarray(t) ? "ARR" (length(t) > 0 ? "#" (t[1] != "zhopa" ? "U" : "l") : "") : _val0(t)) ",A" (isarray(R) ? ", ARR" (length(R) > 0 ? "#" (R[1] != "zhopa" ? "U" : "l") : "") : ", " _val0(R)) "):") + _wonl(_val0(r = _splitstr(t, A, R))) + _wonl("arrary A:") + _wonl(_dumparr(A)) + return r +} + +function tts(p, uidel, psfx, cnt, chr, p5, p6, p7, im) +{ + im = " " + im = ".. .." + _conl("ret: " _qparam(im, p, uidel, psfx, cnt, chr, p5, p6, p7) "'") + _conl("mask: `" _qparamask "'") +} + +# # - p is array +# ` - p is ptr detected in array _CLASSPTR(for _typ); or p is ptr detected in array A(for _typa) +# 0 - p is undefined + +# 2 - p is string=="" +# 3 - p is string!="" +# 4 - p is number 0 +# 5 - p is any number except 0(positive and negative) + +# str: _typ(p)+0 !_typ(p)+0 +# str/ptr _typ(p)>0 _typ(p)<1 +# str/arr "`">_typ(p0) && _t0 +# str/ptr/arr _typ(p) !_typ(p) +# ptr _typ(p)=="`" _typ(p)<"`" ? +# ptr/arr _typ(p)+0!=_t0 +# arr _typ(p)=="#" _typ(p)>"#" ? +function zorr(A, i, r) +{ + if (i in A) { + _conl("`" i "' in A") + } else { + _conl("`" i "' not in A") + } + r = A[i] == "" && A[i] == 0 + _conl("A[" i "] status is " r) + return + a = a + -a + _conl("``````````````" a "''''''''''''''''") +} + +#_____________________________________________________________________________ +function zzer() +{ + ################################################################ +} +gawk: profile5.awk:3278: warning: regexp escape sequence `\~' is not a known regexp operator +gawk: profile5.awk:3601: warning: regexp escape sequence `\!' is not a known regexp operator +gawk: profile5.awk:3610: warning: regexp escape sequence `\:' is not a known regexp operator +gawk: profile5.awk:3742: warning: regexp escape sequence `\,' is not a known regexp operator diff --git a/src/it/resources/gawk/profile6.awk b/src/it/resources/gawk/profile6.awk new file mode 100644 index 00000000..754f8ae6 --- /dev/null +++ b/src/it/resources/gawk/profile6.awk @@ -0,0 +1,7 @@ +BEGIN { + x = 3 + print -(-x) + Q = "|" + print -3 Q (-4) + print -3 Q (-4) (-5) +} diff --git a/src/it/resources/gawk/profile6.ok b/src/it/resources/gawk/profile6.ok new file mode 100644 index 00000000..0c9486c7 --- /dev/null +++ b/src/it/resources/gawk/profile6.ok @@ -0,0 +1,10 @@ + # BEGIN rule(s) + + BEGIN { + 1 x = 3 + 1 print -(-x) + 1 Q = "|" + 1 print -3 Q (-4) + 1 print -3 Q (-4) (-5) + } + diff --git a/src/it/resources/gawk/profile7.awk b/src/it/resources/gawk/profile7.awk new file mode 100644 index 00000000..815aebb8 --- /dev/null +++ b/src/it/resources/gawk/profile7.awk @@ -0,0 +1,14 @@ +BEGIN { + print 1 / 10 * 10 + print 1 / (10 * 10) + print 1 % 10 * 10 + print 1 % (10 * 10) + print (10 * 5) / 2 + print 10 * (5 / 2) + print 10 - (1 + 3 * 3) + print 10 - (3 * 2 + 1) + a = 5 + b = 3 + print a - 1 - b + print a + 1 - b +} diff --git a/src/it/resources/gawk/profile7.ok b/src/it/resources/gawk/profile7.ok new file mode 100644 index 00000000..10da2eb4 --- /dev/null +++ b/src/it/resources/gawk/profile7.ok @@ -0,0 +1,17 @@ + # BEGIN rule(s) + + BEGIN { + 1 print 1 / 10 * 10 + 1 print 1 / (10 * 10) + 1 print 1 % 10 * 10 + 1 print 1 % (10 * 10) + 1 print (10 * 5) / 2 + 1 print 10 * (5 / 2) + 1 print 10 - (1 + 3 * 3) + 1 print 10 - (3 * 2 + 1) + 1 a = 5 + 1 b = 3 + 1 print a - 1 - b + 1 print a + 1 - b + } + diff --git a/src/it/resources/gawk/profile8.awk b/src/it/resources/gawk/profile8.awk new file mode 100644 index 00000000..68d0622e --- /dev/null +++ b/src/it/resources/gawk/profile8.awk @@ -0,0 +1,4 @@ +{if(0){}else{}} +{while(0){}} +{do{}while(0)} +{for(;;){}} diff --git a/src/it/resources/gawk/profile8.ok b/src/it/resources/gawk/profile8.ok new file mode 100644 index 00000000..2b9c156f --- /dev/null +++ b/src/it/resources/gawk/profile8.ok @@ -0,0 +1,21 @@ +{ + if (0) { + } else { + } +} + +{ + while (0) { + } +} + +{ + do { + } while (0) +} + +{ + for (;;) { + } +} + diff --git a/src/it/resources/gawk/profile9.awk b/src/it/resources/gawk/profile9.awk new file mode 100644 index 00000000..16252cea --- /dev/null +++ b/src/it/resources/gawk/profile9.awk @@ -0,0 +1,9 @@ +# Some +# header +# comments + +# Add up +{ sum += $1 } + +# Print sum +END { print sum } diff --git a/src/it/resources/gawk/profile9.ok b/src/it/resources/gawk/profile9.ok new file mode 100644 index 00000000..34f7a96b --- /dev/null +++ b/src/it/resources/gawk/profile9.ok @@ -0,0 +1,14 @@ +# Some +# header +# comments + +# Add up +{ + sum += $1 +} + +# Print sum +END { + print sum +} + diff --git a/src/test/resources/gawk/prt1eval.awk b/src/it/resources/gawk/prt1eval.awk similarity index 100% rename from src/test/resources/gawk/prt1eval.awk rename to src/it/resources/gawk/prt1eval.awk diff --git a/src/test/resources/gawk/prt1eval.ok b/src/it/resources/gawk/prt1eval.ok similarity index 100% rename from src/test/resources/gawk/prt1eval.ok rename to src/it/resources/gawk/prt1eval.ok diff --git a/src/test/resources/gawk/prtoeval.awk b/src/it/resources/gawk/prtoeval.awk similarity index 100% rename from src/test/resources/gawk/prtoeval.awk rename to src/it/resources/gawk/prtoeval.awk diff --git a/src/test/resources/gawk/prtoeval.ok b/src/it/resources/gawk/prtoeval.ok similarity index 100% rename from src/test/resources/gawk/prtoeval.ok rename to src/it/resources/gawk/prtoeval.ok diff --git a/src/test/resources/gawk/pty1.awk b/src/it/resources/gawk/pty1.awk similarity index 100% rename from src/test/resources/gawk/pty1.awk rename to src/it/resources/gawk/pty1.awk diff --git a/src/test/resources/gawk/pty1.ok b/src/it/resources/gawk/pty1.ok similarity index 100% rename from src/test/resources/gawk/pty1.ok rename to src/it/resources/gawk/pty1.ok diff --git a/src/test/resources/gawk/pty2.awk b/src/it/resources/gawk/pty2.awk similarity index 100% rename from src/test/resources/gawk/pty2.awk rename to src/it/resources/gawk/pty2.awk diff --git a/src/test/resources/gawk/pty2.ok b/src/it/resources/gawk/pty2.ok similarity index 100% rename from src/test/resources/gawk/pty2.ok rename to src/it/resources/gawk/pty2.ok diff --git a/src/it/resources/gawk/rand-mpfr.ok b/src/it/resources/gawk/rand-mpfr.ok new file mode 100644 index 00000000..448f4032 --- /dev/null +++ b/src/it/resources/gawk/rand-mpfr.ok @@ -0,0 +1 @@ + 25 42 47 49 80 5 4 92 59 96 8 63 92 28 41 37 80 51 48 diff --git a/src/it/resources/gawk/rand-mpfr1.ok b/src/it/resources/gawk/rand-mpfr1.ok new file mode 100644 index 00000000..448f4032 --- /dev/null +++ b/src/it/resources/gawk/rand-mpfr1.ok @@ -0,0 +1 @@ + 25 42 47 49 80 5 4 92 59 96 8 63 92 28 41 37 80 51 48 diff --git a/src/test/resources/gawk/rand.awk b/src/it/resources/gawk/rand.awk similarity index 100% rename from src/test/resources/gawk/rand.awk rename to src/it/resources/gawk/rand.awk diff --git a/src/test/resources/gawk/rand.ok b/src/it/resources/gawk/rand.ok similarity index 100% rename from src/test/resources/gawk/rand.ok rename to src/it/resources/gawk/rand.ok diff --git a/src/test/resources/gawk/regexpbrack.ok b/src/it/resources/gawk/randtest.ok similarity index 100% rename from src/test/resources/gawk/regexpbrack.ok rename to src/it/resources/gawk/randtest.ok diff --git a/src/it/resources/gawk/randtest.sh b/src/it/resources/gawk/randtest.sh new file mode 100644 index 00000000..597376a8 --- /dev/null +++ b/src/it/resources/gawk/randtest.sh @@ -0,0 +1,113 @@ +# THIS PURPOSELY DOES NOT HAVE A !# LINE !!!! +# +# Date: Mon, 9 Sep 2013 14:49:43 -0700 +# From: Bob Jewett +# Message-Id: <201309092149.r89Lnh94010909@bill.scs.agilent.com> +# To: arnold@skeeve.com +# Subject: Re: [bug-gawk] Bug in random() in builtin.c +# +# Hi Arnold, +# +# Attached below is a script that tests gawk for this particular +# rand() problem. The pair-wise combinations show a strong +# autocorrelation for a delay of 31 pairs of rand() samples. +# +# The script prints out the measured autocorrelation for a record +# of NSAMPLES pairs. It also prints a fail message at the end if +# it fails. +# +# If you want to see the autocorrelation values, there is a print +# statement that if uncommented will save them to a file. +# +# Please let me know if the mailer screws up the transfer or +# if you have any questions about the test. +# +# Best regards, +# Bob +# +# -------------- test_pair_power_autocorrelation ----------------------- +# +#!/bin/ksh + +#AWK=/bin/gawk + +# ADR: Get AWK from the environment. +# Additional note: This wants ksh/bash for the use of $RANDOM below to +# seed the generator. However, shells that don't provide it won't be +# a problem since gawk will then seed the generator with the time of day, +# as srand() will be called without an argument. + +# large NSAMPLES and NRUNS will bring any correlation out of the noise better +NSAMPLES=1024; MAX_ALLOWED_SIGMA=5; NRUNS=50; + +$AWK 'BEGIN{ + srand('$RANDOM'); + nsamples=('$NSAMPLES'); + max_allowed_sigma=('$MAX_ALLOWED_SIGMA'); + nruns=('$NRUNS'); + for(tau=0;tau "pairpower_corr.data"; + + # Calculate the sigma for the non-zero tau values: + + power_sum=0; + + for(tau=1;tau max_allowed_sigma ) { + print "Tau=", tau ", Autocorr=", corr[tau]/sigma, "sigma"; + passed=0; + } + } + if(!passed) { + print "Test failed." + exit(1); + } + else exit (0); + } + +function abs(abs_input) { return(sqrt(abs_input^2)) ; } +' + +exit 0 diff --git a/src/test/resources/gawk/range1.awk b/src/it/resources/gawk/range1.awk similarity index 100% rename from src/test/resources/gawk/range1.awk rename to src/it/resources/gawk/range1.awk diff --git a/src/test/resources/gawk/range1.in b/src/it/resources/gawk/range1.in similarity index 100% rename from src/test/resources/gawk/range1.in rename to src/it/resources/gawk/range1.in diff --git a/src/test/resources/gawk/range1.ok b/src/it/resources/gawk/range1.ok similarity index 100% rename from src/test/resources/gawk/range1.ok rename to src/it/resources/gawk/range1.ok diff --git a/src/test/resources/gawk/range2.awk b/src/it/resources/gawk/range2.awk similarity index 100% rename from src/test/resources/gawk/range2.awk rename to src/it/resources/gawk/range2.awk diff --git a/src/test/resources/gawk/range2.ok b/src/it/resources/gawk/range2.ok similarity index 100% rename from src/test/resources/gawk/range2.ok rename to src/it/resources/gawk/range2.ok diff --git a/src/test/resources/gawk/readall.ok b/src/it/resources/gawk/readall.ok similarity index 100% rename from src/test/resources/gawk/readall.ok rename to src/it/resources/gawk/readall.ok diff --git a/src/test/resources/gawk/readall1.awk b/src/it/resources/gawk/readall1.awk similarity index 100% rename from src/test/resources/gawk/readall1.awk rename to src/it/resources/gawk/readall1.awk diff --git a/src/test/resources/gawk/readall2.awk b/src/it/resources/gawk/readall2.awk similarity index 100% rename from src/test/resources/gawk/readall2.awk rename to src/it/resources/gawk/readall2.awk diff --git a/src/test/resources/gawk/readbuf.awk b/src/it/resources/gawk/readbuf.awk similarity index 100% rename from src/test/resources/gawk/readbuf.awk rename to src/it/resources/gawk/readbuf.awk diff --git a/src/test/resources/gawk/readbuf.ok b/src/it/resources/gawk/readbuf.ok similarity index 100% rename from src/test/resources/gawk/readbuf.ok rename to src/it/resources/gawk/readbuf.ok diff --git a/src/it/resources/gawk/readdir.awk b/src/it/resources/gawk/readdir.awk new file mode 100644 index 00000000..d407bbce --- /dev/null +++ b/src/it/resources/gawk/readdir.awk @@ -0,0 +1,3 @@ +@load "readdir" + +{ print } diff --git a/src/it/resources/gawk/readdir0.awk b/src/it/resources/gawk/readdir0.awk new file mode 100644 index 00000000..ddd97d61 --- /dev/null +++ b/src/it/resources/gawk/readdir0.awk @@ -0,0 +1,46 @@ +# NOTE: This program is not a generalized parser for the output of 'ls'. +# It's job is to read the output of ls from the gawk source code directory, +# where we know there are no files with spaces in their file names, etc. +BEGIN { + # analyze results from readdir extension + while ((getline x < extout) > 0) { + numrec++ + if ((split(x, f, "/") == 3) && (f[3] == "u")) + num_unknown++ + } + close(extout) + if ((numrec > 0) && (num_unknown == numrec)) { + print "Notice: this filesystem does not appear to support file type information" > "/dev/stderr" + ftype_unknown = 1 + } +} + +BEGIN { + for (i = 1; (getline < dirlist) > 0; i++) { + # inode number is $1, filename is read of record + inode = $1 + $1 = "" + $0 = $0 + sub(/^ */, "") + names[i] = $0 + ino[names[i]] = inode + } + close(dirlist) + + for (j = 1; (getline < longlist) > 0; j++) { + type_let = substr($0, 1, 1) + if (type_let == "-") + type_let = "f" + if (type_let == "l") + type[$(NF-2)] = type_let + else + type[$NF] = type_let + } + close(longlist) + + if (i != j) + printf("mismatch: %d from `ls -afi' and %d from `ls -lna'\n", i, j) > "/dev/stderr" + + for (i = 1; i in names; i++) + printf("%s/%s/%s\n", ino[names[i]], names[i], (ftype_unknown ? "u" : type[names[i]])) +} diff --git a/src/it/resources/gawk/readdir_retest.awk b/src/it/resources/gawk/readdir_retest.awk new file mode 100644 index 00000000..079a9930 --- /dev/null +++ b/src/it/resources/gawk/readdir_retest.awk @@ -0,0 +1,7 @@ +# Test field values after reparsing +FNR == 1 { record1 = $0 } +{ + printf "[%s] [%s] [%s] [%s]\n", $1, $2, $3, $4 + $0 = record1 + printf "[%s] [%s] [%s] [%s]\n", $1, $2, $3, $4 +} diff --git a/src/test/resources/gawk/readfile2.awk b/src/it/resources/gawk/readfile2.awk similarity index 100% rename from src/test/resources/gawk/readfile2.awk rename to src/it/resources/gawk/readfile2.awk diff --git a/src/test/resources/gawk/readfile2.ok b/src/it/resources/gawk/readfile2.ok similarity index 100% rename from src/test/resources/gawk/readfile2.ok rename to src/it/resources/gawk/readfile2.ok diff --git a/src/test/resources/gawk/rebrackloc.awk b/src/it/resources/gawk/rebrackloc.awk similarity index 100% rename from src/test/resources/gawk/rebrackloc.awk rename to src/it/resources/gawk/rebrackloc.awk diff --git a/src/test/resources/gawk/rebrackloc.in b/src/it/resources/gawk/rebrackloc.in similarity index 100% rename from src/test/resources/gawk/rebrackloc.in rename to src/it/resources/gawk/rebrackloc.in diff --git a/src/test/resources/gawk/rebrackloc.ok b/src/it/resources/gawk/rebrackloc.ok similarity index 100% rename from src/test/resources/gawk/rebrackloc.ok rename to src/it/resources/gawk/rebrackloc.ok diff --git a/src/test/resources/gawk/rebt8b1.awk b/src/it/resources/gawk/rebt8b1.awk similarity index 100% rename from src/test/resources/gawk/rebt8b1.awk rename to src/it/resources/gawk/rebt8b1.awk diff --git a/src/test/resources/gawk/rebt8b1.ok b/src/it/resources/gawk/rebt8b1.ok similarity index 100% rename from src/test/resources/gawk/rebt8b1.ok rename to src/it/resources/gawk/rebt8b1.ok diff --git a/src/test/resources/gawk/rebt8b2.awk b/src/it/resources/gawk/rebt8b2.awk similarity index 100% rename from src/test/resources/gawk/rebt8b2.awk rename to src/it/resources/gawk/rebt8b2.awk diff --git a/src/test/resources/gawk/rebt8b2.ok b/src/it/resources/gawk/rebt8b2.ok similarity index 100% rename from src/test/resources/gawk/rebt8b2.ok rename to src/it/resources/gawk/rebt8b2.ok diff --git a/src/test/resources/gawk/rebuf.awk b/src/it/resources/gawk/rebuf.awk similarity index 100% rename from src/test/resources/gawk/rebuf.awk rename to src/it/resources/gawk/rebuf.awk diff --git a/src/test/resources/gawk/rebuf.in b/src/it/resources/gawk/rebuf.in similarity index 100% rename from src/test/resources/gawk/rebuf.in rename to src/it/resources/gawk/rebuf.in diff --git a/src/test/resources/gawk/rebuf.ok b/src/it/resources/gawk/rebuf.ok similarity index 100% rename from src/test/resources/gawk/rebuf.ok rename to src/it/resources/gawk/rebuf.ok diff --git a/src/test/resources/gawk/rebuild.awk b/src/it/resources/gawk/rebuild.awk similarity index 100% rename from src/test/resources/gawk/rebuild.awk rename to src/it/resources/gawk/rebuild.awk diff --git a/src/test/resources/gawk/rebuild.in b/src/it/resources/gawk/rebuild.in similarity index 100% rename from src/test/resources/gawk/rebuild.in rename to src/it/resources/gawk/rebuild.in diff --git a/src/test/resources/gawk/rebuild.ok b/src/it/resources/gawk/rebuild.ok similarity index 100% rename from src/test/resources/gawk/rebuild.ok rename to src/it/resources/gawk/rebuild.ok diff --git a/src/test/resources/gawk/redfilnm.awk b/src/it/resources/gawk/redfilnm.awk similarity index 100% rename from src/test/resources/gawk/redfilnm.awk rename to src/it/resources/gawk/redfilnm.awk diff --git a/src/test/resources/gawk/redfilnm.in b/src/it/resources/gawk/redfilnm.in similarity index 100% rename from src/test/resources/gawk/redfilnm.in rename to src/it/resources/gawk/redfilnm.in diff --git a/src/test/resources/gawk/redfilnm.ok b/src/it/resources/gawk/redfilnm.ok similarity index 100% rename from src/test/resources/gawk/redfilnm.ok rename to src/it/resources/gawk/redfilnm.ok diff --git a/src/it/resources/gawk/reg/Obsolete/exp.awk b/src/it/resources/gawk/reg/Obsolete/exp.awk new file mode 100644 index 00000000..4e707f89 --- /dev/null +++ b/src/it/resources/gawk/reg/Obsolete/exp.awk @@ -0,0 +1 @@ +BEGIN { print exp(0), exp(1000000), exp(0.5) } diff --git a/src/it/resources/gawk/reg/Obsolete/exp.good b/src/it/resources/gawk/reg/Obsolete/exp.good new file mode 100644 index 00000000..07b88537 --- /dev/null +++ b/src/it/resources/gawk/reg/Obsolete/exp.good @@ -0,0 +1,2 @@ +1 gawk: reg/exp.awk:1: warning: exp argument 1e+06 is out of range +Inf 1.64872 diff --git a/src/test/resources/gawk/rri1.ok b/src/it/resources/gawk/reg/Obsolete/exp.in similarity index 100% rename from src/test/resources/gawk/rri1.ok rename to src/it/resources/gawk/reg/Obsolete/exp.in diff --git a/src/it/resources/gawk/reg/Obsolete/log.awk b/src/it/resources/gawk/reg/Obsolete/log.awk new file mode 100644 index 00000000..bcae90b8 --- /dev/null +++ b/src/it/resources/gawk/reg/Obsolete/log.awk @@ -0,0 +1 @@ +BEGIN { print log(0), log(-1), log(100) } diff --git a/src/it/resources/gawk/reg/Obsolete/log.good b/src/it/resources/gawk/reg/Obsolete/log.good new file mode 100644 index 00000000..857ab770 --- /dev/null +++ b/src/it/resources/gawk/reg/Obsolete/log.good @@ -0,0 +1,4 @@ +log: SING error +-Inf gawk: reg/log.awk:1: warning: log called with negative argument -1 +log: DOMAIN error +NaN 4.60517 diff --git a/src/test/resources/gawk/rstest3.ok b/src/it/resources/gawk/reg/Obsolete/log.in similarity index 100% rename from src/test/resources/gawk/rstest3.ok rename to src/it/resources/gawk/reg/Obsolete/log.in diff --git a/src/it/resources/gawk/reg/exp-eq.awk b/src/it/resources/gawk/reg/exp-eq.awk new file mode 100644 index 00000000..fed6a694 --- /dev/null +++ b/src/it/resources/gawk/reg/exp-eq.awk @@ -0,0 +1 @@ +{ $0 ^= 3 ; print $1} diff --git a/src/it/resources/gawk/reg/exp-eq.good b/src/it/resources/gawk/reg/exp-eq.good new file mode 100644 index 00000000..d8d59aa0 --- /dev/null +++ b/src/it/resources/gawk/reg/exp-eq.good @@ -0,0 +1,3 @@ +1 +8 +27 diff --git a/src/it/resources/gawk/reg/exp-eq.in b/src/it/resources/gawk/reg/exp-eq.in new file mode 100644 index 00000000..01e79c32 --- /dev/null +++ b/src/it/resources/gawk/reg/exp-eq.in @@ -0,0 +1,3 @@ +1 +2 +3 diff --git a/src/it/resources/gawk/reg/func.awk b/src/it/resources/gawk/reg/func.awk new file mode 100644 index 00000000..e32cd4e6 --- /dev/null +++ b/src/it/resources/gawk/reg/func.awk @@ -0,0 +1 @@ +BEGIN { print dummy(1) } diff --git a/src/it/resources/gawk/reg/func.good b/src/it/resources/gawk/reg/func.good new file mode 100644 index 00000000..d3c7c715 --- /dev/null +++ b/src/it/resources/gawk/reg/func.good @@ -0,0 +1 @@ +gawk: reg/func.awk:1: fatal: function `dummy' not defined diff --git a/src/test/resources/gawk/stupid2.ok b/src/it/resources/gawk/reg/func.in similarity index 100% rename from src/test/resources/gawk/stupid2.ok rename to src/it/resources/gawk/reg/func.in diff --git a/src/it/resources/gawk/reg/func2.awk b/src/it/resources/gawk/reg/func2.awk new file mode 100644 index 00000000..2abf2c10 --- /dev/null +++ b/src/it/resources/gawk/reg/func2.awk @@ -0,0 +1,2 @@ +function dummy() { ; } +BEGIN { print dummy (1) } diff --git a/src/it/resources/gawk/reg/func2.good b/src/it/resources/gawk/reg/func2.good new file mode 100644 index 00000000..55ea9acd --- /dev/null +++ b/src/it/resources/gawk/reg/func2.good @@ -0,0 +1,2 @@ +gawk: reg/func2.awk:2: error: function `dummy' called with space between name and `(', +or used as a variable or an array diff --git a/src/test/resources/gawk/switch2.ok b/src/it/resources/gawk/reg/func2.in similarity index 100% rename from src/test/resources/gawk/switch2.ok rename to src/it/resources/gawk/reg/func2.in diff --git a/src/test/resources/gawk/regeq.awk b/src/it/resources/gawk/regeq.awk similarity index 100% rename from src/test/resources/gawk/regeq.awk rename to src/it/resources/gawk/regeq.awk diff --git a/src/test/resources/gawk/regeq.in b/src/it/resources/gawk/regeq.in similarity index 100% rename from src/test/resources/gawk/regeq.in rename to src/it/resources/gawk/regeq.in diff --git a/src/test/resources/gawk/regeq.ok b/src/it/resources/gawk/regeq.ok similarity index 100% rename from src/test/resources/gawk/regeq.ok rename to src/it/resources/gawk/regeq.ok diff --git a/src/test/resources/gawk/regex3minus.awk b/src/it/resources/gawk/regex3minus.awk similarity index 100% rename from src/test/resources/gawk/regex3minus.awk rename to src/it/resources/gawk/regex3minus.awk diff --git a/src/test/resources/gawk/regex3minus.ok b/src/it/resources/gawk/regex3minus.ok similarity index 100% rename from src/test/resources/gawk/regex3minus.ok rename to src/it/resources/gawk/regex3minus.ok diff --git a/src/test/resources/gawk/regexpbad.awk b/src/it/resources/gawk/regexpbad.awk similarity index 100% rename from src/test/resources/gawk/regexpbad.awk rename to src/it/resources/gawk/regexpbad.awk diff --git a/src/test/resources/gawk/regexpbad.ok b/src/it/resources/gawk/regexpbad.ok similarity index 100% rename from src/test/resources/gawk/regexpbad.ok rename to src/it/resources/gawk/regexpbad.ok diff --git a/src/test/resources/gawk/regexpbrack.awk b/src/it/resources/gawk/regexpbrack.awk similarity index 100% rename from src/test/resources/gawk/regexpbrack.awk rename to src/it/resources/gawk/regexpbrack.awk diff --git a/src/test/resources/gawk/tradanch.ok b/src/it/resources/gawk/regexpbrack.in similarity index 100% rename from src/test/resources/gawk/tradanch.ok rename to src/it/resources/gawk/regexpbrack.in diff --git a/src/it/resources/gawk/regexpbrack.ok b/src/it/resources/gawk/regexpbrack.ok new file mode 100644 index 00000000..e69de29b diff --git a/src/test/resources/gawk/regexpbrack2.awk b/src/it/resources/gawk/regexpbrack2.awk similarity index 100% rename from src/test/resources/gawk/regexpbrack2.awk rename to src/it/resources/gawk/regexpbrack2.awk diff --git a/src/test/resources/gawk/regexpbrack2.in b/src/it/resources/gawk/regexpbrack2.in similarity index 100% rename from src/test/resources/gawk/regexpbrack2.in rename to src/it/resources/gawk/regexpbrack2.in diff --git a/src/test/resources/gawk/regexpbrack2.ok b/src/it/resources/gawk/regexpbrack2.ok similarity index 100% rename from src/test/resources/gawk/regexpbrack2.ok rename to src/it/resources/gawk/regexpbrack2.ok diff --git a/src/test/resources/gawk/regexprange.awk b/src/it/resources/gawk/regexprange.awk similarity index 100% rename from src/test/resources/gawk/regexprange.awk rename to src/it/resources/gawk/regexprange.awk diff --git a/src/test/resources/gawk/regexprange.ok b/src/it/resources/gawk/regexprange.ok similarity index 100% rename from src/test/resources/gawk/regexprange.ok rename to src/it/resources/gawk/regexprange.ok diff --git a/src/test/resources/gawk/regexsub.awk b/src/it/resources/gawk/regexsub.awk similarity index 100% rename from src/test/resources/gawk/regexsub.awk rename to src/it/resources/gawk/regexsub.awk diff --git a/src/test/resources/gawk/regexsub.ok b/src/it/resources/gawk/regexsub.ok similarity index 100% rename from src/test/resources/gawk/regexsub.ok rename to src/it/resources/gawk/regexsub.ok diff --git a/src/test/resources/gawk/reginttrad.awk b/src/it/resources/gawk/reginttrad.awk similarity index 100% rename from src/test/resources/gawk/reginttrad.awk rename to src/it/resources/gawk/reginttrad.awk diff --git a/src/test/resources/gawk/reginttrad.ok b/src/it/resources/gawk/reginttrad.ok similarity index 100% rename from src/test/resources/gawk/reginttrad.ok rename to src/it/resources/gawk/reginttrad.ok diff --git a/src/test/resources/gawk/regnul1.awk b/src/it/resources/gawk/regnul1.awk similarity index 100% rename from src/test/resources/gawk/regnul1.awk rename to src/it/resources/gawk/regnul1.awk diff --git a/src/test/resources/gawk/regnul1.ok b/src/it/resources/gawk/regnul1.ok similarity index 100% rename from src/test/resources/gawk/regnul1.ok rename to src/it/resources/gawk/regnul1.ok diff --git a/src/test/resources/gawk/regnul2.awk b/src/it/resources/gawk/regnul2.awk similarity index 100% rename from src/test/resources/gawk/regnul2.awk rename to src/it/resources/gawk/regnul2.awk diff --git a/src/test/resources/gawk/regnul2.ok b/src/it/resources/gawk/regnul2.ok similarity index 100% rename from src/test/resources/gawk/regnul2.ok rename to src/it/resources/gawk/regnul2.ok diff --git a/src/test/resources/gawk/regrange.awk b/src/it/resources/gawk/regrange.awk similarity index 100% rename from src/test/resources/gawk/regrange.awk rename to src/it/resources/gawk/regrange.awk diff --git a/src/test/resources/gawk/regrange.ok b/src/it/resources/gawk/regrange.ok similarity index 100% rename from src/test/resources/gawk/regrange.ok rename to src/it/resources/gawk/regrange.ok diff --git a/src/test/resources/gawk/regtest.sh b/src/it/resources/gawk/regtest.sh similarity index 100% rename from src/test/resources/gawk/regtest.sh rename to src/it/resources/gawk/regtest.sh diff --git a/src/test/resources/gawk/regx8bit.awk b/src/it/resources/gawk/regx8bit.awk similarity index 100% rename from src/test/resources/gawk/regx8bit.awk rename to src/it/resources/gawk/regx8bit.awk diff --git a/src/test/resources/gawk/regx8bit.ok b/src/it/resources/gawk/regx8bit.ok similarity index 100% rename from src/test/resources/gawk/regx8bit.ok rename to src/it/resources/gawk/regx8bit.ok diff --git a/src/test/resources/gawk/reindops.awk b/src/it/resources/gawk/reindops.awk similarity index 100% rename from src/test/resources/gawk/reindops.awk rename to src/it/resources/gawk/reindops.awk diff --git a/src/test/resources/gawk/reindops.in b/src/it/resources/gawk/reindops.in similarity index 100% rename from src/test/resources/gawk/reindops.in rename to src/it/resources/gawk/reindops.in diff --git a/src/test/resources/gawk/reindops.ok b/src/it/resources/gawk/reindops.ok similarity index 100% rename from src/test/resources/gawk/reindops.ok rename to src/it/resources/gawk/reindops.ok diff --git a/src/test/resources/gawk/reint.awk b/src/it/resources/gawk/reint.awk similarity index 100% rename from src/test/resources/gawk/reint.awk rename to src/it/resources/gawk/reint.awk diff --git a/src/test/resources/gawk/reint.in b/src/it/resources/gawk/reint.in similarity index 100% rename from src/test/resources/gawk/reint.in rename to src/it/resources/gawk/reint.in diff --git a/src/test/resources/gawk/reint.ok b/src/it/resources/gawk/reint.ok similarity index 100% rename from src/test/resources/gawk/reint.ok rename to src/it/resources/gawk/reint.ok diff --git a/src/test/resources/gawk/reint2.awk b/src/it/resources/gawk/reint2.awk similarity index 100% rename from src/test/resources/gawk/reint2.awk rename to src/it/resources/gawk/reint2.awk diff --git a/src/test/resources/gawk/reint2.in b/src/it/resources/gawk/reint2.in similarity index 100% rename from src/test/resources/gawk/reint2.in rename to src/it/resources/gawk/reint2.in diff --git a/src/test/resources/gawk/reint2.ok b/src/it/resources/gawk/reint2.ok similarity index 100% rename from src/test/resources/gawk/reint2.ok rename to src/it/resources/gawk/reint2.ok diff --git a/src/test/resources/gawk/reparse.awk b/src/it/resources/gawk/reparse.awk similarity index 100% rename from src/test/resources/gawk/reparse.awk rename to src/it/resources/gawk/reparse.awk diff --git a/src/test/resources/gawk/reparse.in b/src/it/resources/gawk/reparse.in similarity index 100% rename from src/test/resources/gawk/reparse.in rename to src/it/resources/gawk/reparse.in diff --git a/src/test/resources/gawk/reparse.ok b/src/it/resources/gawk/reparse.ok similarity index 100% rename from src/test/resources/gawk/reparse.ok rename to src/it/resources/gawk/reparse.ok diff --git a/src/test/resources/gawk/resplit.awk b/src/it/resources/gawk/resplit.awk similarity index 100% rename from src/test/resources/gawk/resplit.awk rename to src/it/resources/gawk/resplit.awk diff --git a/src/test/resources/gawk/resplit.in b/src/it/resources/gawk/resplit.in similarity index 100% rename from src/test/resources/gawk/resplit.in rename to src/it/resources/gawk/resplit.in diff --git a/src/test/resources/gawk/resplit.ok b/src/it/resources/gawk/resplit.ok similarity index 100% rename from src/test/resources/gawk/resplit.ok rename to src/it/resources/gawk/resplit.ok diff --git a/src/test/resources/gawk/revout.awk b/src/it/resources/gawk/revout.awk similarity index 100% rename from src/test/resources/gawk/revout.awk rename to src/it/resources/gawk/revout.awk diff --git a/src/test/resources/gawk/revout.ok b/src/it/resources/gawk/revout.ok similarity index 100% rename from src/test/resources/gawk/revout.ok rename to src/it/resources/gawk/revout.ok diff --git a/src/test/resources/gawk/revtwoway.awk b/src/it/resources/gawk/revtwoway.awk similarity index 100% rename from src/test/resources/gawk/revtwoway.awk rename to src/it/resources/gawk/revtwoway.awk diff --git a/src/test/resources/gawk/revtwoway.ok b/src/it/resources/gawk/revtwoway.ok similarity index 100% rename from src/test/resources/gawk/revtwoway.ok rename to src/it/resources/gawk/revtwoway.ok diff --git a/src/test/resources/gawk/rri1.awk b/src/it/resources/gawk/rri1.awk similarity index 100% rename from src/test/resources/gawk/rri1.awk rename to src/it/resources/gawk/rri1.awk diff --git a/src/test/resources/gawk/rri1.in b/src/it/resources/gawk/rri1.in similarity index 100% rename from src/test/resources/gawk/rri1.in rename to src/it/resources/gawk/rri1.in diff --git a/src/it/resources/gawk/rri1.ok b/src/it/resources/gawk/rri1.ok new file mode 100644 index 00000000..e69de29b diff --git a/src/test/resources/gawk/rs.awk b/src/it/resources/gawk/rs.awk similarity index 100% rename from src/test/resources/gawk/rs.awk rename to src/it/resources/gawk/rs.awk diff --git a/src/test/resources/gawk/rs.in b/src/it/resources/gawk/rs.in similarity index 100% rename from src/test/resources/gawk/rs.in rename to src/it/resources/gawk/rs.in diff --git a/src/test/resources/gawk/rs.ok b/src/it/resources/gawk/rs.ok similarity index 100% rename from src/test/resources/gawk/rs.ok rename to src/it/resources/gawk/rs.ok diff --git a/src/test/resources/gawk/rscompat.awk b/src/it/resources/gawk/rscompat.awk similarity index 100% rename from src/test/resources/gawk/rscompat.awk rename to src/it/resources/gawk/rscompat.awk diff --git a/src/test/resources/gawk/rscompat.in b/src/it/resources/gawk/rscompat.in similarity index 100% rename from src/test/resources/gawk/rscompat.in rename to src/it/resources/gawk/rscompat.in diff --git a/src/test/resources/gawk/rscompat.ok b/src/it/resources/gawk/rscompat.ok similarity index 100% rename from src/test/resources/gawk/rscompat.ok rename to src/it/resources/gawk/rscompat.ok diff --git a/src/test/resources/gawk/rsgetline.awk b/src/it/resources/gawk/rsgetline.awk similarity index 100% rename from src/test/resources/gawk/rsgetline.awk rename to src/it/resources/gawk/rsgetline.awk diff --git a/src/test/resources/gawk/rsgetline.in b/src/it/resources/gawk/rsgetline.in similarity index 100% rename from src/test/resources/gawk/rsgetline.in rename to src/it/resources/gawk/rsgetline.in diff --git a/src/test/resources/gawk/rsgetline.ok b/src/it/resources/gawk/rsgetline.ok similarity index 100% rename from src/test/resources/gawk/rsgetline.ok rename to src/it/resources/gawk/rsgetline.ok diff --git a/src/test/resources/gawk/rsglstdin.ok b/src/it/resources/gawk/rsglstdin.ok similarity index 100% rename from src/test/resources/gawk/rsglstdin.ok rename to src/it/resources/gawk/rsglstdin.ok diff --git a/src/test/resources/gawk/rsnul1nl.awk b/src/it/resources/gawk/rsnul1nl.awk similarity index 100% rename from src/test/resources/gawk/rsnul1nl.awk rename to src/it/resources/gawk/rsnul1nl.awk diff --git a/src/test/resources/gawk/rsnul1nl.in b/src/it/resources/gawk/rsnul1nl.in similarity index 100% rename from src/test/resources/gawk/rsnul1nl.in rename to src/it/resources/gawk/rsnul1nl.in diff --git a/src/test/resources/gawk/rsnul1nl.ok b/src/it/resources/gawk/rsnul1nl.ok similarity index 100% rename from src/test/resources/gawk/rsnul1nl.ok rename to src/it/resources/gawk/rsnul1nl.ok diff --git a/src/test/resources/gawk/rsnulbig.ok b/src/it/resources/gawk/rsnulbig.ok similarity index 100% rename from src/test/resources/gawk/rsnulbig.ok rename to src/it/resources/gawk/rsnulbig.ok diff --git a/src/test/resources/gawk/rsnulbig2.ok b/src/it/resources/gawk/rsnulbig2.ok similarity index 100% rename from src/test/resources/gawk/rsnulbig2.ok rename to src/it/resources/gawk/rsnulbig2.ok diff --git a/src/test/resources/gawk/rsnullre.awk b/src/it/resources/gawk/rsnullre.awk similarity index 74% rename from src/test/resources/gawk/rsnullre.awk rename to src/it/resources/gawk/rsnullre.awk index 11f000a3..72b156f2 100644 --- a/src/test/resources/gawk/rsnullre.awk +++ b/src/it/resources/gawk/rsnullre.awk @@ -1,5 +1,5 @@ BEGIN { - RS = "" # RS = "()" + RS = "()" } { printf("<<%s>>\n", $0) ; printf("<%s>\n", RT) } diff --git a/src/test/resources/gawk/rsnullre.in b/src/it/resources/gawk/rsnullre.in similarity index 100% rename from src/test/resources/gawk/rsnullre.in rename to src/it/resources/gawk/rsnullre.in diff --git a/src/test/resources/gawk/rsnullre.ok b/src/it/resources/gawk/rsnullre.ok similarity index 100% rename from src/test/resources/gawk/rsnullre.ok rename to src/it/resources/gawk/rsnullre.ok diff --git a/src/test/resources/gawk/rsnulw.awk b/src/it/resources/gawk/rsnulw.awk similarity index 100% rename from src/test/resources/gawk/rsnulw.awk rename to src/it/resources/gawk/rsnulw.awk diff --git a/src/test/resources/gawk/rsnulw.in b/src/it/resources/gawk/rsnulw.in similarity index 100% rename from src/test/resources/gawk/rsnulw.in rename to src/it/resources/gawk/rsnulw.in diff --git a/src/test/resources/gawk/rsnulw.ok b/src/it/resources/gawk/rsnulw.ok similarity index 100% rename from src/test/resources/gawk/rsnulw.ok rename to src/it/resources/gawk/rsnulw.ok diff --git a/src/test/resources/gawk/rsstart1.awk b/src/it/resources/gawk/rsstart1.awk similarity index 100% rename from src/test/resources/gawk/rsstart1.awk rename to src/it/resources/gawk/rsstart1.awk diff --git a/src/test/resources/gawk/rsstart1.in b/src/it/resources/gawk/rsstart1.in similarity index 100% rename from src/test/resources/gawk/rsstart1.in rename to src/it/resources/gawk/rsstart1.in diff --git a/src/test/resources/gawk/rsstart1.ok b/src/it/resources/gawk/rsstart1.ok similarity index 100% rename from src/test/resources/gawk/rsstart1.ok rename to src/it/resources/gawk/rsstart1.ok diff --git a/src/test/resources/gawk/rsstart2.awk b/src/it/resources/gawk/rsstart2.awk similarity index 100% rename from src/test/resources/gawk/rsstart2.awk rename to src/it/resources/gawk/rsstart2.awk diff --git a/src/test/resources/gawk/rsstart2.in b/src/it/resources/gawk/rsstart2.in similarity index 100% rename from src/test/resources/gawk/rsstart2.in rename to src/it/resources/gawk/rsstart2.in diff --git a/src/test/resources/gawk/rsstart2.ok b/src/it/resources/gawk/rsstart2.ok similarity index 100% rename from src/test/resources/gawk/rsstart2.ok rename to src/it/resources/gawk/rsstart2.ok diff --git a/src/test/resources/gawk/rsstart3.ok b/src/it/resources/gawk/rsstart3.ok similarity index 100% rename from src/test/resources/gawk/rsstart3.ok rename to src/it/resources/gawk/rsstart3.ok diff --git a/src/test/resources/gawk/rstest1.awk b/src/it/resources/gawk/rstest1.awk similarity index 100% rename from src/test/resources/gawk/rstest1.awk rename to src/it/resources/gawk/rstest1.awk diff --git a/src/test/resources/gawk/rstest1.ok b/src/it/resources/gawk/rstest1.ok similarity index 100% rename from src/test/resources/gawk/rstest1.ok rename to src/it/resources/gawk/rstest1.ok diff --git a/src/test/resources/gawk/rstest2.awk b/src/it/resources/gawk/rstest2.awk similarity index 100% rename from src/test/resources/gawk/rstest2.awk rename to src/it/resources/gawk/rstest2.awk diff --git a/src/test/resources/gawk/rstest2.ok b/src/it/resources/gawk/rstest2.ok similarity index 100% rename from src/test/resources/gawk/rstest2.ok rename to src/it/resources/gawk/rstest2.ok diff --git a/src/test/resources/gawk/rstest3.awk b/src/it/resources/gawk/rstest3.awk similarity index 100% rename from src/test/resources/gawk/rstest3.awk rename to src/it/resources/gawk/rstest3.awk diff --git a/src/it/resources/gawk/rstest3.ok b/src/it/resources/gawk/rstest3.ok new file mode 100644 index 00000000..e69de29b diff --git a/src/test/resources/gawk/rstest4.awk b/src/it/resources/gawk/rstest4.awk similarity index 100% rename from src/test/resources/gawk/rstest4.awk rename to src/it/resources/gawk/rstest4.awk diff --git a/src/test/resources/gawk/rstest4.ok b/src/it/resources/gawk/rstest4.ok similarity index 100% rename from src/test/resources/gawk/rstest4.ok rename to src/it/resources/gawk/rstest4.ok diff --git a/src/test/resources/gawk/rstest5.awk b/src/it/resources/gawk/rstest5.awk similarity index 100% rename from src/test/resources/gawk/rstest5.awk rename to src/it/resources/gawk/rstest5.awk diff --git a/src/test/resources/gawk/rstest5.ok b/src/it/resources/gawk/rstest5.ok similarity index 100% rename from src/test/resources/gawk/rstest5.ok rename to src/it/resources/gawk/rstest5.ok diff --git a/src/test/resources/gawk/rstest6.awk b/src/it/resources/gawk/rstest6.awk similarity index 100% rename from src/test/resources/gawk/rstest6.awk rename to src/it/resources/gawk/rstest6.awk diff --git a/src/test/resources/gawk/rstest6.in b/src/it/resources/gawk/rstest6.in similarity index 100% rename from src/test/resources/gawk/rstest6.in rename to src/it/resources/gawk/rstest6.in diff --git a/src/test/resources/gawk/rstest6.ok b/src/it/resources/gawk/rstest6.ok similarity index 100% rename from src/test/resources/gawk/rstest6.ok rename to src/it/resources/gawk/rstest6.ok diff --git a/src/test/resources/gawk/rswhite.awk b/src/it/resources/gawk/rswhite.awk similarity index 100% rename from src/test/resources/gawk/rswhite.awk rename to src/it/resources/gawk/rswhite.awk diff --git a/src/test/resources/gawk/rswhite.in b/src/it/resources/gawk/rswhite.in similarity index 100% rename from src/test/resources/gawk/rswhite.in rename to src/it/resources/gawk/rswhite.in diff --git a/src/test/resources/gawk/rswhite.ok b/src/it/resources/gawk/rswhite.ok similarity index 100% rename from src/test/resources/gawk/rswhite.ok rename to src/it/resources/gawk/rswhite.ok diff --git a/src/test/resources/gawk/rtlen.ok b/src/it/resources/gawk/rtlen.ok similarity index 100% rename from src/test/resources/gawk/rtlen.ok rename to src/it/resources/gawk/rtlen.ok diff --git a/src/test/resources/gawk/rtlen.sh b/src/it/resources/gawk/rtlen.sh similarity index 100% rename from src/test/resources/gawk/rtlen.sh rename to src/it/resources/gawk/rtlen.sh diff --git a/src/test/resources/gawk/rtlen01.ok b/src/it/resources/gawk/rtlen01.ok similarity index 100% rename from src/test/resources/gawk/rtlen01.ok rename to src/it/resources/gawk/rtlen01.ok diff --git a/src/test/resources/gawk/rtlen01.sh b/src/it/resources/gawk/rtlen01.sh similarity index 100% rename from src/test/resources/gawk/rtlen01.sh rename to src/it/resources/gawk/rtlen01.sh diff --git a/src/test/resources/gawk/rtlenmb.ok b/src/it/resources/gawk/rtlenmb.ok similarity index 100% rename from src/test/resources/gawk/rtlenmb.ok rename to src/it/resources/gawk/rtlenmb.ok diff --git a/src/test/resources/gawk/rwarray.awk b/src/it/resources/gawk/rwarray.awk similarity index 100% rename from src/test/resources/gawk/rwarray.awk rename to src/it/resources/gawk/rwarray.awk diff --git a/src/test/resources/gawk/rwarray.in b/src/it/resources/gawk/rwarray.in similarity index 100% rename from src/test/resources/gawk/rwarray.in rename to src/it/resources/gawk/rwarray.in diff --git a/src/test/resources/gawk/rwarray.ok b/src/it/resources/gawk/rwarray.ok similarity index 100% rename from src/test/resources/gawk/rwarray.ok rename to src/it/resources/gawk/rwarray.ok diff --git a/src/test/resources/gawk/sandbox1.awk b/src/it/resources/gawk/sandbox1.awk similarity index 100% rename from src/test/resources/gawk/sandbox1.awk rename to src/it/resources/gawk/sandbox1.awk diff --git a/src/test/resources/gawk/sandbox1.ok b/src/it/resources/gawk/sandbox1.ok similarity index 100% rename from src/test/resources/gawk/sandbox1.ok rename to src/it/resources/gawk/sandbox1.ok diff --git a/src/test/resources/gawk/scalar.awk b/src/it/resources/gawk/scalar.awk similarity index 100% rename from src/test/resources/gawk/scalar.awk rename to src/it/resources/gawk/scalar.awk diff --git a/src/test/resources/gawk/scalar.ok b/src/it/resources/gawk/scalar.ok similarity index 100% rename from src/test/resources/gawk/scalar.ok rename to src/it/resources/gawk/scalar.ok diff --git a/src/test/resources/gawk/sclforin.awk b/src/it/resources/gawk/sclforin.awk similarity index 100% rename from src/test/resources/gawk/sclforin.awk rename to src/it/resources/gawk/sclforin.awk diff --git a/src/test/resources/gawk/sclforin.ok b/src/it/resources/gawk/sclforin.ok similarity index 100% rename from src/test/resources/gawk/sclforin.ok rename to src/it/resources/gawk/sclforin.ok diff --git a/src/test/resources/gawk/sclifin.awk b/src/it/resources/gawk/sclifin.awk similarity index 100% rename from src/test/resources/gawk/sclifin.awk rename to src/it/resources/gawk/sclifin.awk diff --git a/src/test/resources/gawk/sclifin.ok b/src/it/resources/gawk/sclifin.ok similarity index 100% rename from src/test/resources/gawk/sclifin.ok rename to src/it/resources/gawk/sclifin.ok diff --git a/src/test/resources/gawk/setrec0.awk b/src/it/resources/gawk/setrec0.awk similarity index 100% rename from src/test/resources/gawk/setrec0.awk rename to src/it/resources/gawk/setrec0.awk diff --git a/src/test/resources/gawk/setrec0.in b/src/it/resources/gawk/setrec0.in similarity index 100% rename from src/test/resources/gawk/setrec0.in rename to src/it/resources/gawk/setrec0.in diff --git a/src/test/resources/gawk/setrec0.ok b/src/it/resources/gawk/setrec0.ok similarity index 100% rename from src/test/resources/gawk/setrec0.ok rename to src/it/resources/gawk/setrec0.ok diff --git a/src/test/resources/gawk/setrec1.awk b/src/it/resources/gawk/setrec1.awk similarity index 100% rename from src/test/resources/gawk/setrec1.awk rename to src/it/resources/gawk/setrec1.awk diff --git a/src/test/resources/gawk/setrec1.ok b/src/it/resources/gawk/setrec1.ok similarity index 100% rename from src/test/resources/gawk/setrec1.ok rename to src/it/resources/gawk/setrec1.ok diff --git a/src/test/resources/gawk/shadow.awk b/src/it/resources/gawk/shadow.awk similarity index 100% rename from src/test/resources/gawk/shadow.awk rename to src/it/resources/gawk/shadow.awk diff --git a/src/test/resources/gawk/shadow.ok b/src/it/resources/gawk/shadow.ok similarity index 100% rename from src/test/resources/gawk/shadow.ok rename to src/it/resources/gawk/shadow.ok diff --git a/src/test/resources/gawk/shadowbuiltin.awk b/src/it/resources/gawk/shadowbuiltin.awk similarity index 100% rename from src/test/resources/gawk/shadowbuiltin.awk rename to src/it/resources/gawk/shadowbuiltin.awk diff --git a/src/test/resources/gawk/shadowbuiltin.ok b/src/it/resources/gawk/shadowbuiltin.ok similarity index 100% rename from src/test/resources/gawk/shadowbuiltin.ok rename to src/it/resources/gawk/shadowbuiltin.ok diff --git a/src/test/resources/gawk/sigpipe1.awk b/src/it/resources/gawk/sigpipe1.awk similarity index 100% rename from src/test/resources/gawk/sigpipe1.awk rename to src/it/resources/gawk/sigpipe1.awk diff --git a/src/test/resources/gawk/sigpipe1.ok b/src/it/resources/gawk/sigpipe1.ok similarity index 100% rename from src/test/resources/gawk/sigpipe1.ok rename to src/it/resources/gawk/sigpipe1.ok diff --git a/src/it/resources/gawk/skips.properties b/src/it/resources/gawk/skips.properties new file mode 100644 index 00000000..1663007c --- /dev/null +++ b/src/it/resources/gawk/skips.properties @@ -0,0 +1,71 @@ +# Generated GAWK targets that the metadata-driven Jawk harness intentionally skips. +# The suite validates that every unsupported Maketests rule is listed here. + +# Shell-script targets require external shell execution. +cmdlinefsbacknl = Shell-script target generated by Maketests; the in-process Jawk harness does not execute external shell scripts. +exit = Shell-script target generated by Maketests; the in-process Jawk harness does not execute external shell scripts. +fflush = Shell-script target generated by Maketests; the in-process Jawk harness does not execute external shell scripts. +localenl = Shell-script target generated by Maketests; the in-process Jawk harness does not execute external shell scripts. +modifiers = Shell-script target generated by Maketests; the in-process Jawk harness does not execute external shell scripts. +next = Shell-script target generated by Maketests; the in-process Jawk harness does not execute external shell scripts. +randtest = Shell-script target generated by Maketests; the in-process Jawk harness does not execute external shell scripts. +rtlen = Shell-script target generated by Maketests; the in-process Jawk harness does not execute external shell scripts. +rtlen01 = Shell-script target generated by Maketests; the in-process Jawk harness does not execute external shell scripts. + +# Jawk does not expose gawk's lint or traditional-mode diagnostics. +defref = gawk's --lint diagnostics are not implemented by Jawk. +lintexp = gawk's --lint diagnostics are not implemented by Jawk. +lintindex = gawk's --lint diagnostics are not implemented by Jawk. +lintint = gawk's --lint diagnostics are not implemented by Jawk. +lintlength = gawk's --lint diagnostics are not implemented by Jawk. +lintold = gawk's --lint-old diagnostics are not implemented by Jawk. +lintplus = gawk's --lint diagnostics are not implemented by Jawk. +lintwarn = gawk's --lint diagnostics are not implemented by Jawk. +litoct = gawk's --traditional mode is not implemented by Jawk. +noeffect = gawk's --lint diagnostics are not implemented by Jawk. +nofmtch = gawk's --lint diagnostics are not implemented by Jawk. +nonl = gawk's --lint diagnostics are not implemented by Jawk. +rscompat = gawk's --traditional mode is not implemented by Jawk. +shadow = gawk's --lint diagnostics are not implemented by Jawk. +tradanch = gawk's --traditional mode is not implemented by Jawk. +uninit2 = gawk's --lint diagnostics are not implemented by Jawk. +uninit3 = gawk's --lint diagnostics are not implemented by Jawk. +uninit4 = gawk's --lint diagnostics are not implemented by Jawk. +uninit5 = gawk's --lint diagnostics are not implemented by Jawk. +uninitialized = gawk's --lint diagnostics are not implemented by Jawk. + +# Jawk does not implement gawk's CSV, debugger, pretty-print, or bignum CLI modes. +csv1 = gawk's --csv mode is not implemented by Jawk. +csv2 = gawk's --csv mode is not implemented by Jawk. +csv3 = gawk's --csv mode is not implemented by Jawk. +csvodd = gawk's --csv mode is not implemented by Jawk. +dbugeval2 = gawk's --debug mode is not implemented by Jawk. +dbugeval3 = gawk's --debug mode is not implemented by Jawk. +dbugeval4 = gawk's --debug mode is not implemented by Jawk. +dbugtypedre1 = gawk's --debug mode is not implemented by Jawk. +dbugtypedre2 = gawk's --debug mode is not implemented by Jawk. +mpfrbigint = gawk's -M bignum mode is not implemented by Jawk. +mpfrbigint2 = gawk's -M bignum mode is not implemented by Jawk. +mpfrcase = gawk's -M bignum mode is not implemented by Jawk. +mpfrcase2 = gawk's -M bignum mode is not implemented by Jawk. +mpfrfield = gawk's -M bignum mode is not implemented by Jawk. +mpfrnegzero = gawk's -M bignum mode is not implemented by Jawk. +mpfrnegzero2 = gawk's -M bignum mode is not implemented by Jawk. +mpfrnonum = gawk's -M bignum mode is not implemented by Jawk. +mpfrnr = gawk's -M bignum mode is not implemented by Jawk. +mpfrrem = gawk's -M bignum mode is not implemented by Jawk. +mpfrrndeval = gawk's -M bignum mode is not implemented by Jawk. +mpfrstrtonum = gawk's -M bignum mode is not implemented by Jawk. +mpgforcenum = gawk's -M bignum mode is not implemented by Jawk. +nsprof1 = gawk's --pretty-print mode is not implemented by Jawk. +nsprof2 = gawk's --pretty-print mode is not implemented by Jawk. +profile10 = gawk's --pretty-print mode is not implemented by Jawk. +profile11 = gawk's --pretty-print mode is not implemented by Jawk. +profile13 = gawk's --pretty-print mode is not implemented by Jawk. +profile14 = gawk's --pretty-print mode is not implemented by Jawk. +profile15 = gawk's --pretty-print mode is not implemented by Jawk. +profile16 = gawk's --pretty-print mode is not implemented by Jawk. +profile17 = gawk's --pretty-print mode is not implemented by Jawk. +profile4 = gawk's --pretty-print mode is not implemented by Jawk. +profile8 = gawk's --pretty-print mode is not implemented by Jawk. +profile9 = gawk's --pretty-print mode is not implemented by Jawk. diff --git a/src/test/resources/gawk/sort1.awk b/src/it/resources/gawk/sort1.awk similarity index 100% rename from src/test/resources/gawk/sort1.awk rename to src/it/resources/gawk/sort1.awk diff --git a/src/test/resources/gawk/sort1.ok b/src/it/resources/gawk/sort1.ok similarity index 100% rename from src/test/resources/gawk/sort1.ok rename to src/it/resources/gawk/sort1.ok diff --git a/src/test/resources/gawk/sortempty.awk b/src/it/resources/gawk/sortempty.awk similarity index 100% rename from src/test/resources/gawk/sortempty.awk rename to src/it/resources/gawk/sortempty.awk diff --git a/src/test/resources/gawk/sortempty.ok b/src/it/resources/gawk/sortempty.ok similarity index 100% rename from src/test/resources/gawk/sortempty.ok rename to src/it/resources/gawk/sortempty.ok diff --git a/src/test/resources/gawk/sortfor.awk b/src/it/resources/gawk/sortfor.awk similarity index 100% rename from src/test/resources/gawk/sortfor.awk rename to src/it/resources/gawk/sortfor.awk diff --git a/src/test/resources/gawk/sortfor.in b/src/it/resources/gawk/sortfor.in similarity index 100% rename from src/test/resources/gawk/sortfor.in rename to src/it/resources/gawk/sortfor.in diff --git a/src/test/resources/gawk/sortfor.ok b/src/it/resources/gawk/sortfor.ok similarity index 100% rename from src/test/resources/gawk/sortfor.ok rename to src/it/resources/gawk/sortfor.ok diff --git a/src/test/resources/gawk/sortfor2.awk b/src/it/resources/gawk/sortfor2.awk similarity index 100% rename from src/test/resources/gawk/sortfor2.awk rename to src/it/resources/gawk/sortfor2.awk diff --git a/src/test/resources/gawk/sortfor2.in b/src/it/resources/gawk/sortfor2.in similarity index 100% rename from src/test/resources/gawk/sortfor2.in rename to src/it/resources/gawk/sortfor2.in diff --git a/src/test/resources/gawk/sortfor2.ok b/src/it/resources/gawk/sortfor2.ok similarity index 100% rename from src/test/resources/gawk/sortfor2.ok rename to src/it/resources/gawk/sortfor2.ok diff --git a/src/test/resources/gawk/sortglos.awk b/src/it/resources/gawk/sortglos.awk similarity index 100% rename from src/test/resources/gawk/sortglos.awk rename to src/it/resources/gawk/sortglos.awk diff --git a/src/test/resources/gawk/sortglos.in b/src/it/resources/gawk/sortglos.in similarity index 100% rename from src/test/resources/gawk/sortglos.in rename to src/it/resources/gawk/sortglos.in diff --git a/src/test/resources/gawk/sortglos.ok b/src/it/resources/gawk/sortglos.ok similarity index 100% rename from src/test/resources/gawk/sortglos.ok rename to src/it/resources/gawk/sortglos.ok diff --git a/src/test/resources/gawk/sortu.awk b/src/it/resources/gawk/sortu.awk similarity index 100% rename from src/test/resources/gawk/sortu.awk rename to src/it/resources/gawk/sortu.awk diff --git a/src/test/resources/gawk/sortu.ok b/src/it/resources/gawk/sortu.ok similarity index 100% rename from src/test/resources/gawk/sortu.ok rename to src/it/resources/gawk/sortu.ok diff --git a/src/test/resources/gawk/sourcesplit.ok b/src/it/resources/gawk/sourcesplit.ok similarity index 100% rename from src/test/resources/gawk/sourcesplit.ok rename to src/it/resources/gawk/sourcesplit.ok diff --git a/src/test/resources/gawk/space.ok b/src/it/resources/gawk/space.ok similarity index 100% rename from src/test/resources/gawk/space.ok rename to src/it/resources/gawk/space.ok diff --git a/src/test/resources/gawk/spacere.awk b/src/it/resources/gawk/spacere.awk similarity index 100% rename from src/test/resources/gawk/spacere.awk rename to src/it/resources/gawk/spacere.awk diff --git a/src/test/resources/gawk/spacere.ok b/src/it/resources/gawk/spacere.ok similarity index 100% rename from src/test/resources/gawk/spacere.ok rename to src/it/resources/gawk/spacere.ok diff --git a/src/test/resources/gawk/split_after_fpat.awk b/src/it/resources/gawk/split_after_fpat.awk similarity index 100% rename from src/test/resources/gawk/split_after_fpat.awk rename to src/it/resources/gawk/split_after_fpat.awk diff --git a/src/test/resources/gawk/split_after_fpat.in b/src/it/resources/gawk/split_after_fpat.in similarity index 100% rename from src/test/resources/gawk/split_after_fpat.in rename to src/it/resources/gawk/split_after_fpat.in diff --git a/src/test/resources/gawk/split_after_fpat.ok b/src/it/resources/gawk/split_after_fpat.ok similarity index 100% rename from src/test/resources/gawk/split_after_fpat.ok rename to src/it/resources/gawk/split_after_fpat.ok diff --git a/src/test/resources/gawk/splitarg4.awk b/src/it/resources/gawk/splitarg4.awk similarity index 100% rename from src/test/resources/gawk/splitarg4.awk rename to src/it/resources/gawk/splitarg4.awk diff --git a/src/test/resources/gawk/splitarg4.in b/src/it/resources/gawk/splitarg4.in similarity index 100% rename from src/test/resources/gawk/splitarg4.in rename to src/it/resources/gawk/splitarg4.in diff --git a/src/test/resources/gawk/splitarg4.ok b/src/it/resources/gawk/splitarg4.ok similarity index 100% rename from src/test/resources/gawk/splitarg4.ok rename to src/it/resources/gawk/splitarg4.ok diff --git a/src/test/resources/gawk/splitargv.awk b/src/it/resources/gawk/splitargv.awk similarity index 100% rename from src/test/resources/gawk/splitargv.awk rename to src/it/resources/gawk/splitargv.awk diff --git a/src/test/resources/gawk/splitargv.in b/src/it/resources/gawk/splitargv.in similarity index 100% rename from src/test/resources/gawk/splitargv.in rename to src/it/resources/gawk/splitargv.in diff --git a/src/test/resources/gawk/splitargv.ok b/src/it/resources/gawk/splitargv.ok similarity index 100% rename from src/test/resources/gawk/splitargv.ok rename to src/it/resources/gawk/splitargv.ok diff --git a/src/test/resources/gawk/splitarr.awk b/src/it/resources/gawk/splitarr.awk similarity index 100% rename from src/test/resources/gawk/splitarr.awk rename to src/it/resources/gawk/splitarr.awk diff --git a/src/test/resources/gawk/splitarr.ok b/src/it/resources/gawk/splitarr.ok similarity index 100% rename from src/test/resources/gawk/splitarr.ok rename to src/it/resources/gawk/splitarr.ok diff --git a/src/test/resources/gawk/splitdef.awk b/src/it/resources/gawk/splitdef.awk similarity index 100% rename from src/test/resources/gawk/splitdef.awk rename to src/it/resources/gawk/splitdef.awk diff --git a/src/test/resources/gawk/splitdef.ok b/src/it/resources/gawk/splitdef.ok similarity index 100% rename from src/test/resources/gawk/splitdef.ok rename to src/it/resources/gawk/splitdef.ok diff --git a/src/test/resources/gawk/splitvar.awk b/src/it/resources/gawk/splitvar.awk similarity index 100% rename from src/test/resources/gawk/splitvar.awk rename to src/it/resources/gawk/splitvar.awk diff --git a/src/test/resources/gawk/splitvar.in b/src/it/resources/gawk/splitvar.in similarity index 100% rename from src/test/resources/gawk/splitvar.in rename to src/it/resources/gawk/splitvar.in diff --git a/src/test/resources/gawk/splitvar.ok b/src/it/resources/gawk/splitvar.ok similarity index 100% rename from src/test/resources/gawk/splitvar.ok rename to src/it/resources/gawk/splitvar.ok diff --git a/src/test/resources/gawk/splitwht.awk b/src/it/resources/gawk/splitwht.awk similarity index 100% rename from src/test/resources/gawk/splitwht.awk rename to src/it/resources/gawk/splitwht.awk diff --git a/src/test/resources/gawk/splitwht.ok b/src/it/resources/gawk/splitwht.ok similarity index 100% rename from src/test/resources/gawk/splitwht.ok rename to src/it/resources/gawk/splitwht.ok diff --git a/src/test/resources/gawk/sprintfc.awk b/src/it/resources/gawk/sprintfc.awk similarity index 100% rename from src/test/resources/gawk/sprintfc.awk rename to src/it/resources/gawk/sprintfc.awk diff --git a/src/test/resources/gawk/sprintfc.in b/src/it/resources/gawk/sprintfc.in similarity index 100% rename from src/test/resources/gawk/sprintfc.in rename to src/it/resources/gawk/sprintfc.in diff --git a/src/test/resources/gawk/sprintfc.ok b/src/it/resources/gawk/sprintfc.ok similarity index 100% rename from src/test/resources/gawk/sprintfc.ok rename to src/it/resources/gawk/sprintfc.ok diff --git a/src/test/resources/gawk/status-close.awk b/src/it/resources/gawk/status-close.awk similarity index 100% rename from src/test/resources/gawk/status-close.awk rename to src/it/resources/gawk/status-close.awk diff --git a/src/test/resources/gawk/status-close.ok b/src/it/resources/gawk/status-close.ok similarity index 100% rename from src/test/resources/gawk/status-close.ok rename to src/it/resources/gawk/status-close.ok diff --git a/src/test/resources/gawk/strcat1.awk b/src/it/resources/gawk/strcat1.awk similarity index 100% rename from src/test/resources/gawk/strcat1.awk rename to src/it/resources/gawk/strcat1.awk diff --git a/src/test/resources/gawk/strcat1.ok b/src/it/resources/gawk/strcat1.ok similarity index 100% rename from src/test/resources/gawk/strcat1.ok rename to src/it/resources/gawk/strcat1.ok diff --git a/src/test/resources/gawk/strfieldnum.awk b/src/it/resources/gawk/strfieldnum.awk similarity index 100% rename from src/test/resources/gawk/strfieldnum.awk rename to src/it/resources/gawk/strfieldnum.awk diff --git a/src/test/resources/gawk/strfieldnum.in b/src/it/resources/gawk/strfieldnum.in similarity index 100% rename from src/test/resources/gawk/strfieldnum.in rename to src/it/resources/gawk/strfieldnum.in diff --git a/src/test/resources/gawk/strfieldnum.ok b/src/it/resources/gawk/strfieldnum.ok similarity index 100% rename from src/test/resources/gawk/strfieldnum.ok rename to src/it/resources/gawk/strfieldnum.ok diff --git a/src/test/resources/gawk/strftfld.awk b/src/it/resources/gawk/strftfld.awk similarity index 100% rename from src/test/resources/gawk/strftfld.awk rename to src/it/resources/gawk/strftfld.awk diff --git a/src/test/resources/gawk/strftfld.in b/src/it/resources/gawk/strftfld.in similarity index 100% rename from src/test/resources/gawk/strftfld.in rename to src/it/resources/gawk/strftfld.in diff --git a/src/test/resources/gawk/strftfld.ok b/src/it/resources/gawk/strftfld.ok similarity index 100% rename from src/test/resources/gawk/strftfld.ok rename to src/it/resources/gawk/strftfld.ok diff --git a/src/test/resources/gawk/strftime.awk b/src/it/resources/gawk/strftime.awk similarity index 100% rename from src/test/resources/gawk/strftime.awk rename to src/it/resources/gawk/strftime.awk diff --git a/src/test/resources/gawk/strftlng.awk b/src/it/resources/gawk/strftlng.awk similarity index 100% rename from src/test/resources/gawk/strftlng.awk rename to src/it/resources/gawk/strftlng.awk diff --git a/src/test/resources/gawk/strftlng.ok b/src/it/resources/gawk/strftlng.ok similarity index 100% rename from src/test/resources/gawk/strftlng.ok rename to src/it/resources/gawk/strftlng.ok diff --git a/src/test/resources/gawk/strnum1.awk b/src/it/resources/gawk/strnum1.awk similarity index 100% rename from src/test/resources/gawk/strnum1.awk rename to src/it/resources/gawk/strnum1.awk diff --git a/src/test/resources/gawk/strnum1.ok b/src/it/resources/gawk/strnum1.ok similarity index 100% rename from src/test/resources/gawk/strnum1.ok rename to src/it/resources/gawk/strnum1.ok diff --git a/src/test/resources/gawk/strnum2.awk b/src/it/resources/gawk/strnum2.awk similarity index 100% rename from src/test/resources/gawk/strnum2.awk rename to src/it/resources/gawk/strnum2.awk diff --git a/src/test/resources/gawk/strnum2.ok b/src/it/resources/gawk/strnum2.ok similarity index 100% rename from src/test/resources/gawk/strnum2.ok rename to src/it/resources/gawk/strnum2.ok diff --git a/src/test/resources/gawk/strtod.awk b/src/it/resources/gawk/strtod.awk similarity index 100% rename from src/test/resources/gawk/strtod.awk rename to src/it/resources/gawk/strtod.awk diff --git a/src/test/resources/gawk/strtod.in b/src/it/resources/gawk/strtod.in similarity index 100% rename from src/test/resources/gawk/strtod.in rename to src/it/resources/gawk/strtod.in diff --git a/src/test/resources/gawk/strtod.ok b/src/it/resources/gawk/strtod.ok similarity index 100% rename from src/test/resources/gawk/strtod.ok rename to src/it/resources/gawk/strtod.ok diff --git a/src/test/resources/gawk/strtonum.awk b/src/it/resources/gawk/strtonum.awk similarity index 100% rename from src/test/resources/gawk/strtonum.awk rename to src/it/resources/gawk/strtonum.awk diff --git a/src/test/resources/gawk/strtonum.ok b/src/it/resources/gawk/strtonum.ok similarity index 100% rename from src/test/resources/gawk/strtonum.ok rename to src/it/resources/gawk/strtonum.ok diff --git a/src/test/resources/gawk/strtonum1.awk b/src/it/resources/gawk/strtonum1.awk similarity index 100% rename from src/test/resources/gawk/strtonum1.awk rename to src/it/resources/gawk/strtonum1.awk diff --git a/src/test/resources/gawk/strtonum1.ok b/src/it/resources/gawk/strtonum1.ok similarity index 100% rename from src/test/resources/gawk/strtonum1.ok rename to src/it/resources/gawk/strtonum1.ok diff --git a/src/test/resources/gawk/stupid1.awk b/src/it/resources/gawk/stupid1.awk similarity index 100% rename from src/test/resources/gawk/stupid1.awk rename to src/it/resources/gawk/stupid1.awk diff --git a/src/test/resources/gawk/stupid1.ok b/src/it/resources/gawk/stupid1.ok similarity index 100% rename from src/test/resources/gawk/stupid1.ok rename to src/it/resources/gawk/stupid1.ok diff --git a/src/test/resources/gawk/stupid2.awk b/src/it/resources/gawk/stupid2.awk similarity index 100% rename from src/test/resources/gawk/stupid2.awk rename to src/it/resources/gawk/stupid2.awk diff --git a/src/it/resources/gawk/stupid2.ok b/src/it/resources/gawk/stupid2.ok new file mode 100644 index 00000000..e69de29b diff --git a/src/test/resources/gawk/stupid3.awk b/src/it/resources/gawk/stupid3.awk similarity index 100% rename from src/test/resources/gawk/stupid3.awk rename to src/it/resources/gawk/stupid3.awk diff --git a/src/test/resources/gawk/stupid3.ok b/src/it/resources/gawk/stupid3.ok similarity index 100% rename from src/test/resources/gawk/stupid3.ok rename to src/it/resources/gawk/stupid3.ok diff --git a/src/test/resources/gawk/stupid4.awk b/src/it/resources/gawk/stupid4.awk similarity index 100% rename from src/test/resources/gawk/stupid4.awk rename to src/it/resources/gawk/stupid4.awk diff --git a/src/test/resources/gawk/stupid4.ok b/src/it/resources/gawk/stupid4.ok similarity index 100% rename from src/test/resources/gawk/stupid4.ok rename to src/it/resources/gawk/stupid4.ok diff --git a/src/test/resources/gawk/stupid5.awk b/src/it/resources/gawk/stupid5.awk similarity index 100% rename from src/test/resources/gawk/stupid5.awk rename to src/it/resources/gawk/stupid5.awk diff --git a/src/test/resources/gawk/stupid5.ok b/src/it/resources/gawk/stupid5.ok similarity index 100% rename from src/test/resources/gawk/stupid5.ok rename to src/it/resources/gawk/stupid5.ok diff --git a/src/test/resources/gawk/subamp.awk b/src/it/resources/gawk/subamp.awk similarity index 100% rename from src/test/resources/gawk/subamp.awk rename to src/it/resources/gawk/subamp.awk diff --git a/src/test/resources/gawk/subamp.in b/src/it/resources/gawk/subamp.in similarity index 100% rename from src/test/resources/gawk/subamp.in rename to src/it/resources/gawk/subamp.in diff --git a/src/test/resources/gawk/subamp.ok b/src/it/resources/gawk/subamp.ok similarity index 100% rename from src/test/resources/gawk/subamp.ok rename to src/it/resources/gawk/subamp.ok diff --git a/src/test/resources/gawk/subback.awk b/src/it/resources/gawk/subback.awk similarity index 100% rename from src/test/resources/gawk/subback.awk rename to src/it/resources/gawk/subback.awk diff --git a/src/test/resources/gawk/subback.in b/src/it/resources/gawk/subback.in similarity index 100% rename from src/test/resources/gawk/subback.in rename to src/it/resources/gawk/subback.in diff --git a/src/test/resources/gawk/subback.ok b/src/it/resources/gawk/subback.ok similarity index 100% rename from src/test/resources/gawk/subback.ok rename to src/it/resources/gawk/subback.ok diff --git a/src/test/resources/gawk/subi18n.awk b/src/it/resources/gawk/subi18n.awk similarity index 100% rename from src/test/resources/gawk/subi18n.awk rename to src/it/resources/gawk/subi18n.awk diff --git a/src/test/resources/gawk/subi18n.ok b/src/it/resources/gawk/subi18n.ok similarity index 100% rename from src/test/resources/gawk/subi18n.ok rename to src/it/resources/gawk/subi18n.ok diff --git a/src/test/resources/gawk/subsepnm.awk b/src/it/resources/gawk/subsepnm.awk similarity index 100% rename from src/test/resources/gawk/subsepnm.awk rename to src/it/resources/gawk/subsepnm.awk diff --git a/src/test/resources/gawk/subsepnm.ok b/src/it/resources/gawk/subsepnm.ok similarity index 100% rename from src/test/resources/gawk/subsepnm.ok rename to src/it/resources/gawk/subsepnm.ok diff --git a/src/test/resources/gawk/subslash.awk b/src/it/resources/gawk/subslash.awk similarity index 100% rename from src/test/resources/gawk/subslash.awk rename to src/it/resources/gawk/subslash.awk diff --git a/src/test/resources/gawk/subslash.ok b/src/it/resources/gawk/subslash.ok similarity index 100% rename from src/test/resources/gawk/subslash.ok rename to src/it/resources/gawk/subslash.ok diff --git a/src/test/resources/gawk/substr.awk b/src/it/resources/gawk/substr.awk similarity index 100% rename from src/test/resources/gawk/substr.awk rename to src/it/resources/gawk/substr.awk diff --git a/src/test/resources/gawk/substr.ok b/src/it/resources/gawk/substr.ok similarity index 100% rename from src/test/resources/gawk/substr.ok rename to src/it/resources/gawk/substr.ok diff --git a/src/test/resources/gawk/swaplns.awk b/src/it/resources/gawk/swaplns.awk similarity index 100% rename from src/test/resources/gawk/swaplns.awk rename to src/it/resources/gawk/swaplns.awk diff --git a/src/test/resources/gawk/swaplns.in b/src/it/resources/gawk/swaplns.in similarity index 100% rename from src/test/resources/gawk/swaplns.in rename to src/it/resources/gawk/swaplns.in diff --git a/src/test/resources/gawk/swaplns.ok b/src/it/resources/gawk/swaplns.ok similarity index 100% rename from src/test/resources/gawk/swaplns.ok rename to src/it/resources/gawk/swaplns.ok diff --git a/src/test/resources/gawk/switch2.awk b/src/it/resources/gawk/switch2.awk similarity index 100% rename from src/test/resources/gawk/switch2.awk rename to src/it/resources/gawk/switch2.awk diff --git a/src/it/resources/gawk/switch2.ok b/src/it/resources/gawk/switch2.ok new file mode 100644 index 00000000..e69de29b diff --git a/src/test/resources/gawk/symtab1.awk b/src/it/resources/gawk/symtab1.awk similarity index 100% rename from src/test/resources/gawk/symtab1.awk rename to src/it/resources/gawk/symtab1.awk diff --git a/src/test/resources/gawk/symtab1.ok b/src/it/resources/gawk/symtab1.ok similarity index 100% rename from src/test/resources/gawk/symtab1.ok rename to src/it/resources/gawk/symtab1.ok diff --git a/src/test/resources/gawk/symtab10.awk b/src/it/resources/gawk/symtab10.awk similarity index 100% rename from src/test/resources/gawk/symtab10.awk rename to src/it/resources/gawk/symtab10.awk diff --git a/src/test/resources/gawk/symtab10.ok b/src/it/resources/gawk/symtab10.ok similarity index 100% rename from src/test/resources/gawk/symtab10.ok rename to src/it/resources/gawk/symtab10.ok diff --git a/src/test/resources/gawk/symtab11.awk b/src/it/resources/gawk/symtab11.awk similarity index 100% rename from src/test/resources/gawk/symtab11.awk rename to src/it/resources/gawk/symtab11.awk diff --git a/src/test/resources/gawk/symtab11.ok b/src/it/resources/gawk/symtab11.ok similarity index 100% rename from src/test/resources/gawk/symtab11.ok rename to src/it/resources/gawk/symtab11.ok diff --git a/src/test/resources/gawk/symtab12.awk b/src/it/resources/gawk/symtab12.awk similarity index 100% rename from src/test/resources/gawk/symtab12.awk rename to src/it/resources/gawk/symtab12.awk diff --git a/src/test/resources/gawk/symtab12.ok b/src/it/resources/gawk/symtab12.ok similarity index 100% rename from src/test/resources/gawk/symtab12.ok rename to src/it/resources/gawk/symtab12.ok diff --git a/src/test/resources/gawk/symtab2.awk b/src/it/resources/gawk/symtab2.awk similarity index 100% rename from src/test/resources/gawk/symtab2.awk rename to src/it/resources/gawk/symtab2.awk diff --git a/src/test/resources/gawk/symtab2.ok b/src/it/resources/gawk/symtab2.ok similarity index 100% rename from src/test/resources/gawk/symtab2.ok rename to src/it/resources/gawk/symtab2.ok diff --git a/src/test/resources/gawk/symtab3.awk b/src/it/resources/gawk/symtab3.awk similarity index 100% rename from src/test/resources/gawk/symtab3.awk rename to src/it/resources/gawk/symtab3.awk diff --git a/src/test/resources/gawk/symtab3.ok b/src/it/resources/gawk/symtab3.ok similarity index 100% rename from src/test/resources/gawk/symtab3.ok rename to src/it/resources/gawk/symtab3.ok diff --git a/src/test/resources/gawk/symtab4.awk b/src/it/resources/gawk/symtab4.awk similarity index 100% rename from src/test/resources/gawk/symtab4.awk rename to src/it/resources/gawk/symtab4.awk diff --git a/src/test/resources/gawk/symtab4.in b/src/it/resources/gawk/symtab4.in similarity index 100% rename from src/test/resources/gawk/symtab4.in rename to src/it/resources/gawk/symtab4.in diff --git a/src/test/resources/gawk/symtab4.ok b/src/it/resources/gawk/symtab4.ok similarity index 100% rename from src/test/resources/gawk/symtab4.ok rename to src/it/resources/gawk/symtab4.ok diff --git a/src/test/resources/gawk/symtab5.awk b/src/it/resources/gawk/symtab5.awk similarity index 100% rename from src/test/resources/gawk/symtab5.awk rename to src/it/resources/gawk/symtab5.awk diff --git a/src/test/resources/gawk/symtab5.in b/src/it/resources/gawk/symtab5.in similarity index 100% rename from src/test/resources/gawk/symtab5.in rename to src/it/resources/gawk/symtab5.in diff --git a/src/test/resources/gawk/symtab5.ok b/src/it/resources/gawk/symtab5.ok similarity index 100% rename from src/test/resources/gawk/symtab5.ok rename to src/it/resources/gawk/symtab5.ok diff --git a/src/test/resources/gawk/symtab6.awk b/src/it/resources/gawk/symtab6.awk similarity index 100% rename from src/test/resources/gawk/symtab6.awk rename to src/it/resources/gawk/symtab6.awk diff --git a/src/test/resources/gawk/symtab6.ok b/src/it/resources/gawk/symtab6.ok similarity index 100% rename from src/test/resources/gawk/symtab6.ok rename to src/it/resources/gawk/symtab6.ok diff --git a/src/test/resources/gawk/symtab7.awk b/src/it/resources/gawk/symtab7.awk similarity index 100% rename from src/test/resources/gawk/symtab7.awk rename to src/it/resources/gawk/symtab7.awk diff --git a/src/test/resources/gawk/symtab7.in b/src/it/resources/gawk/symtab7.in similarity index 100% rename from src/test/resources/gawk/symtab7.in rename to src/it/resources/gawk/symtab7.in diff --git a/src/test/resources/gawk/symtab7.ok b/src/it/resources/gawk/symtab7.ok similarity index 100% rename from src/test/resources/gawk/symtab7.ok rename to src/it/resources/gawk/symtab7.ok diff --git a/src/test/resources/gawk/symtab8.awk b/src/it/resources/gawk/symtab8.awk similarity index 100% rename from src/test/resources/gawk/symtab8.awk rename to src/it/resources/gawk/symtab8.awk diff --git a/src/test/resources/gawk/symtab8.in b/src/it/resources/gawk/symtab8.in similarity index 100% rename from src/test/resources/gawk/symtab8.in rename to src/it/resources/gawk/symtab8.in diff --git a/src/test/resources/gawk/symtab8.ok b/src/it/resources/gawk/symtab8.ok similarity index 100% rename from src/test/resources/gawk/symtab8.ok rename to src/it/resources/gawk/symtab8.ok diff --git a/src/test/resources/gawk/symtab9.awk b/src/it/resources/gawk/symtab9.awk similarity index 100% rename from src/test/resources/gawk/symtab9.awk rename to src/it/resources/gawk/symtab9.awk diff --git a/src/test/resources/gawk/symtab9.ok b/src/it/resources/gawk/symtab9.ok similarity index 100% rename from src/test/resources/gawk/symtab9.ok rename to src/it/resources/gawk/symtab9.ok diff --git a/src/test/resources/gawk/synerr1.awk b/src/it/resources/gawk/synerr1.awk similarity index 100% rename from src/test/resources/gawk/synerr1.awk rename to src/it/resources/gawk/synerr1.awk diff --git a/src/test/resources/gawk/synerr1.ok b/src/it/resources/gawk/synerr1.ok similarity index 100% rename from src/test/resources/gawk/synerr1.ok rename to src/it/resources/gawk/synerr1.ok diff --git a/src/test/resources/gawk/synerr2.awk b/src/it/resources/gawk/synerr2.awk similarity index 100% rename from src/test/resources/gawk/synerr2.awk rename to src/it/resources/gawk/synerr2.awk diff --git a/src/test/resources/gawk/synerr2.ok b/src/it/resources/gawk/synerr2.ok similarity index 100% rename from src/test/resources/gawk/synerr2.ok rename to src/it/resources/gawk/synerr2.ok diff --git a/src/test/resources/gawk/synerr3.awk b/src/it/resources/gawk/synerr3.awk similarity index 100% rename from src/test/resources/gawk/synerr3.awk rename to src/it/resources/gawk/synerr3.awk diff --git a/src/test/resources/gawk/synerr3.ok b/src/it/resources/gawk/synerr3.ok similarity index 100% rename from src/test/resources/gawk/synerr3.ok rename to src/it/resources/gawk/synerr3.ok diff --git a/src/test/resources/gawk/tailrecurse.awk b/src/it/resources/gawk/tailrecurse.awk similarity index 100% rename from src/test/resources/gawk/tailrecurse.awk rename to src/it/resources/gawk/tailrecurse.awk diff --git a/src/test/resources/gawk/tailrecurse.ok b/src/it/resources/gawk/tailrecurse.ok similarity index 100% rename from src/test/resources/gawk/tailrecurse.ok rename to src/it/resources/gawk/tailrecurse.ok diff --git a/src/test/resources/gawk/testext-mpfr.ok b/src/it/resources/gawk/testext-mpfr.ok similarity index 100% rename from src/test/resources/gawk/testext-mpfr.ok rename to src/it/resources/gawk/testext-mpfr.ok diff --git a/src/test/resources/gawk/testext.ok b/src/it/resources/gawk/testext.ok similarity index 100% rename from src/test/resources/gawk/testext.ok rename to src/it/resources/gawk/testext.ok diff --git a/src/test/resources/gawk/time.awk b/src/it/resources/gawk/time.awk similarity index 100% rename from src/test/resources/gawk/time.awk rename to src/it/resources/gawk/time.awk diff --git a/src/test/resources/gawk/time.ok b/src/it/resources/gawk/time.ok similarity index 100% rename from src/test/resources/gawk/time.ok rename to src/it/resources/gawk/time.ok diff --git a/src/test/resources/gawk/timeout.awk b/src/it/resources/gawk/timeout.awk similarity index 100% rename from src/test/resources/gawk/timeout.awk rename to src/it/resources/gawk/timeout.awk diff --git a/src/test/resources/gawk/timeout.ok b/src/it/resources/gawk/timeout.ok similarity index 100% rename from src/test/resources/gawk/timeout.ok rename to src/it/resources/gawk/timeout.ok diff --git a/src/test/resources/gawk/tradanch.awk b/src/it/resources/gawk/tradanch.awk similarity index 100% rename from src/test/resources/gawk/tradanch.awk rename to src/it/resources/gawk/tradanch.awk diff --git a/src/test/resources/gawk/tradanch.in b/src/it/resources/gawk/tradanch.in similarity index 100% rename from src/test/resources/gawk/tradanch.in rename to src/it/resources/gawk/tradanch.in diff --git a/src/it/resources/gawk/tradanch.ok b/src/it/resources/gawk/tradanch.ok new file mode 100644 index 00000000..e69de29b diff --git a/src/test/resources/gawk/trailbs.awk b/src/it/resources/gawk/trailbs.awk similarity index 100% rename from src/test/resources/gawk/trailbs.awk rename to src/it/resources/gawk/trailbs.awk diff --git a/src/test/resources/gawk/trailbs.in b/src/it/resources/gawk/trailbs.in similarity index 100% rename from src/test/resources/gawk/trailbs.in rename to src/it/resources/gawk/trailbs.in diff --git a/src/test/resources/gawk/trailbs.ok b/src/it/resources/gawk/trailbs.ok similarity index 100% rename from src/test/resources/gawk/trailbs.ok rename to src/it/resources/gawk/trailbs.ok diff --git a/src/test/resources/gawk/tweakfld.awk b/src/it/resources/gawk/tweakfld.awk similarity index 99% rename from src/test/resources/gawk/tweakfld.awk rename to src/it/resources/gawk/tweakfld.awk index 50ad272d..a5f0f322 100644 --- a/src/test/resources/gawk/tweakfld.awk +++ b/src/it/resources/gawk/tweakfld.awk @@ -78,7 +78,7 @@ BEGIN { nf_offset_y = 64 nf_offset_z = 65 - while( (getline < "xrcf_mnemonics.dat") > 0 ) { + while( getline < "xrcf_mnemonics.dat" > 0 ) { mnemonic[$1] = $2 } diff --git a/src/test/resources/gawk/tweakfld.in b/src/it/resources/gawk/tweakfld.in similarity index 100% rename from src/test/resources/gawk/tweakfld.in rename to src/it/resources/gawk/tweakfld.in diff --git a/src/test/resources/gawk/tweakfld.ok b/src/it/resources/gawk/tweakfld.ok similarity index 100% rename from src/test/resources/gawk/tweakfld.ok rename to src/it/resources/gawk/tweakfld.ok diff --git a/src/test/resources/gawk/typedregex1.awk b/src/it/resources/gawk/typedregex1.awk similarity index 100% rename from src/test/resources/gawk/typedregex1.awk rename to src/it/resources/gawk/typedregex1.awk diff --git a/src/test/resources/gawk/typedregex1.ok b/src/it/resources/gawk/typedregex1.ok similarity index 100% rename from src/test/resources/gawk/typedregex1.ok rename to src/it/resources/gawk/typedregex1.ok diff --git a/src/test/resources/gawk/typedregex2.awk b/src/it/resources/gawk/typedregex2.awk similarity index 100% rename from src/test/resources/gawk/typedregex2.awk rename to src/it/resources/gawk/typedregex2.awk diff --git a/src/test/resources/gawk/typedregex2.ok b/src/it/resources/gawk/typedregex2.ok similarity index 100% rename from src/test/resources/gawk/typedregex2.ok rename to src/it/resources/gawk/typedregex2.ok diff --git a/src/test/resources/gawk/typedregex3.awk b/src/it/resources/gawk/typedregex3.awk similarity index 100% rename from src/test/resources/gawk/typedregex3.awk rename to src/it/resources/gawk/typedregex3.awk diff --git a/src/test/resources/gawk/typedregex3.ok b/src/it/resources/gawk/typedregex3.ok similarity index 100% rename from src/test/resources/gawk/typedregex3.ok rename to src/it/resources/gawk/typedregex3.ok diff --git a/src/test/resources/gawk/typedregex4.awk b/src/it/resources/gawk/typedregex4.awk similarity index 100% rename from src/test/resources/gawk/typedregex4.awk rename to src/it/resources/gawk/typedregex4.awk diff --git a/src/test/resources/gawk/typedregex4.ok b/src/it/resources/gawk/typedregex4.ok similarity index 100% rename from src/test/resources/gawk/typedregex4.ok rename to src/it/resources/gawk/typedregex4.ok diff --git a/src/test/resources/gawk/typedregex5.awk b/src/it/resources/gawk/typedregex5.awk similarity index 100% rename from src/test/resources/gawk/typedregex5.awk rename to src/it/resources/gawk/typedregex5.awk diff --git a/src/test/resources/gawk/typedregex5.in b/src/it/resources/gawk/typedregex5.in similarity index 100% rename from src/test/resources/gawk/typedregex5.in rename to src/it/resources/gawk/typedregex5.in diff --git a/src/test/resources/gawk/typedregex5.ok b/src/it/resources/gawk/typedregex5.ok similarity index 100% rename from src/test/resources/gawk/typedregex5.ok rename to src/it/resources/gawk/typedregex5.ok diff --git a/src/test/resources/gawk/typedregex6.awk b/src/it/resources/gawk/typedregex6.awk similarity index 100% rename from src/test/resources/gawk/typedregex6.awk rename to src/it/resources/gawk/typedregex6.awk diff --git a/src/test/resources/gawk/typedregex6.in b/src/it/resources/gawk/typedregex6.in similarity index 100% rename from src/test/resources/gawk/typedregex6.in rename to src/it/resources/gawk/typedregex6.in diff --git a/src/test/resources/gawk/typedregex6.ok b/src/it/resources/gawk/typedregex6.ok similarity index 100% rename from src/test/resources/gawk/typedregex6.ok rename to src/it/resources/gawk/typedregex6.ok diff --git a/src/test/resources/gawk/typeof1.awk b/src/it/resources/gawk/typeof1.awk similarity index 100% rename from src/test/resources/gawk/typeof1.awk rename to src/it/resources/gawk/typeof1.awk diff --git a/src/test/resources/gawk/typeof1.ok b/src/it/resources/gawk/typeof1.ok similarity index 100% rename from src/test/resources/gawk/typeof1.ok rename to src/it/resources/gawk/typeof1.ok diff --git a/src/test/resources/gawk/typeof2.awk b/src/it/resources/gawk/typeof2.awk similarity index 100% rename from src/test/resources/gawk/typeof2.awk rename to src/it/resources/gawk/typeof2.awk diff --git a/src/test/resources/gawk/typeof2.ok b/src/it/resources/gawk/typeof2.ok similarity index 100% rename from src/test/resources/gawk/typeof2.ok rename to src/it/resources/gawk/typeof2.ok diff --git a/src/test/resources/gawk/typeof3.awk b/src/it/resources/gawk/typeof3.awk similarity index 100% rename from src/test/resources/gawk/typeof3.awk rename to src/it/resources/gawk/typeof3.awk diff --git a/src/test/resources/gawk/typeof3.ok b/src/it/resources/gawk/typeof3.ok similarity index 100% rename from src/test/resources/gawk/typeof3.ok rename to src/it/resources/gawk/typeof3.ok diff --git a/src/test/resources/gawk/typeof4.awk b/src/it/resources/gawk/typeof4.awk similarity index 100% rename from src/test/resources/gawk/typeof4.awk rename to src/it/resources/gawk/typeof4.awk diff --git a/src/test/resources/gawk/typeof4.ok b/src/it/resources/gawk/typeof4.ok similarity index 100% rename from src/test/resources/gawk/typeof4.ok rename to src/it/resources/gawk/typeof4.ok diff --git a/src/test/resources/gawk/typeof5.awk b/src/it/resources/gawk/typeof5.awk similarity index 100% rename from src/test/resources/gawk/typeof5.awk rename to src/it/resources/gawk/typeof5.awk diff --git a/src/test/resources/gawk/typeof5.in b/src/it/resources/gawk/typeof5.in similarity index 100% rename from src/test/resources/gawk/typeof5.in rename to src/it/resources/gawk/typeof5.in diff --git a/src/test/resources/gawk/typeof5.ok b/src/it/resources/gawk/typeof5.ok similarity index 100% rename from src/test/resources/gawk/typeof5.ok rename to src/it/resources/gawk/typeof5.ok diff --git a/src/test/resources/gawk/typeof6.awk b/src/it/resources/gawk/typeof6.awk similarity index 100% rename from src/test/resources/gawk/typeof6.awk rename to src/it/resources/gawk/typeof6.awk diff --git a/src/test/resources/gawk/typeof6.ok b/src/it/resources/gawk/typeof6.ok similarity index 100% rename from src/test/resources/gawk/typeof6.ok rename to src/it/resources/gawk/typeof6.ok diff --git a/src/test/resources/gawk/unicode1.awk b/src/it/resources/gawk/unicode1.awk similarity index 100% rename from src/test/resources/gawk/unicode1.awk rename to src/it/resources/gawk/unicode1.awk diff --git a/src/test/resources/gawk/unicode1.ok b/src/it/resources/gawk/unicode1.ok similarity index 100% rename from src/test/resources/gawk/unicode1.ok rename to src/it/resources/gawk/unicode1.ok diff --git a/src/test/resources/gawk/uninit2.awk b/src/it/resources/gawk/uninit2.awk similarity index 100% rename from src/test/resources/gawk/uninit2.awk rename to src/it/resources/gawk/uninit2.awk diff --git a/src/test/resources/gawk/uninit2.ok b/src/it/resources/gawk/uninit2.ok similarity index 100% rename from src/test/resources/gawk/uninit2.ok rename to src/it/resources/gawk/uninit2.ok diff --git a/src/test/resources/gawk/uninit3.awk b/src/it/resources/gawk/uninit3.awk similarity index 100% rename from src/test/resources/gawk/uninit3.awk rename to src/it/resources/gawk/uninit3.awk diff --git a/src/test/resources/gawk/uninit3.ok b/src/it/resources/gawk/uninit3.ok similarity index 100% rename from src/test/resources/gawk/uninit3.ok rename to src/it/resources/gawk/uninit3.ok diff --git a/src/test/resources/gawk/uninit4.awk b/src/it/resources/gawk/uninit4.awk similarity index 100% rename from src/test/resources/gawk/uninit4.awk rename to src/it/resources/gawk/uninit4.awk diff --git a/src/test/resources/gawk/uninit4.ok b/src/it/resources/gawk/uninit4.ok similarity index 100% rename from src/test/resources/gawk/uninit4.ok rename to src/it/resources/gawk/uninit4.ok diff --git a/src/test/resources/gawk/uninit5.awk b/src/it/resources/gawk/uninit5.awk similarity index 100% rename from src/test/resources/gawk/uninit5.awk rename to src/it/resources/gawk/uninit5.awk diff --git a/src/test/resources/gawk/uninit5.ok b/src/it/resources/gawk/uninit5.ok similarity index 100% rename from src/test/resources/gawk/uninit5.ok rename to src/it/resources/gawk/uninit5.ok diff --git a/src/test/resources/gawk/uninitialized.awk b/src/it/resources/gawk/uninitialized.awk similarity index 100% rename from src/test/resources/gawk/uninitialized.awk rename to src/it/resources/gawk/uninitialized.awk diff --git a/src/test/resources/gawk/uninitialized.ok b/src/it/resources/gawk/uninitialized.ok similarity index 100% rename from src/test/resources/gawk/uninitialized.ok rename to src/it/resources/gawk/uninitialized.ok diff --git a/src/it/resources/gawk/unterm.awk b/src/it/resources/gawk/unterm.awk new file mode 100644 index 00000000..c420c47b --- /dev/null +++ b/src/it/resources/gawk/unterm.awk @@ -0,0 +1 @@ +BEGIN{x=".........................................................................................................................................................................................................................................................} \ No newline at end of file diff --git a/src/it/resources/gawk/unterm.ok b/src/it/resources/gawk/unterm.ok new file mode 100644 index 00000000..a8e7e598 --- /dev/null +++ b/src/it/resources/gawk/unterm.ok @@ -0,0 +1,3 @@ +gawk: unterm.awk:1: BEGIN{x=".........................................................................................................................................................................................................................................................} +gawk: unterm.awk:1: ^ unterminated string +EXIT CODE: 1 diff --git a/src/test/resources/gawk/uparrfs.awk b/src/it/resources/gawk/uparrfs.awk similarity index 100% rename from src/test/resources/gawk/uparrfs.awk rename to src/it/resources/gawk/uparrfs.awk diff --git a/src/test/resources/gawk/uparrfs.in b/src/it/resources/gawk/uparrfs.in similarity index 100% rename from src/test/resources/gawk/uparrfs.in rename to src/it/resources/gawk/uparrfs.in diff --git a/src/test/resources/gawk/uparrfs.ok b/src/it/resources/gawk/uparrfs.ok similarity index 100% rename from src/test/resources/gawk/uparrfs.ok rename to src/it/resources/gawk/uparrfs.ok diff --git a/src/test/resources/gawk/uplus.awk b/src/it/resources/gawk/uplus.awk similarity index 100% rename from src/test/resources/gawk/uplus.awk rename to src/it/resources/gawk/uplus.awk diff --git a/src/test/resources/gawk/uplus.ok b/src/it/resources/gawk/uplus.ok similarity index 100% rename from src/test/resources/gawk/uplus.ok rename to src/it/resources/gawk/uplus.ok diff --git a/src/it/resources/gawk/valgrind.awk b/src/it/resources/gawk/valgrind.awk new file mode 100644 index 00000000..95699da1 --- /dev/null +++ b/src/it/resources/gawk/valgrind.awk @@ -0,0 +1,43 @@ +function show() +{ + error_count++ + if (cmd) { + printf "%s: %s\n", FILENAME, cmd + cmd = "" + } + printf "\t%s\n",$0 +} + +FNR == 1 { + error_count = 0 +} + +{ $1 = "" } + +$2 == "Command:" { + incmd = 1 + $2 = "" + cmd = $0 + next +} + +incmd { + if (/Parent PID:/) + incmd = 0 + else { + cmd = (cmd $0) + next + } +} + +/ERROR SUMMARY:/ && !/: 0 errors from 0 contexts/ && error_count > 0 { + show() +} + +/definitely lost:/ && !/: 0 bytes in 0 blocks/ { show() } + +# /possibly lost:/ && !/: 0 bytes in 0 blocks/ { show() } + +# / suppressed:/ && !/: 0 bytes in 0 blocks/ { show() } + +/[Ii]nvalid (read|write)/ { show() } diff --git a/src/test/resources/gawk/watchpoint1.awk b/src/it/resources/gawk/watchpoint1.awk similarity index 100% rename from src/test/resources/gawk/watchpoint1.awk rename to src/it/resources/gawk/watchpoint1.awk diff --git a/src/test/resources/gawk/watchpoint1.in b/src/it/resources/gawk/watchpoint1.in similarity index 100% rename from src/test/resources/gawk/watchpoint1.in rename to src/it/resources/gawk/watchpoint1.in diff --git a/src/test/resources/gawk/watchpoint1.ok b/src/it/resources/gawk/watchpoint1.ok similarity index 100% rename from src/test/resources/gawk/watchpoint1.ok rename to src/it/resources/gawk/watchpoint1.ok diff --git a/src/test/resources/gawk/watchpoint1.script b/src/it/resources/gawk/watchpoint1.script similarity index 100% rename from src/test/resources/gawk/watchpoint1.script rename to src/it/resources/gawk/watchpoint1.script diff --git a/src/test/resources/gawk/wideidx.awk b/src/it/resources/gawk/wideidx.awk similarity index 100% rename from src/test/resources/gawk/wideidx.awk rename to src/it/resources/gawk/wideidx.awk diff --git a/src/test/resources/gawk/wideidx.in b/src/it/resources/gawk/wideidx.in similarity index 100% rename from src/test/resources/gawk/wideidx.in rename to src/it/resources/gawk/wideidx.in diff --git a/src/test/resources/gawk/wideidx.ok b/src/it/resources/gawk/wideidx.ok similarity index 100% rename from src/test/resources/gawk/wideidx.ok rename to src/it/resources/gawk/wideidx.ok diff --git a/src/test/resources/gawk/wideidx2.awk b/src/it/resources/gawk/wideidx2.awk similarity index 100% rename from src/test/resources/gawk/wideidx2.awk rename to src/it/resources/gawk/wideidx2.awk diff --git a/src/test/resources/gawk/wideidx2.ok b/src/it/resources/gawk/wideidx2.ok similarity index 100% rename from src/test/resources/gawk/wideidx2.ok rename to src/it/resources/gawk/wideidx2.ok diff --git a/src/test/resources/gawk/widesub.awk b/src/it/resources/gawk/widesub.awk similarity index 100% rename from src/test/resources/gawk/widesub.awk rename to src/it/resources/gawk/widesub.awk diff --git a/src/test/resources/gawk/widesub.ok b/src/it/resources/gawk/widesub.ok similarity index 100% rename from src/test/resources/gawk/widesub.ok rename to src/it/resources/gawk/widesub.ok diff --git a/src/test/resources/gawk/widesub2.awk b/src/it/resources/gawk/widesub2.awk similarity index 100% rename from src/test/resources/gawk/widesub2.awk rename to src/it/resources/gawk/widesub2.awk diff --git a/src/test/resources/gawk/widesub2.ok b/src/it/resources/gawk/widesub2.ok similarity index 100% rename from src/test/resources/gawk/widesub2.ok rename to src/it/resources/gawk/widesub2.ok diff --git a/src/test/resources/gawk/widesub3.awk b/src/it/resources/gawk/widesub3.awk similarity index 100% rename from src/test/resources/gawk/widesub3.awk rename to src/it/resources/gawk/widesub3.awk diff --git a/src/test/resources/gawk/widesub3.in b/src/it/resources/gawk/widesub3.in similarity index 100% rename from src/test/resources/gawk/widesub3.in rename to src/it/resources/gawk/widesub3.in diff --git a/src/test/resources/gawk/widesub3.ok b/src/it/resources/gawk/widesub3.ok similarity index 100% rename from src/test/resources/gawk/widesub3.ok rename to src/it/resources/gawk/widesub3.ok diff --git a/src/test/resources/gawk/widesub4.awk b/src/it/resources/gawk/widesub4.awk similarity index 100% rename from src/test/resources/gawk/widesub4.awk rename to src/it/resources/gawk/widesub4.awk diff --git a/src/test/resources/gawk/widesub4.ok b/src/it/resources/gawk/widesub4.ok similarity index 100% rename from src/test/resources/gawk/widesub4.ok rename to src/it/resources/gawk/widesub4.ok diff --git a/src/test/resources/gawk/wjposer1.awk b/src/it/resources/gawk/wjposer1.awk similarity index 100% rename from src/test/resources/gawk/wjposer1.awk rename to src/it/resources/gawk/wjposer1.awk diff --git a/src/test/resources/gawk/wjposer1.in b/src/it/resources/gawk/wjposer1.in similarity index 100% rename from src/test/resources/gawk/wjposer1.in rename to src/it/resources/gawk/wjposer1.in diff --git a/src/test/resources/gawk/wjposer1.ok b/src/it/resources/gawk/wjposer1.ok similarity index 100% rename from src/test/resources/gawk/wjposer1.ok rename to src/it/resources/gawk/wjposer1.ok diff --git a/src/it/resources/gawk/xref.awk b/src/it/resources/gawk/xref.awk new file mode 100644 index 00000000..599aaa40 --- /dev/null +++ b/src/it/resources/gawk/xref.awk @@ -0,0 +1,141 @@ + # xref.awk - cross reference an awk program + + # 12/2010: Modified for gawk test suite to use a variable + # for the sort command and to use `sort -k1' instead of `sort +1' + + # 10/2020: Bug fix applied to code. + + BEGIN { + if (sortcmd == "") sortcmd = "sort" # "sort -k1" + + # create array of keywords to be ignored by lexer + asplit("BEGIN:END:atan2:break:close:continue:cos:delete:" \ + "do:else:exit:exp:for:getline:gsub:if:in:index:int:" \ + "length:log:match:next:print:printf:rand:return:sin:" \ + "split:sprintf:sqrt:srand:sub:substr:system:while", + keywords,":") + + # build the symbol-state table + split("00:00:00:00:00:00:00:00:00:00:" \ + "20:10:10:12:12:11:07:00:00:00:" \ + "08:08:08:08:08:33:08:00:00:00:" \ + "08:44:08:36:08:08:08:00:00:00:" \ + "08:44:45:42:42:41:08",machine,":") + + # parse the input and store an intermediate representation + # of the cross-reference information + + # set up the machine + state = 1 + + # run the machine + for (;;) { + + # get next symbol + symb = lex() + nextstate = substr(machine[state symb],1,1) + act = substr(machine[state symb],2,1) + + # perform required action + if ( act == "0" ) + ; # do nothing + else if ( act == "1" ) { + if ( ! inarray(tok,names) ) + names[++nnames] = tok + lines[tok,++xnames[tok]] = NR } + else if ( act == "2" ) { + if ( tok in local ) { + tok = tok "(" funcname ")" + if ( ! inarray(tok,names) ) + names[++nnames] = tok + lines[tok,++xnames[tok]] = NR } + else { + tok = tok "()" + if ( ! inarray(tok,names) ) + names[++nnames] = tok + lines[tok,++xnames[tok]] = NR } } + else if ( act == "3" ) { + funcname = tok + flines[tok] = NR } + else if ( act == "4" ) + braces++ + else if ( act == "5" ) { + braces-- + if ( braces == 0 ) { + for ( temp in local ) + delete local[temp] + funcname = "" + nextstate = 1 } } + else if ( act == "6" ) { + local[tok] = 1 } + else if ( act == "7" ) + break + else if ( act == "8" ) { + print "error: xref.awk: line " NR ": aborting" \ + > "/dev/con" + exit 1 } + + # finished with current token + state = nextstate } + + # finished parsing, now ready to print output + for ( i = 1; i <= nnames; i++ ) { + printf "%d ", xnames[names[i]] | sortcmd + if ( index(names[i],"(") == 0 ) + printf "%s(%d)", names[i], flines[names[i]] | sortcmd + else + printf "%s", names[i] | sortcmd + for ( j = 1; j <= xnames[names[i]]; j++ ) + if ( lines[names[i],j] != lines[names[i],j-1] ) + printf " %d", lines[names[i],j] | sortcmd + printf "\n" | sortcmd } + + close(sortcmd) + } # END OF PROGRAM + + function asplit(str,arr,fs, n) { n = split(str,temp_asplit,fs) + for ( i = 1; i <= n; i++ ) arr[temp_asplit[i]]++ } + + function inarray(val,arr, j, tmp) { + for ( j in arr ) + tmp[arr[j]]++ + return (val in tmp) } + + function lex() { + + for (;;) { + + if ( tok == "(eof)" ) return 7 + + while ( length(line) == 0 ) + if ( getline line == 0 ) { + tok = "(eof)"; return 7 } + + sub(/^[ \t]+/,"",line) # remove white space, + sub(/^"([^"]|\\")*"/,"",line) # quoted strings, + sub(/^\/([^\/]|\\\/)+\//,"",line) # regular expressions, + sub(/^#.*/,"",line) # and comments + + if ( line ~ /^function/ ) { + tok = "function"; line = substr(line,9); return 1 } + else if ( line ~ /^{/ ) { + tok = "{"; line = substr(line,2); return 2 } + else if ( line ~ /^}/ ) { + tok = "}"; line = substr(line,2); return 3 } + # change regexes to use posix character classes + else if ( match(line,/^[[:alpha:]_][[:alnum:]_]*\[/) ) { + tok = substr(line,1,RLENGTH-1) + line = substr(line,RLENGTH+1) + return 5 } + else if ( match(line,/^[[:alpha:]_][[:alnum:]_]*\(/) ) { + tok = substr(line,1,RLENGTH-1) + line = substr(line,RLENGTH+1) + if ( ! ( tok in keywords ) ) return 6 } + else if ( match(line,/^[[:alpha:]_][[:alnum:]_]*/) ) { + tok = substr(line,1,RLENGTH) + line = substr(line,RLENGTH+1) + if ( ! ( tok in keywords ) ) return 4 } + else { + match(line,/^[^[:alpha:]_{}]/) + tok = substr(line,1,RLENGTH) + line = substr(line,RLENGTH+1) } } } diff --git a/src/it/resources/gawk/xref.original b/src/it/resources/gawk/xref.original new file mode 100644 index 00000000..a94de211 --- /dev/null +++ b/src/it/resources/gawk/xref.original @@ -0,0 +1,313 @@ +XREF(AWK) Philip L. Bewig XREF(AWK) + +NAME + + xref(awk) - produce a cross reference listing of an awk program + +SYNOPSIS + + awk -f xref.awk [ file ... ] + +DESCRIPTION + + XREF(AWK) takes as input a valid awk program and produces as out- + put a cross-reference listing of all variables and function calls + which appear in the program. + + For ordinary variables and array variables, a line of the form + + count var(func) lines ... + + is produced, where "count" is the number of times the variable is + used, "var" is the name of the variable, "func" is the function + name to which the variable is local (a null "func" indicates that + the variable is global), and "lines" is the number of each line + where the variable appears. Appearances of the variable in a + function's parameter list are ignored. The number of lines shown + may differ from "count" if the variable appears more than once on + the same line. + + For functions, a line of the form + + count func(define) lines ... + + is produced, where "count" is the number of times the function is + called, "func" is the name of the function, "define" is the lime + number where the function is defined, and "lines" is the number of + each line where the function is called. As for variables, the + number of lines shown may differ from "count." + + Output lines for variables and functions are intermixed and are + sorted by name. Though terse, the output is informative, easy to + read, and amenable to further processing. + +EXAMPLE + + The cross-reference listing produced by running xref.awk against + itself is shown below: + + 5 NR() 39 45 50 53 68 + 8 RLENGTH() 119 120 123 124 127 128 132 133 + 10 act() 31 34 36 40 51 54 56 63 65 67 + 1 arr(asplit) 90 + 2 arr(inarray) 93 94 + 1 asplit(89) 6 + 3 braces() 55 57 58 + 2 flines() 53 79 + 1 fs(asplit) 89 + 3 funcname() 42 52 61 + 16 i() 76 77 78 79 81 82 83 84 90 + 3 inarray(92) 37 43 48 + 6 j() 82 83 84 + 3 j(inarray) 93 94 + 3 keywords() 10 125 129 + 1 lex(97) 29 + 31 line() 103 104 107 108 109 110 112 113 114 115 116 117 118 + 119 120 122 123 124 126 127 128 131 132 133 + 6 lines() 39 45 50 83 84 + 4 local() 41 59 60 64 + 3 machine() 17 30 31 + 2 n(asplit) 89 90 + 15 names() 37 38 43 44 48 49 77 78 79 81 82 83 84 + 3 nextstate() 30 62 73 + 4 nnames() 38 44 49 76 + 4 state() 23 30 31 73 + 1 str(asplit) 89 + 3 symb() 29 30 31 + 2 temp() 59 60 + 2 temp_asplit() 89 90 + 31 tok() 37 38 39 41 42 43 44 45 47 48 49 50 52 53 64 101 105 + 113 115 117 119 123 125 127 129 132 + 1 val(inarray) 94 + 5 xnames() 39 45 50 77 82 + + For readability, some lines have been folded. + +SOURCE CODE + + # xref.awk - cross reference an awk program + + BEGIN { + + # create array of keywords to be ignored by lexer + asplit("BEGIN:END:atan2:break:close:continue:cos:delete:" \ + "do:else:exit:exp:for:getline:gsub:if:in:index:int:" \ + "length:log:match:next:print:printf:rand:return:sin:" \ + "split:sprintf:sqrt:srand:sub:substr:system:while", + keywords,":") + + # build the symbol-state table + split("00:00:00:00:00:00:00:00:00:00:" \ + "20:10:10:12:12:11:07:00:00:00:" \ + "08:08:08:08:08:33:08:00:00:00:" \ + "08:44:08:36:08:08:08:00:00:00:" \ + "08:44:45:42:42:41:08",machine,":") + + # parse the input and store an intermediate representation + # of the cross-reference information + + # set up the machine + state = 1 + + # run the machine + for (;;) { + + # get next symbol + symb = lex() + nextstate = substr(machine[state symb],1,1) + act = substr(machine[state symb],2,1) + + # perform required action + if ( act == "0" ) + ; # do nothing + else if ( act == "1" ) { + if ( ! inarray(tok,names) ) + names[++nnames] = tok + lines[tok,++xnames[tok]] = NR } + else if ( act == "2" ) { + if ( tok in local ) { + tok = tok "(" funcname ")" + if ( ! inarray(tok,names) ) + names[++nnames] = tok + lines[tok,++xnames[tok]] = NR } + else { + tok = tok "()" + if ( ! inarray(tok,names) ) + names[++nnames] = tok + lines[tok,++xnames[tok]] = NR } } + else if ( act == "3" ) { + funcname = tok + flines[tok] = NR } + else if ( act == "4" ) + braces++ + else if ( act == "5" ) { + braces-- + if ( braces == 0 ) { + for ( temp in local ) + delete local[temp] + funcname = "" + nextstate = 1 } } + else if ( act == "6" ) { + local[tok] = 1 } + else if ( act == "7" ) + break + else if ( act == "8" ) { + print "error: xref.awk: line " NR ": aborting" \ + > "/dev/con" + exit 1 } + + # finished with current token + state = nextstate } + + # finished parsing, now ready to print output + for ( i = 1; i <= nnames; i++ ) { + printf "%d ", xnames[names[i]] |"sort +1" + if ( index(names[i],"(") == 0 ) + printf "%s(%d)", names[i], flines[names[i]] |"sort +1" + else + printf "%s", names[i] |"sort +1" + for ( j = 1; j <= xnames[names[i]]; j++ ) + if ( lines[names[i],j] != lines[names[i],j-1] ) + printf " %d", lines[names[i],j] |"sort +1" + printf "\n" |"sort +1" } + + } # END OF PROGRAM + + function asplit(str,arr,fs, n) { n = split(str,temp_asplit,fs) + for ( i = 1; i <= n; i++ ) arr[temp_asplit[i]]++ } + + function inarray(val,arr, j) { + for ( j in arr ) + if ( arr[j] == val ) return j + return "" } + + function lex() { + + for (;;) { + + if ( tok == "(eof)" ) return 7 + + while ( length(line) == 0 ) + if ( getline line == 0 ) { + tok = "(eof)"; return 7 } + + sub(/^[ \t]+/,"",line) # remove white space, + sub(/^"([^"]|\\")*"/,"",line) # quoted strings, + sub(/^\/([^\/]|\\\/)+\//,"",line) # regular expressions, + sub(/^#.*/,"",line) # and comments + + if ( line ~ /^function/ ) { + tok = "function"; line = substr(line,9); return 1 } + else if ( line ~ /^{/ ) { + tok = "{"; line = substr(line,2); return 2 } + else if ( line ~ /^}/ ) { + tok = "}"; line = substr(line,2); return 3 } + else if ( match(line,/^[A-Za-z_][A-Za-z_0-9]*\[/) ) { + tok = substr(line,1,RLENGTH-1) + line = substr(line,RLENGTH+1) + return 5 } + else if ( match(line,/^[A-Za-z_][A-Za-z_0-9]*\(/) ) { + tok = substr(line,1,RLENGTH-1) + line = substr(line,RLENGTH+1) + if ( ! ( tok in keywords ) ) return 6 } + else if ( match(line,/^[A-Za-z_][A-Za-z_0-9]*/) ) { + tok = substr(line,1,RLENGTH) + line = substr(line,RLENGTH+1) + if ( ! ( tok in keywords ) ) return 4 } + else { + match(line,/^[^A-Za-z_{}]/) + tok = substr(line,1,RLENGTH) + line = substr(line,RLENGTH+1) } } } + +TECHNICAL DISCUSSION + + Broadly, XREF(AWK) parses an awk program using a symbol-state + table, in much the same way as a yacc-generated parser. The + lexical analyzer recognizes seven distinct symbols: the word + "function", the left brace, the right brace, identifiers used + as variables, identifiers used as arrays, identifiers used as + functions, and end of file. The type of symbol is returned to + the parser as the value of the "lex" function, and the global + variable "tok" is set to the text of the current token. + + The symbol-state table is stored in the "machine" array. The + table can be represented as follows: + + symbol | 1 2 3 4 5 6 7 + | + state | "function" { } var array func eof + -- -- -- -- -- -- -- -+- -- -- -- -- -- -- -- -- -- -- -- -- -- + 1 any | 20 10 10 12 12 11 07 + 2 "function" | 08 08 08 08 08 33 08 + 3 "function" name | 08 44 08 36 08 08 08 + 4 "function" name "{" | 08 44 45 42 42 41 08 + + where the first digit is the state to be entered after process- + ing the current token and the second digit is an action to be + performed. The actions are listed below: + + 1 found a function call + 2 found a variable or array + 3 found a function definition + 4 found a left brace + 5 found a right brace + 6 found a local variable declaration + 7 found end of file + 8 found an error + + Each of the first six actions causes some information about the + target program to be stored for later processing; the structures + used will be discussed below. The seventh action causes the + parser to exit. The eighth action causes errors to be reported + to standard error and the program to abort. + + Before describing the intermediate data structures, we will + discuss some of the more interesting points in the action calls. + The "braces" variable keeps track of whether we are currently + within a functions; it is positive within a function and zero + without. When the right brace which causes the value of "braces" + to go from one to zero is found, the value of "nextstate" is + changed from four (scanning a function) to one (any) and the + names of local variables are forgotten. The "local" array is + accumulated from the variables found after the function name but + before the opening left brace of the function; action two care- + fully checks whether a variable is global or local before writing + to the intermediate data structure. The variable "funcname" is + the name of the current function when within a function and null + without. + + The following arrays store an intermediate representation of the + variable and function identifiers of the target program: + + names[1..nnames] = list of all identifiers, both variable and + function names; for variables, the name has the form + var(func), but for functions, there are no parentheses + + xnames[names[i]] = number of times names[i] is used + + lines[names[i],1..xnames[names[i]]] = list of line numbers + where names[i] is used + + flines[names[i]] = line number where function names[i] is + defined + + These arrays are created as the parser reads the input; when the + parser is finished, the arrays are output in user-readable form. + +PORTABILITY + + XREF(AWK) will work with any implementation of nawk. The MKS + ToolKit implementation requires the large-model version of awk. + +HISTORY + + Written by Phil Bewig on February 10, 1990. Inspired by + Exercise 3-16 of the book "The Awk Programming Language" by + Alfred V. Aho, Brian W. Kernighan and Peter J. Weinberger + (Addison-Wesley: 1988). + +COPYRIGHT + + This program is placed in the public domain. However, the + author requests credit when distributed. + diff --git a/src/test/resources/gawk/zero2.awk b/src/it/resources/gawk/zero2.awk similarity index 100% rename from src/test/resources/gawk/zero2.awk rename to src/it/resources/gawk/zero2.awk diff --git a/src/test/resources/gawk/zero2.ok b/src/it/resources/gawk/zero2.ok similarity index 100% rename from src/test/resources/gawk/zero2.ok rename to src/it/resources/gawk/zero2.ok diff --git a/src/test/resources/gawk/zeroe0.awk b/src/it/resources/gawk/zeroe0.awk similarity index 100% rename from src/test/resources/gawk/zeroe0.awk rename to src/it/resources/gawk/zeroe0.awk diff --git a/src/test/resources/gawk/zeroe0.ok b/src/it/resources/gawk/zeroe0.ok similarity index 100% rename from src/test/resources/gawk/zeroe0.ok rename to src/it/resources/gawk/zeroe0.ok diff --git a/src/test/resources/gawk/zeroflag.awk b/src/it/resources/gawk/zeroflag.awk similarity index 100% rename from src/test/resources/gawk/zeroflag.awk rename to src/it/resources/gawk/zeroflag.awk diff --git a/src/test/resources/gawk/zeroflag.ok b/src/it/resources/gawk/zeroflag.ok similarity index 100% rename from src/test/resources/gawk/zeroflag.ok rename to src/it/resources/gawk/zeroflag.ok diff --git a/src/site/markdown/compatibility.md b/src/site/markdown/compatibility.md index 00b91371..eea779f0 100644 --- a/src/site/markdown/compatibility.md +++ b/src/site/markdown/compatibility.md @@ -74,15 +74,18 @@ Jawk tuples are reusable, but they should be treated as internal artifacts tied ## Compatibility Test Suites -Jawk maintains compatibility tests derived from the BWK (One True AWK) and gawk test suites. These are run automatically as integration tests during `mvn verify`. +Jawk maintains compatibility tests derived from the BWK (One True AWK) and gawk test suites. These run automatically as integration tests during `mvn verify`. -| Suite | Tests | Coverage | -| --- | --- | --- | -| **BwkPTest** | 57 | Pattern matching and basic AWK operations from the BWK test collection | -| **BwkTTest** | 167 | Text processing, field splitting, built-in functions, and output formatting | -| **BwkMiscTest** | 1 | Miscellaneous BWK compatibility edge cases | -| **GawkTest** | 546 | Comprehensive gawk compatibility covering regex, I/O, printf, arrays, and advanced features | +Compatibility suites now live under `src/it/java`, with their vendored inputs under `src/it/resources`. +The gawk suite is metadata-driven: Jawk vendors gawk's `Makefile.am`, `Gentests`, and generated `Maketests` snapshot, parses the portable `Maketests` rules in JUnit 4, and executes those cases through the Jawk CLI without depending on `make`. -Not all gawk tests pass, primarily because Jawk uses Java regular expressions and `java.util.Formatter` rather than their C equivalents. The compatibility report generated by `mvn verify site` lists the current pass rate for each suite. +| Suite | Coverage | +| --- | --- | +| **BwkPIT** | Pattern matching and basic AWK operations from the BWK test collection | +| **BwkTIT** | Text processing, field splitting, built-in functions, and output formatting | +| **BwkMiscIT** | Miscellaneous BWK compatibility edge cases | +| **GawkCompatibilityIT** | Portable gawk compatibility derived from the vendored `Maketests` snapshot, with unsupported shell, debugger, CSV, pretty-print, lint, traditional, and bignum modes skipped explicitly | + +Not all gawk compatibility cases pass, primarily because Jawk uses Java regular expressions and `java.util.Formatter` rather than their C equivalents. Linux CI is the authoritative environment for the full compatibility pass rate. Windows can still run the portable metadata-driven subset without requiring Unix tooling. Results are stored in `target/failsafe-reports/` and summarized on the [Failsafe Report](failsafe-report.html) page of the generated site. diff --git a/src/test/java/io/jawk/AwkTestSupport.java b/src/test/java/io/jawk/AwkTestSupport.java index 2d2f40ad..0dcc9508 100644 --- a/src/test/java/io/jawk/AwkTestSupport.java +++ b/src/test/java/io/jawk/AwkTestSupport.java @@ -51,6 +51,7 @@ import java.util.stream.Collectors; import java.util.stream.Stream; import io.jawk.ext.JawkExtension; +import io.jawk.jrt.AwkRuntimeException; import io.jawk.jrt.InputSource; /** @@ -117,6 +118,21 @@ public static Path sharedTempDirectory() { return SHARED_TEMP_DIR; } + static final class OutputLimitExceededException extends RuntimeException { + private static final long serialVersionUID = 1L; + + private final int maxBytes; + + OutputLimitExceededException(int maxBytes) { + super("Captured output exceeded " + maxBytes + " bytes"); + this.maxBytes = maxBytes; + } + + int maxBytes() { + return maxBytes; + } + } + /** * Represents a fully configured test case produced by one of the builders. * Implementations know how to prepare the execution environment, run the @@ -444,6 +460,9 @@ protected AwkTestCase buildTestCase( public static final class CliTestBuilder extends BaseTestBuilder { private final List argumentSpecs = new ArrayList<>(); private final Map assignments = new LinkedHashMap<>(); + private boolean emulateCliMain; + private boolean mergeStdoutAndStderr; + private Integer maxOutputBytes; private CliTestBuilder(String description) { super(description); @@ -474,6 +493,48 @@ public CliTestBuilder preassign(String name, Object value) { return this; } + /** + * Captures CLI standard output and standard error through the same + * stream. This mirrors shell invocations that redirect {@code 2>&1}, + * allowing tests to compare diagnostics and regular output as a single + * combined result. + * + * @return this builder for method chaining + */ + public CliTestBuilder mergeStdoutAndStderr() { + mergeStdoutAndStderr = true; + return this; + } + + /** + * Executes the CLI through the same exception handling flow used by + * {@link Cli#main(String[])} so that diagnostics are rendered to the error + * stream and failures become exit codes instead of propagating as Java + * exceptions. + * + * @return this builder for method chaining + */ + public CliTestBuilder emulateCliMain() { + emulateCliMain = true; + return this; + } + + /** + * Caps the combined captured CLI output. This prevents compatibility + * suites from exhausting heap space when a script emits unbounded output. + * + * @param maxBytes maximum number of UTF-8 bytes to capture + * @return this builder for method chaining + * @throws IllegalArgumentException when {@code maxBytes} is not positive + */ + public CliTestBuilder maxOutputBytes(int maxBytes) { + if (maxBytes <= 0) { + throw new IllegalArgumentException("maxBytes must be positive"); + } + maxOutputBytes = maxBytes; + return this; + } + @Override protected CliTestCase buildTestCase( TestLayout layout, @@ -483,7 +544,17 @@ protected CliTestCase buildTestCase( if (useTempDir && !assignments.containsKey("TEMPDIR")) { assignments.put("TEMPDIR", SHARED_TEMP_DIR.toString()); } - return new CliTestCase(layout, files, operands, placeholders, requiresPosix, argumentSpecs, assignments); + return new CliTestCase( + layout, + files, + operands, + placeholders, + requiresPosix, + argumentSpecs, + assignments, + emulateCliMain, + mergeStdoutAndStderr, + maxOutputBytes); } } @@ -859,6 +930,10 @@ private TestResult executeAndCapture(ExecutionEnvironment env) throws Exception layout.expectedException, null); } catch (Throwable ex) { + OutputLimitExceededException outputLimitException = findOutputLimitExceeded(ex); + if (outputLimitException != null) { + throw outputLimitException; + } if (layout.expectedException != null && layout.expectedException.isInstance(ex)) { return new TestResult( layout.description, @@ -976,6 +1051,9 @@ protected ActualResult execute(ExecutionEnvironment env) throws Exception { private static final class CliTestCase extends BaseTestCase { private final List argumentSpecs; private final Map assignments; + private final boolean emulateCliMain; + private final boolean mergeStdoutAndStderr; + private final Integer maxOutputBytes; CliTestCase( TestLayout layout, @@ -984,10 +1062,16 @@ private static final class CliTestCase extends BaseTestCase { List pathPlaceholders, boolean requiresPosix, List argumentSpecs, - Map assignments) { + Map assignments, + boolean emulateCliMain, + boolean mergeStdoutAndStderr, + Integer maxOutputBytes) { super(layout, fileContents, operandSpecs, pathPlaceholders, requiresPosix); this.argumentSpecs = new ArrayList<>(argumentSpecs); this.assignments = new LinkedHashMap<>(assignments); + this.emulateCliMain = emulateCliMain; + this.mergeStdoutAndStderr = mergeStdoutAndStderr; + this.maxOutputBytes = maxOutputBytes; } @Override @@ -996,12 +1080,14 @@ protected ActualResult execute(ExecutionEnvironment env) throws Exception { InputStream in = stdin != null ? new ByteArrayInputStream(stdin.getBytes(StandardCharsets.UTF_8)) : new ByteArrayInputStream(new byte[0]); - ByteArrayOutputStream outBytes = new ByteArrayOutputStream(); - ByteArrayOutputStream errBytes = new ByteArrayOutputStream(); - Cli cli = new Cli( - in, - new PrintStream(outBytes, true, StandardCharsets.UTF_8.name()), - new PrintStream(errBytes, true, StandardCharsets.UTF_8.name())); + ByteArrayOutputStream outBytes = maxOutputBytes != null ? + new LimitedByteArrayOutputStream(maxOutputBytes.intValue()) : + new ByteArrayOutputStream(); + PrintStream stdout = new PrintStream(outBytes, true, StandardCharsets.UTF_8.name()); + PrintStream stderr = mergeStdoutAndStderr ? + stdout : + new PrintStream(new ByteArrayOutputStream(), true, StandardCharsets.UTF_8.name()); + Cli cli = new Cli(in, stdout, stderr); List args = new ArrayList<>(); for (Map.Entry entry : assignments.entrySet()) { @@ -1019,8 +1105,12 @@ protected ActualResult execute(ExecutionEnvironment env) throws Exception { int exitCode = 0; try { - cli.parse(args.toArray(new String[0])); - cli.run(); + if (emulateCliMain) { + exitCode = executeLikeCliMain(cli, stderr, args); + } else { + cli.parse(args.toArray(new String[0])); + cli.run(); + } } catch (ExitException ex) { exitCode = ex.getCode(); } @@ -1028,6 +1118,60 @@ protected ActualResult execute(ExecutionEnvironment env) throws Exception { outBytes.toString(StandardCharsets.UTF_8.name()), exitCode); } + + private static int executeLikeCliMain(Cli cli, PrintStream err, List args) throws Exception { + try { + cli.parse(args.toArray(new String[0])); + cli.run(); + return 0; + } catch (ExitException ex) { + return ex.getCode(); + } catch (AwkRuntimeException ex) { + OutputLimitExceededException outputLimitException = findOutputLimitExceeded(ex); + if (outputLimitException != null) { + throw outputLimitException; + } + if (ex.getLineNumber() > 0) { + err.printf("%s (line %d): %s%n", ex.getClass().getSimpleName(), ex.getLineNumber(), ex.getMessage()); + } else { + err.printf("%s: %s%n", ex.getClass().getSimpleName(), ex.getMessage()); + } + return 1; + } catch (IllegalArgumentException ex) { + err.println("Failed to parse arguments. Please see the help/usage output (cmd line switch '-h')."); + ex.printStackTrace(err); + return 1; + } catch (Exception ex) { + err.printf("%s: %s%n", ex.getClass().getSimpleName(), ex.getMessage()); + return 1; + } + } + } + + private static final class LimitedByteArrayOutputStream extends ByteArrayOutputStream { + private final int maxBytes; + + LimitedByteArrayOutputStream(int maxBytes) { + this.maxBytes = maxBytes; + } + + @Override + public synchronized void write(int b) { + ensureCapacityFor(1); + super.write(b); + } + + @Override + public synchronized void write(byte[] b, int off, int len) { + ensureCapacityFor(len); + super.write(b, off, len); + } + + private void ensureCapacityFor(int additionalBytes) { + if (additionalBytes > 0 && count > maxBytes - additionalBytes) { + throw new OutputLimitExceededException(maxBytes); + } + } } private static final class ExecutionEnvironment { @@ -1122,6 +1266,17 @@ private static void deleteRecursively(Path root) throws IOException { } } + private static OutputLimitExceededException findOutputLimitExceeded(Throwable throwable) { + Throwable current = throwable; + while (current != null) { + if (current instanceof OutputLimitExceededException) { + return (OutputLimitExceededException) current; + } + current = current.getCause(); + } + return null; + } + private static String escapeForAwkString(String value) { StringBuilder builder = new StringBuilder(value.length() * 2); for (int i = 0; i < value.length(); i++) { diff --git a/src/test/java/io/jawk/CliOptionTest.java b/src/test/java/io/jawk/CliOptionTest.java index 9c2e7503..ad47f5c2 100644 --- a/src/test/java/io/jawk/CliOptionTest.java +++ b/src/test/java/io/jawk/CliOptionTest.java @@ -128,6 +128,15 @@ public void helpOutputDoesNotAdvertiseUnsupportedOutputOption() throws Exception assertFalse(result.output().contains(" -o = ")); } + @Test(expected = AwkTestSupport.OutputLimitExceededException.class) + public void cliTestBuilderRejectsRunawayOutput() throws Exception { + AwkTestSupport + .cliTest("CLI output limit") + .script("BEGIN { for (i = 0; i < 1000; i++) print \"0123456789\" }") + .maxOutputBytes(64) + .run(); + } + @Test public void loadOptionWithWrongSerializedTypeThrowsFriendlyError() throws Exception { File bad = tempFolder.newFile("wrong-type.ser"); diff --git a/src/test/java/io/jawk/GawkMaketestsParserTest.java b/src/test/java/io/jawk/GawkMaketestsParserTest.java new file mode 100644 index 00000000..f10a9670 --- /dev/null +++ b/src/test/java/io/jawk/GawkMaketestsParserTest.java @@ -0,0 +1,166 @@ +package io.jawk; + +/*- + * ╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲ + * Jawk + * ჻჻჻჻჻჻ + * Copyright (C) 2006 - 2026 MetricsHub + * ჻჻჻჻჻჻ + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * . + * ╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱ + */ + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + +import java.io.StringReader; +import java.util.List; +import org.junit.Test; + +/** + * Unit tests for the metadata parser that converts gawk's generated + * {@code Maketests} rules into Jawk compatibility cases. + */ +public class GawkMaketestsParserTest { + + /** + * Verifies that a standard generated AWK rule preserves stdin redirection and + * the default expected output file. + * + * @throws Exception when parsing the sample metadata fails + */ + @Test + public void parseStandardRuleWithStdin() throws Exception { + GawkMaketestsParser.GawkCase gawkCase = parseSingleCase( + "Gt-dummy:\n" + + "# file Maketests\n\n" + + "addcomma:\n" + + "\t@echo $@\n" + + "\t@-AWKPATH=\"$(srcdir)\" $(AWK) -f $@.awk < \"$(srcdir)\"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@\n" + + "\t@-$(CMP) \"$(srcdir)\"/$@.ok _$@ && rm -f _$@\n"); + + assertEquals("addcomma", gawkCase.name()); + assertEquals("awk", gawkCase.scriptMode()); + assertEquals("addcomma.awk", gawkCase.scriptFileName()); + assertEquals("addcomma.in", gawkCase.stdinFileName()); + assertEquals("addcomma.ok", gawkCase.expectedFileName()); + assertFalse(gawkCase.requiresExplicitSkip()); + } + + /** + * Verifies that locale directives and supported CLI flags are preserved for + * later execution by the Jawk harness. + * + * @throws Exception when parsing the sample metadata fails + */ + @Test + public void parseLocaleAndSupportedFlags() throws Exception { + GawkMaketestsParser.GawkCase gawkCase = parseSingleCase( + "concat4:\n" + + "\t@echo $@\n" + + "\t@-[ -z \"$$GAWKLOCALE\" ] && GAWKLOCALE=en_US.UTF-8; export GAWKLOCALE; \\\n" + + "\tAWKPATH=\"$(srcdir)\" $(AWK) -f $@.awk --posix >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@\n" + + "\t@-$(CMP) \"$(srcdir)\"/$@.ok _$@ && rm -f _$@\n"); + + assertEquals("en-US", gawkCase.localeTag()); + assertEquals(1, gawkCase.runnableFlags().size()); + assertEquals("--posix", gawkCase.runnableFlags().get(0)); + assertFalse(gawkCase.requiresExplicitSkip()); + } + + /** + * Verifies that shell-script rules are identified as explicit skips because + * the Jawk harness does not execute external shell scripts in-process. + * + * @throws Exception when parsing the sample metadata fails + */ + @Test + public void parseShellRuleAsUnsupported() throws Exception { + GawkMaketestsParser.GawkCase gawkCase = parseSingleCase( + "randtest:\n" + + "\t@echo $@\n" + + "\t@-$(LOCALES) AWK=\"$(AWKPROG)\" \"$(srcdir)\"/$@.sh > _$@ 2>&1 || echo EXIT CODE: $$? >>_$@\n" + + "\t@-$(CMP) \"$(srcdir)\"/$@.ok _$@ && rm -f _$@\n"); + + assertEquals("sh", gawkCase.scriptMode()); + assertTrue(gawkCase.requiresExplicitSkip()); + assertTrue(gawkCase.unsupportedFlags().isEmpty()); + } + + /** + * Verifies that unsupported gawk-only CLI flags are surfaced for explicit + * skip coverage. + * + * @throws Exception when parsing the sample metadata fails + */ + @Test + public void parseUnsupportedFlags() throws Exception { + GawkMaketestsParser.GawkCase gawkCase = parseSingleCase( + "csv1:\n" + + "\t@echo $@\n" + + "\t@-AWKPATH=\"$(srcdir)\" $(AWK) -f $@.awk --csv < \"$(srcdir)\"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@\n" + + "\t@-$(CMP) \"$(srcdir)\"/$@.ok _$@ && rm -f _$@\n"); + + assertEquals(1, gawkCase.unsupportedFlags().size()); + assertEquals("--csv", gawkCase.unsupportedFlags().get(0)); + assertTrue(gawkCase.requiresExplicitSkip()); + } + + /** + * Verifies that MPFR-specific expected-output switching is retained in the + * parsed metadata even when Jawk does not execute the test in bignum mode. + * + * @throws Exception when parsing the sample metadata fails + */ + @Test + public void parseMpfrExpectedVariant() throws Exception { + GawkMaketestsParser.GawkCase gawkCase = parseSingleCase( + "arraytype:\n" + + "\t@echo $@\n" + + "\t@-AWKPATH=\"$(srcdir)\" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@\n" + + "\t@-if echo \"$$GAWK_TEST_ARGS\" | egrep -q -e '-M|--bignum' > /dev/null ; \\\n" + + "\tthen $(CMP) \"$(srcdir)\"/$@-mpfr.ok _$@ && rm -f _$@ ; \\\n" + + "\telse $(CMP) \"$(srcdir)\"/$@.ok _$@ && rm -f _$@ ; fi\n"); + + assertTrue(gawkCase.hasMpfrExpectedVariant()); + assertEquals("arraytype.ok", gawkCase.expectedFileName()); + } + + /** + * Verifies that gawk CLI flags that Jawk implements implicitly can be parsed + * without forcing an explicit skip entry. + * + * @throws Exception when parsing the sample metadata fails + */ + @Test + public void parseNoOpCompatibilityFlags() throws Exception { + GawkMaketestsParser.GawkCase gawkCase = parseSingleCase( + "reint:\n" + + "\t@echo $@\n" + + "\t@-AWKPATH=\"$(srcdir)\" $(AWK) -f $@.awk --re-interval < \"$(srcdir)\"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@\n" + + "\t@-$(CMP) \"$(srcdir)\"/$@.ok _$@ && rm -f _$@\n"); + + assertTrue(gawkCase.flags().contains("--re-interval")); + assertTrue(gawkCase.unsupportedFlags().isEmpty()); + assertFalse(gawkCase.requiresExplicitSkip()); + } + + private static GawkMaketestsParser.GawkCase parseSingleCase(String maketestsSnippet) throws Exception { + List cases = GawkMaketestsParser.parse(new StringReader(maketestsSnippet)); + assertEquals(1, cases.size()); + return cases.get(0); + } +} diff --git a/src/test/java/io/jawk/GawkTest.java b/src/test/java/io/jawk/GawkTest.java deleted file mode 100644 index e7ec1a31..00000000 --- a/src/test/java/io/jawk/GawkTest.java +++ /dev/null @@ -1,133 +0,0 @@ -package io.jawk; - -/*- - * ╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲ - * Jawk - * ჻჻჻჻჻჻ - * Copyright (C) 2006 - 2026 MetricsHub - * ჻჻჻჻჻჻ - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . - * ╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱ - */ - -import static org.junit.Assert.*; - -import java.io.File; -import java.io.IOException; -import java.net.URL; -import java.nio.charset.StandardCharsets; -import java.nio.file.Files; -import java.util.Arrays; -import java.util.List; -import java.util.stream.Collectors; -import java.util.stream.IntStream; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.Parameterized; -import org.junit.runners.Parameterized.Parameter; -import org.junit.runners.Parameterized.Parameters; - -/** - * Test Suite based on unit and non-regression tests from gawk. - * Each AWK script in the src/test/resources/gawk directory will be - * executed against the corresponding *.in input, and its output will - * be compared to the corresponding *.ok file. - */ -@RunWith(Parameterized.class) -public class GawkTest { - - /** - * Initialization of the tests (create a temporary directory for some of the scripts) - * - * @throws Exception - */ - @BeforeClass - public static void beforeAll() throws Exception {} - - /** - * @return the list of awk scripts in /src/test/resources/gawk - * @throws Exception - */ - @Parameters(name = "GAWK {0}") - public static Iterable awkList() throws Exception { - // Get the /gawk resource directory - URL scriptsUrl = GawkTest.class.getResource("/gawk"); - if (scriptsUrl == null) { - throw new IOException("Couldn't find resource /gawk"); - } - - File scriptsDir = new File(scriptsUrl.toURI()); - if (!scriptsDir.isDirectory()) { - throw new IOException("/gawk is not a directory"); - } - - return Arrays - .stream(scriptsDir.listFiles()) - .filter(sf -> sf.getName().toLowerCase().endsWith(".awk")) - .map(File::getAbsolutePath) - .collect(Collectors.toList()); - } - - /** Path to the AWK test script to execute */ - @Parameter - public String awkPath; - - /** - * Execute the AWK script stored in {@link #awkPath} - * - * @throws Exception - */ - @Test - public void test() throws Exception { - // Get the AWK script file and parent directory - File awkFile = new File(awkPath); - String shortName = awkFile.getName().substring(0, awkFile.getName().length() - 4); - File parent = awkFile.getParentFile(); - // Get the file with the expected result - File okFile = new File(parent, shortName + ".ok"); - - // Load the file with the expected result - String expectedResult = loadExpectedResult(okFile); - - // Get the list of input files (usually *.in, but could be *.in1, *.in2, etc.) - List inputFileList = IntStream - .range(0, 10) - .mapToObj(i -> (i == 0 ? "" : String.valueOf(i))) - .map(i -> new File(parent, shortName + ".in" + i)) - .filter(File::isFile) - .collect(Collectors.toList()); - - AwkTestSupport.CliTestBuilder builder = AwkTestSupport - .cliTest("GAWK " + shortName) - .argument("-f", awkFile.getAbsolutePath()) - .withTempDir() - .expect(expectedResult); - for (File input : inputFileList) { - builder.operand(input.getAbsolutePath()); - } - builder.build().run().assertExpected(); - } - - private static String loadExpectedResult(File okFile) throws IOException { - String expectedResult = new String(Files.readAllBytes(okFile.toPath()), StandardCharsets.UTF_8); - return normalizeExpectedResult(expectedResult); - } - - private static String normalizeExpectedResult(String expectedResult) { - return expectedResult.replace("\r\n", "\n"); - } - -} diff --git a/src/test/resources/gawk/dtdgport.in b/src/test/resources/gawk/dtdgport.in deleted file mode 100644 index c3362f70..00000000 --- a/src/test/resources/gawk/dtdgport.in +++ /dev/null @@ -1,476 +0,0 @@ - - 4.0.0 - - jawk.io - jawk - 4.0.00-SNAPSHOT - - jar - - Jawk - Java AWK interpreter, allowing Java to call and execute AWK scripts in the JVM. - https://jawk.io - 2006 - - - Jawk - https://jawk.io - - - - - ossrh - https://s01.oss.sonatype.org/content/repositories/snapshots - - - ossrh - https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ - - - - - - LGPL-3.0-only - https://spdx.org/licenses/LGPL-3.0-only.html - repo - - - GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html - manual - - - - - GitHub - https://github.com/jawkio/jawk/issues/ - - - - scm:git:https://github.com/jawkio/jawk.git - https://github.com/jawkio/jawk - HEAD - - - - - Danny Daglas (@ddaglas) - - Project founder - - - - Robin Vobruba (@hoijui) - hoijui.quaero@gmail.com - - Maintainer - - - - Bertrand Martin (@bertysentry) - bertrand@metricshub.com - - Maintainer - - - - - - - - 8 - - - UTF-8 - ${project.build.encoding} - ${project.build.encoding} - - - - 2024-01-18T15:17:38Z - - - - - - - org.slf4j - slf4j-api - 2.0.11 - - - - org.slf4j - slf4j-simple - 2.0.11 - - - - org.metricshub - printf4j - 0.9.08 - - - - com.github.stefanbirkner - system-rules - 1.19.0 - test - - - - junit - junit - 4.13.2 - test - - - - - - - - - - maven-compiler-plugin - 3.12.1 - - - - - maven-source-plugin - 3.3.0 - - - attach-sources - - jar - - - - - - - - maven-resources-plugin - 3.3.1 - - - - - org.codehaus.mojo - license-maven-plugin - 2.3.0 - - lgpl_v3 - Jawk - Copyright %1$s %2$s - - main/java/**/*.java - - true - true - true - ╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲ - ჻჻჻჻჻჻ - ╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱ - - - - check-license - process-sources - - check-file-header - - - true - - - - - - - - maven-javadoc-plugin - 3.6.3 - - - attach-javadocs - - jar - - - ${maven.compiler.release} - - - - - - - - maven-surefire-plugin - 3.2.5 - - - **/*GawkTest.java - **/Bwk*Test.java - - ${project.build.directory}/test-classes - - - - - - maven-site-plugin - 3.12.1 - - - org.sentrysoftware.maven - maven-skin-tools - 1.3.00 - - - - - - - maven-jar-plugin - 3.3.0 - - - - ${project.groupId} - io.jawk.Awk - - - - - - - - maven-shade-plugin - 3.5.0 - - - standalone - package - - shade - - - true - standalone - false - - - - *:* - - META-INF/*.SF - META-INF/*.RSA - - - - - - - - - - - maven-install-plugin - 3.1.1 - - - - - maven-deploy-plugin - 3.1.1 - - - - - - - - - - - maven-jxr-plugin - 3.3.2 - - - - - maven-checkstyle-plugin - 3.3.1 - - ${project.build.sourceEncoding} - true - checkstyle.xml - - - - - - maven-pmd-plugin - 3.21.2 - - true - ${project.build.sourceEncoding} - 50 - ${maven.compiler.target} - - - - - - com.github.spotbugs - spotbugs-maven-plugin - 4.8.3.0 - - - - - maven-changelog-plugin - 2.3 - - - - - maven-surefire-report-plugin - 3.2.5 - - - - - maven-javadoc-plugin - - - - javadoc - - - - - - - - maven-project-info-reports-plugin - 3.5.0 - - - - ci-management - dependencies - dependency-info - dependency-management - distribution-management - issue-management - licenses - mailing-lists - modules - plugin-management - plugins - scm - summary - team - - - - - - - - - - - - - release - - - - - - maven-artifact-plugin - 3.5.0 - - - buildinfo - verify - - buildinfo - - - true - - - - - - - - maven-gpg-plugin - 3.1.0 - - - sign-artifacts - verify - - sign - - - true - - --pinentry-mode - loopback - - - - - - - - - org.sonatype.plugins - nexus-staging-maven-plugin - 1.6.13 - true - - ossrh - https://s01.oss.sonatype.org - ${env.AUTO_RELEASE_AFTER_CLOSE} - - - - - - org.apache.maven.plugins - maven-release-plugin - 3.0.1 - - v@{project.version} - - - - default - - perform - - - - - - - - - - - diff --git a/src/test/resources/gawk/dtdgport.ok b/src/test/resources/gawk/dtdgport.ok deleted file mode 100644 index 61755cf3..00000000 --- a/src/test/resources/gawk/dtdgport.ok +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/test/resources/gawk/getline2.in1 b/src/test/resources/gawk/getline2.in1 deleted file mode 100644 index a29bdeb4..00000000 --- a/src/test/resources/gawk/getline2.in1 +++ /dev/null @@ -1 +0,0 @@ -line1 diff --git a/src/test/resources/gawk/getline2.in2 b/src/test/resources/gawk/getline2.in2 deleted file mode 100644 index 8a6a2d09..00000000 --- a/src/test/resources/gawk/getline2.in2 +++ /dev/null @@ -1 +0,0 @@ -line2 diff --git a/src/test/resources/gawk/getline2.ok b/src/test/resources/gawk/getline2.ok deleted file mode 100644 index f8be7bb8..00000000 --- a/src/test/resources/gawk/getline2.ok +++ /dev/null @@ -1,2 +0,0 @@ -line1 -line2 \ No newline at end of file diff --git a/src/test/resources/gawk/gtlnbufv.in b/src/test/resources/gawk/gtlnbufv.in deleted file mode 100644 index 062b377f..00000000 --- a/src/test/resources/gawk/gtlnbufv.in +++ /dev/null @@ -1,1708 +0,0 @@ -EXTRA_INFO.TYP3.EC := EC; -EXTRA_INFO.TYP3.TEXT:= 'CONNECT_SERVICE TO OAM FAILED'; - -G9PXYA1S!G9TE500_EHP_P( -'G9IBSA1C003', /*@@ID*/ -G9PXYA1S!G9TE102_ERR_CLASS_SWERR, /*@@CLASS*/ -ADDR(EXTRA_INFO.ERROR_HANDLER), /* EXTRA-INFO ADDR */ -G9PXYA1S!G9TE100_GB_LM, /* USER-ID */ -NULL /* OPTIONAL-SWET-INFO ADDR */ -); -/***@@@ END OF ERROR ***/ - -@K@FREEZE -917596041 -@K@NAME -T_ERR4_1 -@K@INSCRIPT -ERROR_HANDLING: -DB_OVERFLOW -MP/NSEI -@K@CODE -/***@@@ ERROR ***/ -/*@@ERRORTEXT -*@ DB-OVERFLOW -*@ -*@ -*@@DESCRIPTION -*@ THE INSTANCE-CREATION WAS NOT POSSIBLE -*@ BECAUSE THE DATABASE WOULD OVERFLOW -*@ -*@@EXTRA INFO -*@ (EXTRA_INFO_4_STRUCT) -*@ NSEI -*@ NSVCI -*@ TEXT -*@ -*/ - -EXTRA_INFO.TYP4.NSEI := EVD_PTR->.KEYS.INT_ARR(0); -EXTRA_INFO.TYP4.NSVCI:= EVD_PTR->.KEYS.INT_ARR(1); -EXTRA_INFO.TYP4.TEXT := 'NSVC-HAND.: MP/NSEI-OVERFLOW'; - -G9PXYA1S!G9TE500_EHP_P( -'G9IBSA1C004', /*@@ID*/ -G9PXYA1S!G9TE102_ERR_CLASS_ESC_MAX_ANY, /*@@CLASS*/ -ADDR(EXTRA_INFO.ERROR_HANDLER), /* EXTRA-INFO ADDR */ -G9PXYA1S!G9TE100_GB_LM, /* USER-ID */ -NULL /* OPTIONAL-SWET-INFO ADDR */ -); -/***@@@ END OF ERROR ***/ - -@K@FREEZE -920903219 -@K@NAME -T_ERR4_2 -@K@INSCRIPT -ERROR_HANDLING: -DB_OVERFLOW -MP/NSVCI -@K@CODE -/***@@@ ERROR ***/ -/*@@ERRORTEXT -*@ DB-OVERFLOW -*@ -*@ -*@@DESCRIPTION -*@ THE INSTANCE-CREATION WAS NOT POSSIBLE -*@ BECAUSE THE DATABASE WOULD OVERFLOW -*@ -*@@EXTRA INFO -*@ (EXTRA_INFO_4_STRUCT) -*@ NSEI -*@ NSVCI -*@ TEXT -*@ -*/ - -EXTRA_INFO.TYP4.NSEI := EVD_PTR->.KEYS.INT_ARR(0); -EXTRA_INFO.TYP4.NSVCI:= EVD_PTR->.KEYS.INT_ARR(1); -EXTRA_INFO.TYP4.TEXT := 'NSVC-HAND.: MP/NSVCI-OVERFLOW'; - -G9PXYA1S!G9TE500_EHP_P( -'G9IBSA1C004', /*@@ID*/ -G9PXYA1S!G9TE102_ERR_CLASS_ESC_MAX_ANY, /*@@CLASS*/ -ADDR(EXTRA_INFO.ERROR_HANDLER), /* EXTRA-INFO ADDR */ -G9PXYA1S!G9TE100_GB_LM, /* USER-ID */ -NULL /* OPTIONAL-SWET-INFO ADDR */ -); -/***@@@ END OF ERROR ***/ - -@K@FREEZE -920903222 -@K@NAME -T_ERR4_3 -@K@INSCRIPT -ERROR_HANDLING: -DB_OVERFLOW -NSEI/NSVCI -@K@CODE -/***@@@ ERROR ***/ -/*@@ERRORTEXT -*@ DB-OVERFLOW -*@ -*@ -*@@DESCRIPTION -*@ THE INSTANCE-CREATION WAS NOT POSSIBLE -*@ BECAUSE THE DATABASE WOULD OVERFLOW -*@ -*@@EXTRA INFO -*@ (EXTRA_INFO_4_STRUCT) -*@ NSEI -*@ NSVCI -*@ TEXT -*@ -*/ - -EXTRA_INFO.TYP4.NSEI := EVD_PTR->.KEYS.INT_ARR(0); -EXTRA_INFO.TYP4.NSVCI:= EVD_PTR->.KEYS.INT_ARR(1); -EXTRA_INFO.TYP4.TEXT := 'NSVC-HAND.: NSEI/NSVC-OVERFLOW'; - -G9PXYA1S!G9TE500_EHP_P( -'G9IBSA1C004', /*@@ID*/ -G9PXYA1S!G9TE102_ERR_CLASS_ESC_MAX_ANY, /*@@CLASS*/ -ADDR(EXTRA_INFO.ERROR_HANDLER), /* EXTRA-INFO ADDR */ -G9PXYA1S!G9TE100_GB_LM, /* USER-ID */ -NULL /* OPTIONAL-SWET-INFO ADDR */ -); -/***@@@ END OF ERROR ***/ - -@K@FREEZE -920903226 -@K@NAME -TR_RESET -@K@INSCRIPT -RESTART_ -TNS_RESET_ -TIMER -@K@CODE -/* TIMER EVENT DESCRIPTOR STILL THERE */ - -/* INITIALIZATION OF THE TIMER-EVENT-DESCRIPTOR STILL VALID */ -NSVCI_CON_PTR->.TIM_EVD_PTR->.TIMER:= TNS_RESET_MAP; - -/* START TIMER */ -G9PX508_START_TIMER_P -( -NSVCI_CON_PTR->.TIM_EVD_PTR -); - -@K@FREEZE -924684867 -@K@NAME -TX_AUDIT -@K@INSCRIPT -FOR -AUDIT - -@K@NAME -M_BLKOACKM -@K@INSCRIPT -NS_ -BLOCK_ACK -@K@CODE -/* GETTING THE EVENT DESCRIPTOR */ -G9PB511_GET_MSG_BOUND_EV_DESCR_P -( -SID_GBNSVC, -(SIZE(G9IBDF4_NS_LM_M) + G9IBD44_NS_PDU_DATA_OFFSET_C), -TX_EVD_PTR -); - -/* COMPOSING THE EVENT */ -/* FIRST THE DESCRIPTOR */ -TX_EVD_PTR->.EVENT_CMD:= G9IBD40_NS_LM_PDU_C; -TX_EVD_PTR->.EVENT_DESTINATION:= GBDL_HANDLE; - -IF -/* 'OTHER' ALIVE NSVC TO THIS NSEI EXISTING? */ -NSVCI_CON_PTR->.OWN_NSEI_CON_PTR->.NEXT_ALIV_NSVCI_CON_PTR /= NULL -THEN -/* USE THIS 'OTHER' FOR TRANSPORT */ -TX_EVD_PTR->.KEYS.INT_ARR(0):= - -NSVCI_CON_PTR->.OWN_NSEI_CON_PTR->.NEXT_ALIV_NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSEI; -/* NSEI TO BE USED FOR TRANSPORT */ -TX_EVD_PTR->.KEYS.INT_ARR(1):= - -NSVCI_CON_PTR->.OWN_NSEI_CON_PTR->.NEXT_ALIV_NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; -/* NSVCI TO BE USED FOR TRANSPORT */ -ELSE -/* USE AFFECTED NSVC AGAIN FOR TRANSPORT */ -TX_EVD_PTR->.KEYS.INT_ARR(0):= - NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSEI; /* NSEI TO BE USED FOR -TRANSPORT */ -TX_EVD_PTR->.KEYS.INT_ARR(1):= - NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; /* NSVCI TO BE USED FOR -TRANSPORT */ -FI; - - -/* POINTER TO PDU IN POOL-ELEMENT */ -NS_PDU_PTR:= NS_PDU_REF_M (INT(TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT) - + G9IBD44_NS_PDU_DATA_OFFSET_C); -/* OFFSET OF THE PDU IN POOL-ELEMENT */ -TX_EVD_PTR->.BOUND.DATA_OFFSET:= G9IBD44_NS_PDU_DATA_OFFSET_C; -/* LENGTH OF THE PDU IN POOL-ELEMENT */ -TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(NS_PDU_PTR->.G9IBDF4_PDU_TYPE) + -SIZE(NS_PDU_PTR->.D3); - -/* NOW THE POOL-ELEMENT */ -NS_PDU_PTR->.G9IBDF4_PDU_TYPE:= G9IBDR2_NS_BLOCK_ACK_C; /* PDU-TYPE */ - -NS_PDU_PTR->.D3.NSVCI_TLV.NSVCI_VAL := - NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; /* NSVC TO BE BLOCKED */ - - -/* SENDING */ -G9PX503_POST_EVENT_P(TX_EVD_PTR); - -@K@FREEZE -938805885 -@K@NAME -T_RCTRUE -@K@INSCRIPT -RC -= -TRUE -@K@CODE -RC:= TRUE; - -@K@FREEZE -922176328 -@K@NAME -M_AC_SBVCN -@K@INSCRIPT -G9IBME0_ -ACT_ -SIGN_BVC_C -@K@CODE -/* GETTING THE EVENT DESCRIPTOR */ -G9PB512_GET_MSG_LESS_EV_DESCR_P -( -SID_GBNSVC, -TX_EVD_PTR -); - - -/* COMPOSING THE EVENT */ -TX_EVD_PTR->.EVENT_CMD:= G9IBME0_ACT_SIGN_BVC_C; -TX_EVD_PTR->.EVENT_DESTINATION:= GBBVC_HANDLE; -TX_EVD_PTR->.KEYS.INT_ARR(0):= EVD_PTR->.KEYS.INT_ARR(0); -TX_EVD_PTR->.KEYS.INT_ARR(1):= SIGN_BVCI; - - - -/* SENDING */ -G9PX503_POST_EVENT_P(TX_EVD_PTR); - -@K@FREEZE -938788211 -@K@NAME -T_RC_EOD -@K@INSCRIPT -RC -= -END OF DATA - -@K@CODE -RC:= G9IBSM4_RC_END_OF_DATA; - -@K@FREEZE -921083785 -@K@NAME -T_RC_EMP -@K@INSCRIPT -RC -= -EMPTY - -@K@CODE -RC:= G9IBSM4_RC_EMPTY; - -@K@FREEZE -921083757 -@K@NAME -T_RC_ERR -@K@INSCRIPT -RC -= -ERROR - -@K@CODE -RC:= G9IBSM4_RC_ERROR; - -@K@FREEZE -921083731 -@K@NAME -S_UNUSED -@K@INSCRIPT -G9IBSM0_ -UNUSED -@K@CODE - - -@K@FREEZE -919416670 -@K@NAME -TA_UNBLOCK -@K@INSCRIPT -START_ -TNS_UNBLOCK_ -TIMER -@K@CODE -/* GET TIMER-EVENT DESCRIPTOR */ -G9PB513_GET_TIMER_EV_DESCR_P -( -SID_GBNSVC, -NSVCI_CON_PTR->.TIM_EVD_PTR -); - -/* INITIALIZATION OF THE TIMER-EVENT-DESCRIPTOR */ -NSVCI_CON_PTR->.TIM_EVD_PTR->.EVENT_CMD:= G9IBSE4_TO_TNS_C; -NSVCI_CON_PTR->.TIM_EVD_PTR->.EVENT_DESTINATION:= GBNSVC_HANDLE; -NSVCI_CON_PTR->.TIM_EVD_PTR->.KEYS.INT_ARR(0):= -NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSEI; -NSVCI_CON_PTR->.TIM_EVD_PTR->.KEYS.INT_ARR(1):= -NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; -NSVCI_CON_PTR->.TIM_EVD_PTR->.TIMER:= TNS_UNBLOCK_MAP; - -/* START TIMER */ -G9PX508_START_TIMER_P -( -NSVCI_CON_PTR->.TIM_EVD_PTR -); - -@K@FREEZE -924686210 -@K@NAME -M_BLK_ACKM -@K@INSCRIPT -NS_ -BLOCK_ACK -@K@CODE -/* GETTING THE EVENT DESCRIPTOR */ -G9PB511_GET_MSG_BOUND_EV_DESCR_P -( -SID_GBNSVC, -(SIZE(G9IBDF4_NS_LM_M) + G9IBD44_NS_PDU_DATA_OFFSET_C), -TX_EVD_PTR -); - -/* COMPOSING THE EVENT */ -/* FIRST THE DESCRIPTOR */ -TX_EVD_PTR->.EVENT_CMD:= G9IBD40_NS_LM_PDU_C; -TX_EVD_PTR->.EVENT_DESTINATION:= GBDL_HANDLE; -TX_EVD_PTR->.KEYS.INT_ARR(0):= -NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSEI; /* NSEI TO BE USED FOR -TRANSPORT */ -TX_EVD_PTR->.KEYS.INT_ARR(1):= -NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; /* NSVCI TO BE USED FOR -TRANSPORT */ -/* POINTER TO PDU IN POOL-ELEMENT */ -NS_PDU_PTR:= NS_PDU_REF_M (INT(TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT) - + G9IBD44_NS_PDU_DATA_OFFSET_C); -/* OFFSET OF THE PDU IN POOL-ELEMENT */ -TX_EVD_PTR->.BOUND.DATA_OFFSET:= G9IBD44_NS_PDU_DATA_OFFSET_C; -/* LENGTH OF THE PDU IN POOL-ELEMENT */ -TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(NS_PDU_PTR->.G9IBDF4_PDU_TYPE) + -SIZE(NS_PDU_PTR->.D3); - -/* NOW THE POOL-ELEMENT */ -NS_PDU_PTR->.G9IBDF4_PDU_TYPE:= G9IBDR2_NS_BLOCK_ACK_C; /* PDU-TYPE */ - -NS_PDU_PTR->.D3.NSVCI_TLV.NSVCI_VAL := - NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; /* NSVC TO BE BLOCKED */ - - -/* SENDING */ -G9PX503_POST_EVENT_P(TX_EVD_PTR); - -@K@FREEZE -926348442 -@K@NAME -TA_NXTALIV -@K@INSCRIPT -DEFINE -NEW 'NEXT_ -ALIVE' -@K@CODE -IF -/* ALIVE NSVC TO THE NSEI EXISTING? */ -NSVCI_CON_PTR->.OWN_NSEI_CON_PTR->.NEXT_ALIV_NSVCI_CON_PTR /= NULL - -THEN -/* TAKE NEXT ELEMENT IN THE LINKED LIST AS THE NEXT ALIVE NSVC */ -NSVCI_CON_PTR->.OWN_NSEI_CON_PTR->.NEXT_ALIV_NSVCI_CON_PTR:= - -NSVCI_CON_PTR->.OWN_NSEI_CON_PTR->.NEXT_ALIV_NSVCI_CON_PTR->.NEXT_ALV_NSVCI_CON_PTR; - -FI; - -@K@FREEZE -938801086 -@K@NAME -M_DE_CBVCN -@K@INSCRIPT -G9IBME2_ -DEACT_ -CELL_BVC_C - -@K@CODE -/* GETTING THE EVENT DESCRIPTOR */ -G9PB512_GET_MSG_LESS_EV_DESCR_P -( -SID_GBNSVC, -TX_EVD_PTR -); - - -/* COMPOSING THE EVENT */ -TX_EVD_PTR->.EVENT_CMD:= G9IBME2_DEACT_CELL_BVC_C; -TX_EVD_PTR->.EVENT_DESTINATION:= GBBVC_HANDLE; -TX_EVD_PTR->.KEYS.INT_ARR(0):= -NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSEI; -TX_EVD_PTR->.KEYS.INT_ARR(1):= EVD_PTR->.ADD_DATA(3); - - - -/* SENDING */ -G9PX503_POST_EVENT_P(TX_EVD_PTR); - -@K@FREEZE -933318270 -@K@NAME -TA_NXTRESP -@K@INSCRIPT -DEFINE -NEW 'NEXT_ -RESPONSIBLE' -@K@CODE -NSEI_CON_PTR->.NEXT_RESP_NSVCI_CON_PTR:= - NSEI_CON_PTR->.NEXT_RESP_NSVCI_CON_PTR->.NEXT_LSP_NSVCI_CON_PTR; - - -@K@FREEZE -938005006 -@K@NAME -TA_NXTSUBS -@K@INSCRIPT -DEFINE -NEW 'NEXT_ -SUBSTITUTE' -@K@CODE -NSEI_CON_PTR->.NEXT_SUBS_NSVCI_CON_PTR:= - NSEI_CON_PTR->.NEXT_SUBS_NSVCI_CON_PTR->.NEXT_UBL_NSVCI_CON_PTR; - -@K@NAME -M_BLK_O__M -@K@INSCRIPT -NS_ -BLOCK -@K@CODE -/* GETTING THE EVENT DESCRIPTOR */ -G9PB511_GET_MSG_BOUND_EV_DESCR_P -( -SID_GBNSVC, -(SIZE(G9IBDF4_NS_LM_M) + G9IBD44_NS_PDU_DATA_OFFSET_C), -TX_EVD_PTR -); - -/* COMPOSING THE EVENT */ -/* FIRST THE DESCRIPTOR */ -TX_EVD_PTR->.EVENT_CMD:= G9IBD40_NS_LM_PDU_C; -TX_EVD_PTR->.EVENT_DESTINATION:= GBDL_HANDLE; - -IF -/* 'OTHER' ALIVE NSVC TO THIS NSEI EXISTING? */ -NSVCI_CON_PTR->.OWN_NSEI_CON_PTR->.NEXT_ALIV_NSVCI_CON_PTR /= NULL -THEN -/* USE THIS 'OTHER' FOR TRANSPORT */ -TX_EVD_PTR->.KEYS.INT_ARR(0):= - -NSVCI_CON_PTR->.OWN_NSEI_CON_PTR->.NEXT_ALIV_NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSEI; -/* NSEI TO BE USED FOR TRANSPORT */ -TX_EVD_PTR->.KEYS.INT_ARR(1):= - -NSVCI_CON_PTR->.OWN_NSEI_CON_PTR->.NEXT_ALIV_NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; -/* NSVCI TO BE USED FOR TRANSPORT */ -ELSE -/* USE AFFECTED NSVC AGAIN FOR TRANSPORT */ -TX_EVD_PTR->.KEYS.INT_ARR(0):= - NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSEI; /* NSEI TO BE USED FOR -TRANSPORT */ -TX_EVD_PTR->.KEYS.INT_ARR(1):= - NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; /* NSVCI TO BE USED FOR -TRANSPORT */ -FI; - - -/* POINTER TO PDU IN POOL-ELEMENT */ -NS_PDU_PTR:= NS_PDU_REF_M (INT(TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT) - + G9IBD44_NS_PDU_DATA_OFFSET_C); -/* OFFSET OF THE PDU IN POOL-ELEMENT */ -TX_EVD_PTR->.BOUND.DATA_OFFSET:= G9IBD44_NS_PDU_DATA_OFFSET_C; -/* LENGTH OF THE PDU IN POOL-ELEMENT */ -TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(NS_PDU_PTR->.G9IBDF4_PDU_TYPE) + -SIZE(NS_PDU_PTR->.D2); - - -/* NOW THE POOL-ELEMENT */ -NS_PDU_PTR->.G9IBDF4_PDU_TYPE:= G9IBDR1_NS_BLOCK_C; /* PDU-TYPE */ - -NS_PDU_PTR->.D2.CAUSE_TLV.CAUSE_VAL:= - G9IBBA2_NS_TRANSIT_NETWORK_FAILURE; /* CAUSE FOR BLOCK */ -NS_PDU_PTR->.D2.NSVCI_TLV.NSVCI_VAL := - NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; /* NSVC TO BE BLOCKED */ - - -/* SENDING */ -G9PX503_POST_EVENT_P(TX_EVD_PTR); - -@K@TEXT -GSM 8.16 CHAP. 7.2: -THE NS-BLOCK-PDU MAY BE SENT IN ANY ALIVE -(BLOCKED OR UNBLOCKED) NS-VC... -@K@FREEZE -938803215 -@K@NAME -M_DE_SBVCN -@K@INSCRIPT -G9IBME1_ -DEACT_ -SIGN_BVC_C -@K@CODE -/* GETTING THE EVENT DESCRIPTOR */ -G9PB512_GET_MSG_LESS_EV_DESCR_P -( -SID_GBNSVC, -TX_EVD_PTR -); - - -/* COMPOSING THE EVENT */ -TX_EVD_PTR->.EVENT_CMD:= G9IBME1_DEACT_SIGN_BVC_C; -TX_EVD_PTR->.EVENT_DESTINATION:= GBBVC_HANDLE; -TX_EVD_PTR->.KEYS.INT_ARR(0):= EVD_PTR->.KEYS.INT_ARR(0); -TX_EVD_PTR->.KEYS.INT_ARR(1):= SIGN_BVCI; - - - -/* SENDING */ -G9PX503_POST_EVENT_P(TX_EVD_PTR); - -@K@FREEZE -938788201 -@K@NAME -M_OAME401M -@K@INSCRIPT -ERROR_MESSAGE: -ERRONOUS_PDU -RESET_PDU - -@K@CODE -/* GETTING THE EVENT DESCRIPTOR */ -G9PB511_GET_MSG_BOUND_EV_DESCR_P -( -SID_GBNSVC, -(SIZE(G9OC109_REPORTED_EVENT_STR_M)), -TX_EVD_PTR -); - - -/* COMPOSING THE EVENT */ -/* FIRST THE DESCRIPTOR */ -TX_EVD_PTR->.EVENT_CMD:= G9PX040_SEND_MBC_C; -TX_EVD_PTR->.EVENT_DESTINATION:= RXTX_HANDLE; -TX_EVD_PTR->.KEYS.UBI_INDEX:= OAM_UBI_INDEX; -TX_EVD_PTR->.BOUND.DATA_OFFSET:= 0; -TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(G9OC109_REPORTED_EVENT_STR_M); - -/* NOW THE POOL-ELEMENT */ -/* INITIALIZATION OF THE POINTER WITH THE POOL-ELEMENT-START */ -OAM_MSG_PTR:= OAM_MSG_PTR_M (TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT); - -/* COMPOSING THE MESSAGE */ -/* HANDLED OBJECT = AFFECTED INSTANCE, TYPE NSE */ -OAM_MSG_PTR->.HANDLED_OBJECT.OBJECT_TYPE:= G9OC104_NSE; -OAM_MSG_PTR->.HANDLED_OBJECT.NSE_ID:= EVD_PTR->.KEYS.INT_ARR(0); /* -USED NSEI (FROM ECI) */ - -/* ERROR-CAUSE = ERRONEOUS_PDU */ -OAM_MSG_PTR->.ERROR_CAUSE:= G9OC108_ERRONEOUS_PDU; -/* ADDITIONAL_PDU_INFO */ -OAM_MSG_PTR->.ADDITIONAL_PDU_INFO.G9OC120_PDU_TYPE:= - G9OC124_RESET_PDU; -OAM_MSG_PTR->.ADDITIONAL_PDU_INFO.G9OC120_REPORTED_NSEI:= - EVD_PTR->.ADD_DATA(0); /* AFFECTED NSEI (FROM PDU) */ -OAM_MSG_PTR->.ADDITIONAL_PDU_INFO.G9OC120_REPORTED_NSVC:= - EVD_PTR->.ADD_DATA(1); /* AFFECTED NSVCI (FROM PDU) */ - - - -/* SENDING */ -G9PX503_POST_EVENT_P(TX_EVD_PTR); - -@K@FREEZE -935766108 -@K@NAME -M_OAME402M -@K@INSCRIPT -ERROR_MESSAGE: -ERRONOUS_PDU -RESET_PDU - -@K@CODE -/* GETTING THE EVENT DESCRIPTOR */ -G9PB511_GET_MSG_BOUND_EV_DESCR_P -( -SID_GBNSVC, -(SIZE(G9OC109_REPORTED_EVENT_STR_M)), -TX_EVD_PTR -); - - -/* COMPOSING THE EVENT */ -/* FIRST THE DESCRIPTOR */ -TX_EVD_PTR->.EVENT_CMD:= G9PX040_SEND_MBC_C; -TX_EVD_PTR->.EVENT_DESTINATION:= RXTX_HANDLE; -TX_EVD_PTR->.KEYS.UBI_INDEX:= OAM_UBI_INDEX; -TX_EVD_PTR->.BOUND.DATA_OFFSET:= 0; -TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(G9OC109_REPORTED_EVENT_STR_M); - -/* NOW THE POOL-ELEMENT */ -/* INITIALIZATION OF THE POINTER WITH THE POOL-ELEMENT-START */ -OAM_MSG_PTR:= OAM_MSG_PTR_M (TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT); - -/* COMPOSING THE MESSAGE */ -/* HANDLED OBJECT = AFFECTED INSTANCE, TYPE NSVC */ -OAM_MSG_PTR->.HANDLED_OBJECT.OBJECT_TYPE:= G9OC104_NSVC; -OAM_MSG_PTR->.HANDLED_OBJECT.NSVC_ID:= EVD_PTR->.KEYS.INT_ARR(1); /* -USED NSVCI (FROM ECI) */ - -/* ERROR-CAUSE = ERRONEOUS_PDU */ -OAM_MSG_PTR->.ERROR_CAUSE:= G9OC108_ERRONEOUS_PDU; -/* ADDITIONAL_PDU_INFO */ -OAM_MSG_PTR->.ADDITIONAL_PDU_INFO.G9OC120_PDU_TYPE:= - G9OC124_RESET_PDU; -OAM_MSG_PTR->.ADDITIONAL_PDU_INFO.G9OC120_REPORTED_NSEI:= - EVD_PTR->.ADD_DATA(0); /* NSEI FROM PDU */ -OAM_MSG_PTR->.ADDITIONAL_PDU_INFO.G9OC120_REPORTED_NSVC:= - EVD_PTR->.ADD_DATA(1); /* NSVCI FROM PDU */ - - - -/* SENDING */ -G9PX503_POST_EVENT_P(TX_EVD_PTR); - -@K@FREEZE -935766407 -@K@NAME -M_OAME411M -@K@INSCRIPT -ERROR_MESSAGE: -ERRONOUS_PDU -RESET_ACK_PDU - -@K@CODE -/* GETTING THE EVENT DESCRIPTOR */ -G9PB511_GET_MSG_BOUND_EV_DESCR_P -( -SID_GBNSVC, -(SIZE(G9OC109_REPORTED_EVENT_STR_M)), -TX_EVD_PTR -); - - -/* COMPOSING THE EVENT */ -/* FIRST THE DESCRIPTOR */ -TX_EVD_PTR->.EVENT_CMD:= G9PX040_SEND_MBC_C; -TX_EVD_PTR->.EVENT_DESTINATION:= RXTX_HANDLE; -TX_EVD_PTR->.KEYS.UBI_INDEX:= OAM_UBI_INDEX; -TX_EVD_PTR->.BOUND.DATA_OFFSET:= 0; -TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(G9OC109_REPORTED_EVENT_STR_M); - -/* NOW THE POOL-ELEMENT */ -/* INITIALIZATION OF THE POINTER WITH THE POOL-ELEMENT-START */ -OAM_MSG_PTR:= OAM_MSG_PTR_M (TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT); - -/* COMPOSING THE MESSAGE */ -/* HANDLED OBJECT = AFFECTED INSTANCE, TYPE NSE */ -OAM_MSG_PTR->.HANDLED_OBJECT.OBJECT_TYPE:= G9OC104_NSE; -OAM_MSG_PTR->.HANDLED_OBJECT.NSE_ID:= EVD_PTR->.KEYS.INT_ARR(0); /* -USED NSEI (FROM ECI) */ - -/* ERROR-CAUSE = ERRONEOUS_PDU */ -OAM_MSG_PTR->.ERROR_CAUSE:= G9OC108_ERRONEOUS_PDU; -/* ADDITIONAL_PDU_INFO */ -OAM_MSG_PTR->.ADDITIONAL_PDU_INFO.G9OC120_PDU_TYPE:= - G9OC124_RESET_ACK_PDU; -OAM_MSG_PTR->.ADDITIONAL_PDU_INFO.G9OC120_REPORTED_NSEI:= - EVD_PTR->.ADD_DATA(0); /* NSEI FROM PDU */ -OAM_MSG_PTR->.ADDITIONAL_PDU_INFO.G9OC120_REPORTED_NSVC:= - EVD_PTR->.ADD_DATA(1); /* NSVCI FROM PDU */ - - - -/* SENDING */ -G9PX503_POST_EVENT_P(TX_EVD_PTR); - -@K@FREEZE -935767332 -@K@NAME -M_OAME412M -@K@INSCRIPT -ERROR_MESSAGE: -ERRONOUS_PDU -RESET_ACK_PDU - -@K@CODE -/* GETTING THE EVENT DESCRIPTOR */ -G9PB511_GET_MSG_BOUND_EV_DESCR_P -( -SID_GBNSVC, -(SIZE(G9OC109_REPORTED_EVENT_STR_M)), -TX_EVD_PTR -); - - -/* COMPOSING THE EVENT */ -/* FIRST THE DESCRIPTOR */ -TX_EVD_PTR->.EVENT_CMD:= G9PX040_SEND_MBC_C; -TX_EVD_PTR->.EVENT_DESTINATION:= RXTX_HANDLE; -TX_EVD_PTR->.KEYS.UBI_INDEX:= OAM_UBI_INDEX; -TX_EVD_PTR->.BOUND.DATA_OFFSET:= 0; -TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(G9OC109_REPORTED_EVENT_STR_M); - -/* NOW THE POOL-ELEMENT */ -/* INITIALIZATION OF THE POINTER WITH THE POOL-ELEMENT-START */ -OAM_MSG_PTR:= OAM_MSG_PTR_M (TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT); - -/* COMPOSING THE MESSAGE */ -/* HANDLED OBJECT = AFFECTED INSTANCE, TYPE NSVC */ -OAM_MSG_PTR->.HANDLED_OBJECT.OBJECT_TYPE:= G9OC104_NSVC; -OAM_MSG_PTR->.HANDLED_OBJECT.NSVC_ID:= EVD_PTR->.KEYS.INT_ARR(1); /* -USED NSVCI (FROM ECI) */ - -/* ERROR-CAUSE = ERRONEOUS_PDU */ -OAM_MSG_PTR->.ERROR_CAUSE:= G9OC108_ERRONEOUS_PDU; -/* ADDITIONAL_PDU_INFO */ -OAM_MSG_PTR->.ADDITIONAL_PDU_INFO.G9OC120_PDU_TYPE:= - G9OC124_RESET_ACK_PDU; -OAM_MSG_PTR->.ADDITIONAL_PDU_INFO.G9OC120_REPORTED_NSEI:= - EVD_PTR->.ADD_DATA(0); /* NSEI FROM PDU */ -OAM_MSG_PTR->.ADDITIONAL_PDU_INFO.G9OC120_REPORTED_NSVC:= - EVD_PTR->.ADD_DATA(1); /* NSVCI FROM PDU */ - - - - -/* SENDING */ -G9PX503_POST_EVENT_P(TX_EVD_PTR); - -@K@FREEZE -935767189 -@K@NAME -C_CON -@K@INSCRIPT -RC_DB -@K@CODE -RC_DB - -@K@FREEZE -922176673 -@K@NAME -M_BLK____M -@K@INSCRIPT -NS_ -BLOCK -@K@CODE -/* GETTING THE EVENT DESCRIPTOR */ -G9PB511_GET_MSG_BOUND_EV_DESCR_P -( -SID_GBNSVC, -(SIZE(G9IBDF4_NS_LM_M) + G9IBD44_NS_PDU_DATA_OFFSET_C), -TX_EVD_PTR -); - -/* COMPOSING THE EVENT */ -/* FIRST THE DESCRIPTOR */ -TX_EVD_PTR->.EVENT_CMD:= G9IBD40_NS_LM_PDU_C; -TX_EVD_PTR->.EVENT_DESTINATION:= GBDL_HANDLE; -TX_EVD_PTR->.KEYS.INT_ARR(0):= -NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSEI; /* NSEI TO BE USED FOR -TRANSPORT */ -TX_EVD_PTR->.KEYS.INT_ARR(1):= -NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; /* NSVCI TO BE USED FOR -TRANSPORT */ -/* POINTER TO PDU IN POOL-ELEMENT */ -NS_PDU_PTR:= NS_PDU_REF_M (INT(TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT) - + G9IBD44_NS_PDU_DATA_OFFSET_C); -/* OFFSET OF THE PDU IN POOL-ELEMENT */ -TX_EVD_PTR->.BOUND.DATA_OFFSET:= G9IBD44_NS_PDU_DATA_OFFSET_C; -/* LENGTH OF THE PDU IN POOL-ELEMENT */ -TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(NS_PDU_PTR->.G9IBDF4_PDU_TYPE) + -SIZE(NS_PDU_PTR->.D2); - - -/* NOW THE POOL-ELEMENT */ -NS_PDU_PTR->.G9IBDF4_PDU_TYPE:= G9IBDR1_NS_BLOCK_C; /* PDU-TYPE */ - -NS_PDU_PTR->.D2.CAUSE_TLV.CAUSE_VAL:= - G9IBBA2_NS_OAM_INTERVENTION; /* CAUSE FOR BLOCK */ -NS_PDU_PTR->.D2.NSVCI_TLV.NSVCI_VAL := - NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; /* NSVC TO BE BLOCKED */ - - -/* SENDING */ -G9PX503_POST_EVENT_P(TX_EVD_PTR); - -@K@TEXT -GSM 8.16 CHAP. 7.2: -THE NS-BLOCK-PDU MAY BE SENT IN ANY ALIVE -(BLOCKED OR UNBLOCKED) NS-VC... -@K@FREEZE -926348613 -@K@NAME -S_BLOCKED -@K@INSCRIPT -G9IBSM0_ -BLOCKED -@K@CODE - - -@K@FREEZE -922176496 -@K@NAME -D_CON -@K@INSCRIPT -CONTEXT -GOT -@K@CODE -RC_DB = G9IBSR0_RC_OK - -@K@FREEZE -921772339 -@K@NAME -M_OAME901M -@K@INSCRIPT -ERROR_MESSAGE: -OPERATIONAL_STATE_CHANGE -UBL->BLK -@K@CODE -/* GETTING THE EVENT DESCRIPTOR */ -G9PB511_GET_MSG_BOUND_EV_DESCR_P -( -SID_GBNSVC, -(SIZE(G9OC109_REPORTED_EVENT_STR_M)), -TX_EVD_PTR -); - - -/* COMPOSING THE EVENT */ -/* FIRST THE DESCRIPTOR */ -TX_EVD_PTR->.EVENT_CMD:= G9PX040_SEND_MBC_C; -TX_EVD_PTR->.EVENT_DESTINATION:= RXTX_HANDLE; -TX_EVD_PTR->.KEYS.UBI_INDEX:= OAM_UBI_INDEX; -TX_EVD_PTR->.BOUND.DATA_OFFSET:= 0; -TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(G9OC109_REPORTED_EVENT_STR_M); - -/* NOW THE POOL-ELEMENT */ -/* INITIALIZATION OF THE POINTER WITH THE POOL-ELEMENT-START */ -OAM_MSG_PTR:= OAM_MSG_PTR_M (TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT); - -/* COMPOSING THE MESSAGE */ -/* HANDLED OBJECT = AFFECTED INSTANCE, TYPE NSVC */ -OAM_MSG_PTR->.HANDLED_OBJECT.OBJECT_TYPE:= G9OC104_NSVC; -OAM_MSG_PTR->.HANDLED_OBJECT.NSVC_ID:= -NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; - -/* ERROR_CAUSE = OPERATIONAL_STATE_CHANGE */ -OAM_MSG_PTR->.ERROR_CAUSE:= G9OC108_OPERATIONAL_STATE_CHANGE; -/* ADDITIONAL_OPERATIONAL_STATE_INFO */ -OAM_MSG_PTR->.ADDITIONAL_OPERATIONAL_STATE_INFO.OPER_STATE_OLD:= - G9OC101_UNBLOCKED; -OAM_MSG_PTR->.ADDITIONAL_OPERATIONAL_STATE_INFO.OPER_STATE_NEW:= - G9OC101_BLOCKED; -OAM_MSG_PTR->.ADDITIONAL_OPERATIONAL_STATE_INFO.ADMIN_STATE_OLD:= - G9OC102_ENABLED; -OAM_MSG_PTR->.ADDITIONAL_OPERATIONAL_STATE_INFO.ADMIN_STATE_NEW:= - G9OC102_ENABLED; - - -/* SENDING */ -G9PX503_POST_EVENT_P(TX_EVD_PTR); - -@K@FREEZE -925970975 -@K@NAME -M_OAME902M -@K@INSCRIPT -ERROR_MESSAGE: -OPERATIONAL_STATE_CHANGE -UBL->BLK - -@K@CODE -/* GETTING THE EVENT DESCRIPTOR */ -G9PB511_GET_MSG_BOUND_EV_DESCR_P -( -SID_GBNSVC, -(SIZE(G9OC109_REPORTED_EVENT_STR_M)), -TX_EVD_PTR -); - - -/* COMPOSING THE EVENT */ -/* FIRST THE DESCRIPTOR */ -TX_EVD_PTR->.EVENT_CMD:= G9PX040_SEND_MBC_C; -TX_EVD_PTR->.EVENT_DESTINATION:= RXTX_HANDLE; -TX_EVD_PTR->.KEYS.UBI_INDEX:= OAM_UBI_INDEX; -TX_EVD_PTR->.BOUND.DATA_OFFSET:= 0; -TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(G9OC109_REPORTED_EVENT_STR_M); - -/* NOW THE POOL-ELEMENT */ -/* INITIALIZATION OF THE POINTER WITH THE POOL-ELEMENT-START */ -OAM_MSG_PTR:= OAM_MSG_PTR_M (TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT); - -/* COMPOSING THE MESSAGE */ -/* HANDLED OBJECT = AFFECTED INSTANCE, TYPE NSVC */ -OAM_MSG_PTR->.HANDLED_OBJECT.OBJECT_TYPE:= G9OC104_NSVC; -OAM_MSG_PTR->.HANDLED_OBJECT.NSVC_ID:= -NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; - -/* ERROR_CAUSE = OPERATIONAL_STATE_CHANGE */ -OAM_MSG_PTR->.ERROR_CAUSE:= G9OC108_OPERATIONAL_STATE_CHANGE; -/* ADDITIONAL_OPERATIONAL_STATE_INFO */ -OAM_MSG_PTR->.ADDITIONAL_OPERATIONAL_STATE_INFO.OPER_STATE_OLD:= - G9OC101_UNBLOCKED; -OAM_MSG_PTR->.ADDITIONAL_OPERATIONAL_STATE_INFO.OPER_STATE_NEW:= - G9OC101_BLOCKED; -OAM_MSG_PTR->.ADDITIONAL_OPERATIONAL_STATE_INFO.ADMIN_STATE_OLD:= - G9OC102_ENABLED; -OAM_MSG_PTR->.ADDITIONAL_OPERATIONAL_STATE_INFO.ADMIN_STATE_NEW:= - G9OC102_DISABLED; - - -/* SENDING */ -G9PX503_POST_EVENT_P(TX_EVD_PTR); - -@K@FREEZE -925970987 -@K@NAME -M_OAME10SM -@K@INSCRIPT -ERROR_MESSAGE: -ALARM_BEGIN_NS_ALIVE_TEST -@K@CODE -/* GETTING THE EVENT DESCRIPTOR */ -G9PB511_GET_MSG_BOUND_EV_DESCR_P -( -SID_GBNSVC, -(SIZE(G9OC109_REPORTED_EVENT_STR_M)), -TX_EVD_PTR -); - - -/* COMPOSING THE EVENT */ -/* FIRST THE DESCRIPTOR */ -TX_EVD_PTR->.EVENT_CMD:= G9PX040_SEND_MBC_C; -TX_EVD_PTR->.EVENT_DESTINATION:= RXTX_HANDLE; -TX_EVD_PTR->.KEYS.UBI_INDEX:= OAM_UBI_INDEX; -TX_EVD_PTR->.BOUND.DATA_OFFSET:= 0; -TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(G9OC109_REPORTED_EVENT_STR_M); - -/* NOW THE POOL-ELEMENT */ -/* INITIALIZATION OF THE POINTER WITH THE POOL-ELEMENT-START */ -OAM_MSG_PTR:= OAM_MSG_PTR_M (TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT); - -/* COMPOSING THE MESSAGE */ -/* HANDLED OBJECT = AFFECTED INSTANCE, TYPE NSVC */ -OAM_MSG_PTR->.HANDLED_OBJECT.OBJECT_TYPE:= G9OC104_NSVC; -OAM_MSG_PTR->.HANDLED_OBJECT.NSVC_ID:= -NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; - -/* ERROR_CAUSE = ALARM_BEGIN_NS_ALIVE_TEST*/ -OAM_MSG_PTR->.ERROR_CAUSE:= G9OC108_ALARM_BEGIN_NS_ALIVE_TEST; -/* ADDITIONAL_ALARM_INFO */ -OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.ADMINISTRATIVE_STATE_CHANGED:= - TRUE; -OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.OPER_STATE_OLD:= - G9OC101_BLOCKED; -OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.OPER_STATE_NEW:= - G9OC101_BLOCKED; -OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.AVAIL_STATE_OLD:= - G9OC103_DEAD; -OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.AVAIL_STATE_NEW:= - G9OC103_DEAD; -OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.CONFIGURATION_OF_NSVC:= - TRUE; - - - -/* SENDING */ -G9PX503_POST_EVENT_P(TX_EVD_PTR); - -@K@NAME -M_OAME911M -@K@INSCRIPT -ERROR_MESSAGE: -OPERATIONAL_STATE_CHANGE -BLK->UBL -@K@CODE -/* GETTING THE EVENT DESCRIPTOR */ -G9PB511_GET_MSG_BOUND_EV_DESCR_P -( -SID_GBNSVC, -(SIZE(G9OC109_REPORTED_EVENT_STR_M)), -TX_EVD_PTR -); - - -/* COMPOSING THE EVENT */ -/* FIRST THE DESCRIPTOR */ -TX_EVD_PTR->.EVENT_CMD:= G9PX040_SEND_MBC_C; -TX_EVD_PTR->.EVENT_DESTINATION:= RXTX_HANDLE; -TX_EVD_PTR->.KEYS.UBI_INDEX:= OAM_UBI_INDEX; -TX_EVD_PTR->.BOUND.DATA_OFFSET:= 0; -TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(G9OC109_REPORTED_EVENT_STR_M); - -/* NOW THE POOL-ELEMENT */ -/* INITIALIZATION OF THE POINTER WITH THE POOL-ELEMENT-START */ -OAM_MSG_PTR:= OAM_MSG_PTR_M (TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT); - -/* COMPOSING THE MESSAGE */ -/* HANDLED OBJECT = AFFECTED INSTANCE, TYPE NSVC */ -OAM_MSG_PTR->.HANDLED_OBJECT.OBJECT_TYPE:= G9OC104_NSVC; -OAM_MSG_PTR->.HANDLED_OBJECT.NSVC_ID:= -NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; - -/* ERROR_CAUSE = OPERATIONAL_STATE_CHANGE */ -OAM_MSG_PTR->.ERROR_CAUSE:= G9OC108_OPERATIONAL_STATE_CHANGE; -/* ADDITIONAL_OPERATIONAL_STATE_INFO */ -OAM_MSG_PTR->.ADDITIONAL_OPERATIONAL_STATE_INFO.OPER_STATE_OLD:= - G9OC101_BLOCKED; -OAM_MSG_PTR->.ADDITIONAL_OPERATIONAL_STATE_INFO.OPER_STATE_NEW:= - G9OC101_UNBLOCKED; -OAM_MSG_PTR->.ADDITIONAL_OPERATIONAL_STATE_INFO.ADMIN_STATE_OLD:= - G9OC102_ENABLED; -OAM_MSG_PTR->.ADDITIONAL_OPERATIONAL_STATE_INFO.ADMIN_STATE_NEW:= - G9OC102_ENABLED; - - -/* SENDING */ -G9PX503_POST_EVENT_P(TX_EVD_PTR); - -@K@FREEZE -925970996 -@K@NAME -M_OAME20SM -@K@INSCRIPT -ERROR_MESSAGE: -ALARM_END_NS_ALIVE_TEST -@K@CODE -/* GETTING THE EVENT DESCRIPTOR */ -G9PB511_GET_MSG_BOUND_EV_DESCR_P -( -SID_GBNSVC, -(SIZE(G9OC109_REPORTED_EVENT_STR_M)), -TX_EVD_PTR -); - - -/* COMPOSING THE EVENT */ -/* FIRST THE DESCRIPTOR */ -TX_EVD_PTR->.EVENT_CMD:= G9PX040_SEND_MBC_C; -TX_EVD_PTR->.EVENT_DESTINATION:= RXTX_HANDLE; -TX_EVD_PTR->.KEYS.UBI_INDEX:= OAM_UBI_INDEX; -TX_EVD_PTR->.BOUND.DATA_OFFSET:= 0; -TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(G9OC109_REPORTED_EVENT_STR_M); - -/* NOW THE POOL-ELEMENT */ -/* INITIALIZATION OF THE POINTER WITH THE POOL-ELEMENT-START */ -OAM_MSG_PTR:= OAM_MSG_PTR_M (TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT); - -/* COMPOSING THE MESSAGE */ -/* HANDLED OBJECT = AFFECTED INSTANCE, TYPE NSVC */ -OAM_MSG_PTR->.HANDLED_OBJECT.OBJECT_TYPE:= G9OC104_NSVC; -OAM_MSG_PTR->.HANDLED_OBJECT.NSVC_ID:= -NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; - -/* ERROR_CAUSE = ALARM_END_NS_ALIVE_TEST */ -OAM_MSG_PTR->.ERROR_CAUSE:= G9OC108_ALARM_END_NS_ALIVE_TEST; -/* ADDITIONAL_ALARM_INFO */ -OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.ADMINISTRATIVE_STATE_CHANGED:= - TRUE; -OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.OPER_STATE_OLD:= - G9OC101_BLOCKED; -OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.OPER_STATE_NEW:= - G9OC101_BLOCKED; -OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.AVAIL_STATE_OLD:= - G9OC103_DEAD; -OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.AVAIL_STATE_NEW:= - G9OC103_DEAD; -OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.CONFIGURATION_OF_NSVC:= - TRUE; - - - -/* SENDING */ -G9PX503_POST_EVENT_P(TX_EVD_PTR); - -@K@NAME -M_OAME10_M -@K@INSCRIPT -ERROR_MESSAGE: -ALARM_BEGIN_NS_ALIVE_TEST -@K@CODE -/* GETTING THE EVENT DESCRIPTOR */ -G9PB511_GET_MSG_BOUND_EV_DESCR_P -( -SID_GBNSVC, -(SIZE(G9OC109_REPORTED_EVENT_STR_M)), -TX_EVD_PTR -); - - -/* COMPOSING THE EVENT */ -/* FIRST THE DESCRIPTOR */ -TX_EVD_PTR->.EVENT_CMD:= G9PX040_SEND_MBC_C; -TX_EVD_PTR->.EVENT_DESTINATION:= RXTX_HANDLE; -TX_EVD_PTR->.KEYS.UBI_INDEX:= OAM_UBI_INDEX; -TX_EVD_PTR->.BOUND.DATA_OFFSET:= 0; -TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(G9OC109_REPORTED_EVENT_STR_M); - -/* NOW THE POOL-ELEMENT */ -/* INITIALIZATION OF THE POINTER WITH THE POOL-ELEMENT-START */ -OAM_MSG_PTR:= OAM_MSG_PTR_M (TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT); - -/* COMPOSING THE MESSAGE */ -/* HANDLED OBJECT = AFFECTED INSTANCE, TYPE NSVC */ -OAM_MSG_PTR->.HANDLED_OBJECT.OBJECT_TYPE:= G9OC104_NSVC; -OAM_MSG_PTR->.HANDLED_OBJECT.NSVC_ID:= -NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; - -/* ERROR_CAUSE = ALARM_BEGIN_NS_ALIVE_TEST*/ -OAM_MSG_PTR->.ERROR_CAUSE:= G9OC108_ALARM_BEGIN_NS_ALIVE_TEST; -/* ADDITIONAL_ALARM_INFO */ -OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.ADMINISTRATIVE_STATE_CHANGED:= - TRUE; -OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.OPER_STATE_OLD:= - G9OC101_BLOCKED; -OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.OPER_STATE_NEW:= - G9OC101_BLOCKED; -OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.AVAIL_STATE_OLD:= - G9OC103_DEAD; -OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.AVAIL_STATE_NEW:= - G9OC103_DEAD; -OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.CONFIGURATION_OF_NSVC:= - TRUE; - - - -/* SENDING */ -G9PX503_POST_EVENT_P(TX_EVD_PTR); - -@K@FREEZE -922443813 -@K@NAME -D_SEM -@K@INSCRIPT -CALL_SEM -= -TRUE -@K@CODE -CALL_SEM = TRUE - -@K@FREEZE -922176624 -@K@NAME -D_N_0 -@K@INSCRIPT -N = 0 - -@K@CODE -NSVCI_CON_PTR->.N = 0 - -@K@FREEZE -921511000 -@K@NAME -M_OAME12_M -@K@INSCRIPT -ERROR_MESSAGE: -ALARM_BEGIN_NS_ALIVE_TEST -@K@CODE -/* GETTING THE EVENT DESCRIPTOR */ -G9PB511_GET_MSG_BOUND_EV_DESCR_P -( -SID_GBNSVC, -(SIZE(G9OC109_REPORTED_EVENT_STR_M)), -TX_EVD_PTR -); - - -/* COMPOSING THE EVENT */ -/* FIRST THE DESCRIPTOR */ -TX_EVD_PTR->.EVENT_CMD:= G9PX040_SEND_MBC_C; -TX_EVD_PTR->.EVENT_DESTINATION:= RXTX_HANDLE; -TX_EVD_PTR->.KEYS.UBI_INDEX:= OAM_UBI_INDEX; -TX_EVD_PTR->.BOUND.DATA_OFFSET:= 0; -TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(G9OC109_REPORTED_EVENT_STR_M); - -/* NOW THE POOL-ELEMENT */ -/* INITIALIZATION OF THE POINTER WITH THE POOL-ELEMENT-START */ -OAM_MSG_PTR:= OAM_MSG_PTR_M (TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT); - -/* COMPOSING THE MESSAGE */ -/* HANDLED OBJECT = AFFECTED INSTANCE, TYPE NSVC */ -OAM_MSG_PTR->.HANDLED_OBJECT.OBJECT_TYPE:= G9OC104_NSVC; -OAM_MSG_PTR->.HANDLED_OBJECT.NSVC_ID:= -NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; - -/* ERROR_CAUSE = ALARM_BEGIN_NS_ALIVE_TEST*/ -OAM_MSG_PTR->.ERROR_CAUSE:= G9OC108_ALARM_BEGIN_NS_ALIVE_TEST; -/* ADDITIONAL_ALARM_INFO */ -OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.ADMINISTRATIVE_STATE_CHANGED:= - FALSE; -OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.OPER_STATE_OLD:= - G9OC101_BLOCKED; -OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.OPER_STATE_NEW:= - G9OC101_BLOCKED; -OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.AVAIL_STATE_OLD:= - G9OC103_ALIVE; -OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.AVAIL_STATE_NEW:= - G9OC103_DEAD; -OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.CONFIGURATION_OF_NSVC:= - TRUE; - - - -/* SENDING */ -G9PX503_POST_EVENT_P(TX_EVD_PTR); - -@K@FREEZE -922443829 -@K@NAME -M_OAME21_M -@K@INSCRIPT -ERROR_MESSAGE: -ALARM_END_NS_ALIVE_TEST -@K@CODE -/* GETTING THE EVENT DESCRIPTOR */ -G9PB511_GET_MSG_BOUND_EV_DESCR_P -( -SID_GBNSVC, -(SIZE(G9OC109_REPORTED_EVENT_STR_M)), -TX_EVD_PTR -); - - -/* COMPOSING THE EVENT */ -/* FIRST THE DESCRIPTOR */ -TX_EVD_PTR->.EVENT_CMD:= G9PX040_SEND_MBC_C; -TX_EVD_PTR->.EVENT_DESTINATION:= RXTX_HANDLE; -TX_EVD_PTR->.KEYS.UBI_INDEX:= OAM_UBI_INDEX; -TX_EVD_PTR->.BOUND.DATA_OFFSET:= 0; -TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(G9OC109_REPORTED_EVENT_STR_M); - -/* NOW THE POOL-ELEMENT */ -/* INITIALIZATION OF THE POINTER WITH THE POOL-ELEMENT-START */ -OAM_MSG_PTR:= OAM_MSG_PTR_M (TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT); - -/* COMPOSING THE MESSAGE */ -/* HANDLED OBJECT = AFFECTED INSTANCE, TYPE NSVC */ -OAM_MSG_PTR->.HANDLED_OBJECT.OBJECT_TYPE:= G9OC104_NSVC; -OAM_MSG_PTR->.HANDLED_OBJECT.NSVC_ID:= -NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; - -/* ERROR_CAUSE = ALARM_END_NS_ALIVE_TEST */ -OAM_MSG_PTR->.ERROR_CAUSE:= G9OC108_ALARM_END_NS_ALIVE_TEST; -/* ADDITIONAL_ALARM_INFO */ -OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.ADMINISTRATIVE_STATE_CHANGED:= - TRUE; -OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.OPER_STATE_OLD:= - G9OC101_BLOCKED; -OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.OPER_STATE_NEW:= - G9OC101_BLOCKED; -OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.AVAIL_STATE_OLD:= - G9OC103_DEAD; -OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.AVAIL_STATE_NEW:= - G9OC103_DEAD; -OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.CONFIGURATION_OF_NSVC:= - FALSE; - - - -/* SENDING */ -G9PX503_POST_EVENT_P(TX_EVD_PTR); - -@K@FREEZE -922443856 -@K@NAME -M_OAME13_M -@K@INSCRIPT -ERROR_MESSAGE: -ALARM_BEGIN_NS_ALIVE_TEST -@K@CODE -/* GETTING THE EVENT DESCRIPTOR */ -G9PB511_GET_MSG_BOUND_EV_DESCR_P -( -SID_GBNSVC, -(SIZE(G9OC109_REPORTED_EVENT_STR_M)), -TX_EVD_PTR -); - - -/* COMPOSING THE EVENT */ -/* FIRST THE DESCRIPTOR */ -TX_EVD_PTR->.EVENT_CMD:= G9PX040_SEND_MBC_C; -TX_EVD_PTR->.EVENT_DESTINATION:= RXTX_HANDLE; -TX_EVD_PTR->.KEYS.UBI_INDEX:= OAM_UBI_INDEX; -TX_EVD_PTR->.BOUND.DATA_OFFSET:= 0; -TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(G9OC109_REPORTED_EVENT_STR_M); - -/* NOW THE POOL-ELEMENT */ -/* INITIALIZATION OF THE POINTER WITH THE POOL-ELEMENT-START */ -OAM_MSG_PTR:= OAM_MSG_PTR_M (TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT); - -/* COMPOSING THE MESSAGE */ -/* HANDLED OBJECT = AFFECTED INSTANCE, TYPE NSVC */ -OAM_MSG_PTR->.HANDLED_OBJECT.OBJECT_TYPE:= G9OC104_NSVC; -OAM_MSG_PTR->.HANDLED_OBJECT.NSVC_ID:= -NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; - -/* ERROR_CAUSE = ALARM_BEGIN_NS_ALIVE_TEST*/ -OAM_MSG_PTR->.ERROR_CAUSE:= G9OC108_ALARM_BEGIN_NS_ALIVE_TEST; -/* ADDITIONAL_ALARM_INFO */ -OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.ADMINISTRATIVE_STATE_CHANGED:= - FALSE; -OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.OPER_STATE_OLD:= - G9OC101_UNBLOCKED; -OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.OPER_STATE_NEW:= - G9OC101_BLOCKED; -OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.AVAIL_STATE_OLD:= - G9OC103_ALIVE; -OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.AVAIL_STATE_NEW:= - G9OC103_DEAD; -OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.CONFIGURATION_OF_NSVC:= - TRUE; - - - -/* SENDING */ -G9PX503_POST_EVENT_P(TX_EVD_PTR); - -@K@FREEZE -922443838 -@K@NAME -M_OAME22_M -@K@INSCRIPT -ERROR_MESSAGE: -ALARM_END_NS_ALIVE_TEST -@K@CODE -/* GETTING THE EVENT DESCRIPTOR */ -G9PB511_GET_MSG_BOUND_EV_DESCR_P -( -SID_GBNSVC, -(SIZE(G9OC109_REPORTED_EVENT_STR_M)), -TX_EVD_PTR -); - - -/* COMPOSING THE EVENT */ -/* FIRST THE DESCRIPTOR */ -TX_EVD_PTR->.EVENT_CMD:= G9PX040_SEND_MBC_C; -TX_EVD_PTR->.EVENT_DESTINATION:= RXTX_HANDLE; -TX_EVD_PTR->.KEYS.UBI_INDEX:= OAM_UBI_INDEX; -TX_EVD_PTR->.BOUND.DATA_OFFSET:= 0; -TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(G9OC109_REPORTED_EVENT_STR_M); - -/* NOW THE POOL-ELEMENT */ -/* INITIALIZATION OF THE POINTER WITH THE POOL-ELEMENT-START */ -OAM_MSG_PTR:= OAM_MSG_PTR_M (TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT); - -/* COMPOSING THE MESSAGE */ -/* HANDLED OBJECT = AFFECTED INSTANCE, TYPE NSVC */ -OAM_MSG_PTR->.HANDLED_OBJECT.OBJECT_TYPE:= G9OC104_NSVC; -OAM_MSG_PTR->.HANDLED_OBJECT.NSVC_ID:= -NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; - -/* ERROR_CAUSE = ALARM_END_NS_ALIVE_TEST */ -OAM_MSG_PTR->.ERROR_CAUSE:= G9OC108_ALARM_END_NS_ALIVE_TEST; -/* ADDITIONAL_ALARM_INFO */ -OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.ADMINISTRATIVE_STATE_CHANGED:= - FALSE; -OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.OPER_STATE_OLD:= - G9OC101_BLOCKED; -OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.OPER_STATE_NEW:= - G9OC101_BLOCKED; -OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.AVAIL_STATE_OLD:= - G9OC103_DEAD; -OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.AVAIL_STATE_NEW:= - G9OC103_ALIVE; -OAM_MSG_PTR->.ADDITIONAL_ALARM_INFO.CONFIGURATION_OF_NSVC:= - TRUE; - - - -/* SENDING */ -G9PX503_POST_EVENT_P(TX_EVD_PTR); - -@K@FREEZE -922443864 -@K@NAME -M_OAME30_M -@K@INSCRIPT -ERROR_MESSAGE: -NO_ANSWER_FORM_BSS -RESET_PROCEDURE - - -@K@CODE -/* GETTING THE EVENT DESCRIPTOR */ -G9PB511_GET_MSG_BOUND_EV_DESCR_P -( -SID_GBNSVC, -(SIZE(G9OC109_REPORTED_EVENT_STR_M)), -TX_EVD_PTR -); - - -/* COMPOSING THE EVENT */ -/* FIRST THE DESCRIPTOR */ -TX_EVD_PTR->.EVENT_CMD:= G9PX040_SEND_MBC_C; -TX_EVD_PTR->.EVENT_DESTINATION:= RXTX_HANDLE; -TX_EVD_PTR->.KEYS.UBI_INDEX:= OAM_UBI_INDEX; -TX_EVD_PTR->.BOUND.DATA_OFFSET:= 0; -TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(G9OC109_REPORTED_EVENT_STR_M); - -/* NOW THE POOL-ELEMENT */ -/* INITIALIZATION OF THE POINTER WITH THE POOL-ELEMENT-START */ -OAM_MSG_PTR:= OAM_MSG_PTR_M (TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT); - -/* COMPOSING THE MESSAGE */ -/* HANDLED OBJECT = AFFECTED INSTANCE, TYPE NSVC */ -OAM_MSG_PTR->.HANDLED_OBJECT.OBJECT_TYPE:= G9OC104_NSVC; -OAM_MSG_PTR->.HANDLED_OBJECT.NSVC_ID:= -NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; - -/* ERROR_CAUSE = NO_ANSWER_FROM_BSS */ -OAM_MSG_PTR->.ERROR_CAUSE:= G9OC108_NO_ANSWER_FROM_BSS; -/* INITIATED_PROCEDURE */ -OAM_MSG_PTR->.INITIATED_PROCEDURE:= - G9OC123_RESET_PROCEDURE; - - -/* SENDING */ -G9PX503_POST_EVENT_P(TX_EVD_PTR); - -@K@FREEZE -922175973 -@K@NAME -M_OAME31_M -@K@INSCRIPT -ERROR_MESSAGE: -NO_ANSWER_FROM_BSS -BLOCK_PROCEDURE - -@K@CODE -/* GETTING THE EVENT DESCRIPTOR */ -G9PB511_GET_MSG_BOUND_EV_DESCR_P -( -SID_GBNSVC, -(SIZE(G9OC109_REPORTED_EVENT_STR_M)), -TX_EVD_PTR -); - - -/* COMPOSING THE EVENT */ -/* FIRST THE DESCRIPTOR */ -TX_EVD_PTR->.EVENT_CMD:= G9PX040_SEND_MBC_C; -TX_EVD_PTR->.EVENT_DESTINATION:= RXTX_HANDLE; -TX_EVD_PTR->.KEYS.UBI_INDEX:= OAM_UBI_INDEX; -TX_EVD_PTR->.BOUND.DATA_OFFSET:= 0; -TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(G9OC109_REPORTED_EVENT_STR_M); - -/* NOW THE POOL-ELEMENT */ -/* INITIALIZATION OF THE POINTER WITH THE POOL-ELEMENT-START */ -OAM_MSG_PTR:= OAM_MSG_PTR_M (TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT); - -/* COMPOSING THE MESSAGE */ -/* HANDLED OBJECT = AFFECTED INSTANCE, TYPE NSVC */ -OAM_MSG_PTR->.HANDLED_OBJECT.OBJECT_TYPE:= G9OC104_NSVC; -OAM_MSG_PTR->.HANDLED_OBJECT.NSVC_ID:= -NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; - -/* ERROR_CAUSE = NO_ANSWER_FROM_BSS */ -OAM_MSG_PTR->.ERROR_CAUSE:= G9OC108_NO_ANSWER_FROM_BSS; -/* INITIATED_PROCEDURE */ -OAM_MSG_PTR->.INITIATED_PROCEDURE:= - G9OC123_BLOCK_PROCEDURE; - - -/* SENDING */ -G9PX503_POST_EVENT_P(TX_EVD_PTR); - -@K@FREEZE -922175976 -@K@NAME -M_OAME32_M -@K@INSCRIPT -ERROR_MESSAGE: -NO_ANSWER_FROM_BSS -UNBLOCK_PROCEDURE - -@K@CODE -/* GETTING THE EVENT DESCRIPTOR */ -G9PB511_GET_MSG_BOUND_EV_DESCR_P -( -SID_GBNSVC, -(SIZE(G9OC109_REPORTED_EVENT_STR_M)), -TX_EVD_PTR -); - - -/* COMPOSING THE EVENT */ -/* FIRST THE DESCRIPTOR */ -TX_EVD_PTR->.EVENT_CMD:= G9PX040_SEND_MBC_C; -TX_EVD_PTR->.EVENT_DESTINATION:= RXTX_HANDLE; -TX_EVD_PTR->.KEYS.UBI_INDEX:= OAM_UBI_INDEX; -TX_EVD_PTR->.BOUND.DATA_OFFSET:= 0; -TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(G9OC109_REPORTED_EVENT_STR_M); - -/* NOW THE POOL-ELEMENT */ -/* INITIALIZATION OF THE POINTER WITH THE POOL-ELEMENT-START */ -OAM_MSG_PTR:= OAM_MSG_PTR_M (TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT); - -/* COMPOSING THE MESSAGE */ -/* HANDLED OBJECT = AFFECTED INSTANCE, TYPE NSVC */ -OAM_MSG_PTR->.HANDLED_OBJECT.OBJECT_TYPE:= G9OC104_NSVC; -OAM_MSG_PTR->.HANDLED_OBJECT.NSVC_ID:= -NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; - -/* ERROR_CAUSE = NO_ANSWER_FROM_BSS */ -OAM_MSG_PTR->.ERROR_CAUSE:= G9OC108_NO_ANSWER_FROM_BSS; -/* INITIATED_PROCEDURE */ -OAM_MSG_PTR->.INITIATED_PROCEDURE:= - G9OC123_UNBLOCK_PROCEDURE; - - - -/* SENDING */ -G9PX503_POST_EVENT_P(TX_EVD_PTR); - -@K@FREEZE -922175980 -@K@NAME -M_OAME42_M -@K@INSCRIPT -ERROR_MESSAGE: -ERRONOUS_PDU -BLOCK_PDU -@K@CODE -/* GETTING THE EVENT DESCRIPTOR */ -G9PB511_GET_MSG_BOUND_EV_DESCR_P -( -SID_GBNSVC, -(SIZE(G9OC109_REPORTED_EVENT_STR_M)), -TX_EVD_PTR -); - - -/* COMPOSING THE EVENT */ -/* FIRST THE DESCRIPTOR */ -TX_EVD_PTR->.EVENT_CMD:= G9PX040_SEND_MBC_C; -TX_EVD_PTR->.EVENT_DESTINATION:= RXTX_HANDLE; -TX_EVD_PTR->.KEYS.UBI_INDEX:= OAM_UBI_INDEX; -TX_EVD_PTR->.BOUND.DATA_OFFSET:= 0; -TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(G9OC109_REPORTED_EVENT_STR_M); - -/* NOW THE POOL-ELEMENT */ -/* INITIALIZATION OF THE POINTER WITH THE POOL-ELEMENT-START */ -OAM_MSG_PTR:= OAM_MSG_PTR_M (TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT); - -/* COMPOSING THE MESSAGE */ -/* HANDLED OBJECT = AFFECTED INSTANCE, TYPE NSVC */ -OAM_MSG_PTR->.HANDLED_OBJECT.OBJECT_TYPE:= G9OC104_NSVC; -OAM_MSG_PTR->.HANDLED_OBJECT.NSVC_ID:= EVD_PTR->.ADD_DATA(1); /* -USED NSVCI (FROM ECI) */ - -/* ERROR-CAUSE = ERRONEOUS_PDU */ -OAM_MSG_PTR->.ERROR_CAUSE:= G9OC108_ERRONEOUS_PDU; -/* ADDITIONAL_PDU_INFO */ -OAM_MSG_PTR->.ADDITIONAL_PDU_INFO.G9OC120_PDU_TYPE:= - G9OC124_BLOCK_PDU; -OAM_MSG_PTR->.ADDITIONAL_PDU_INFO.G9OC120_REPORTED_NSEI:= - EVD_PTR->.KEYS.INT_ARR(0); /* AFFECTED NSEI (FROM PDU) */ -OAM_MSG_PTR->.ADDITIONAL_PDU_INFO.G9OC120_REPORTED_NSVC:= - EVD_PTR->.KEYS.INT_ARR(1); /* AFFECTED NSVCI (FROM PDU) */ - - - - -/* SENDING */ -G9PX503_POST_EVENT_P(TX_EVD_PTR); - -@K@FREEZE -934296141 -@K@NAME -M_OAME50_M -@K@INSCRIPT -ERROR_MESSAGE: -STATUS_PDU_CONTAINS_ERROR_INFO -RECEIVED -@K@CODE -/* GETTING THE EVENT DESCRIPTOR */ -G9PB511_GET_MSG_BOUND_EV_DESCR_P -( -SID_GBNSVC, -(SIZE(G9OC109_REPORTED_EVENT_STR_M)), -TX_EVD_PTR -); - - -/* COMPOSING THE EVENT */ -/* FIRST THE DESCRIPTOR */ -TX_EVD_PTR->.EVENT_CMD:= G9PX040_SEND_MBC_C; -TX_EVD_PTR->.EVENT_DESTINATION:= RXTX_HANDLE; -TX_EVD_PTR->.KEYS.UBI_INDEX:= OAM_UBI_INDEX; -TX_EVD_PTR->.BOUND.DATA_OFFSET:= 0; -TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(G9OC109_REPORTED_EVENT_STR_M); - -/* NOW THE POOL-ELEMENT */ -/* INITIALIZATION OF THE POINTER WITH THE POOL-ELEMENT-START */ -OAM_MSG_PTR:= OAM_MSG_PTR_M (TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT); - -/* COMPOSING THE MESSAGE */ -/* HANDLED OBJECT = AFFECTED INSTANCE, TYPE NSVC */ -OAM_MSG_PTR->.HANDLED_OBJECT.OBJECT_TYPE:= G9OC104_NSVC; -OAM_MSG_PTR->.HANDLED_OBJECT.NSVC_ID:= -NSVCI_CON_PTR->.DBMS.NSVC_INSTANCE.NSVCI; - -/* ERROR-CAUSE = STATUS_PDU_CONTAINS_ERROR_INFO */ -OAM_MSG_PTR->.ERROR_CAUSE:= G9OC108_STATUS_PDU_CONTAINS_ERROR_INFO; -/* ADDITIONAL_STATUS_PDU_INFO */ -INT_CAUSE_PTR.INT_PTR:= ADDR(EVD_PTR->.ADD_DATA(2)); -OAM_MSG_PTR->.ADDITIONAL_STATUS_PDU_INFO:= - INT_CAUSE_PTR.CAUSE_PTR->; /* CAUSE */ - - - -/* SENDING */ -G9PX503_POST_EVENT_P(TX_EVD_PTR); - -@K@TEXT -NICHT OK - -@K@FREEZE -934298924 -@K@NAME -M_OAME43_M -@K@INSCRIPT -ERROR_MESSAGE: -ERRONOUS_PDU -BLOCK_ACK_PDU -@K@CODE -/* GETTING THE EVENT DESCRIPTOR */ -G9PB511_GET_MSG_BOUND_EV_DESCR_P -( -SID_GBNSVC, -(SIZE(G9OC109_REPORTED_EVENT_STR_M)), -TX_EVD_PTR -); - - -/* COMPOSING THE EVENT */ -/* FIRST THE DESCRIPTOR */ -TX_EVD_PTR->.EVENT_CMD:= G9PX040_SEND_MBC_C; -TX_EVD_PTR->.EVENT_DESTINATION:= RXTX_HANDLE; -TX_EVD_PTR->.KEYS.UBI_INDEX:= OAM_UBI_INDEX; -TX_EVD_PTR->.BOUND.DATA_OFFSET:= 0; -TX_EVD_PTR->.BOUND.DATA_LENGTH:= SIZE(G9OC109_REPORTED_EVENT_STR_M); - -/* NOW THE POOL-ELEMENT */ -/* INITIALIZATION OF THE POINTER WITH THE POOL-ELEMENT-START */ -OAM_MSG_PTR:= OAM_MSG_PTR_M (TX_EVD_PTR->.BOUND.PTR_TO_POOL_ELEMENT); - -/* COMPOSING THE MESSAGE */ -/* HANDLED OBJECT = AFFECTED INSTANCE, TYPE NSVC */ -OAM_MSG_PTR->.HANDLED_OBJECT.OBJECT_TYPE:= G9OC104_NSVC; -OAM_MSG_PTR->.HANDLED_OBJECT.NSVC_ID:= EVD_PTR->.ADD_DATA(1); /* -USED NSVCI (FROM ECI) */ - -/* ERROR-CAUSE = ERRONEOUS_PDU */ -OAM_MSG_PTR->.ERROR_CAUSE:= G9OC108_ERRONEOUS_PDU; -/* ADDITIONAL_PDU_INFO */ -OAM_MSG_PTR->.ADDITIONAL_PDU_INFO.G9OC120_PDU_TYPE:= - G9OC124_BLOCK_ACK_PDU; -OAM_MSG_PTR->.ADDITIONAL_PDU_INFO.G9OC120_REPORTED_NSEI:= - EVD_PTR->.KEYS.INT_ARR(0); /* AFFECTED NSEI (FROM PDU) */ -OAM_MSG_PTR->.ADDITIONAL_PDU_INFO.G9OC120_REPORTED_NSVC:= - EVD_PTR->.KEYS.INT_ARR(1); /* AFFECTED NSVCI (FROM PDU) */ - - - -/* SENDING */ -G9PX503_POST_EVENT_P(TX_EVD_PTR); - -@K@FREEZE -934297710 diff --git a/src/test/resources/gawk/manyfiles.awk b/src/test/resources/gawk/manyfiles.awk deleted file mode 100644 index 42018685..00000000 --- a/src/test/resources/gawk/manyfiles.awk +++ /dev/null @@ -1,2 +0,0 @@ -BEGIN { print TEMPDIR } -{ print $2 > (TEMPDIR "/junk-" $1) } diff --git a/src/test/resources/gawk/manyfiles.in b/src/test/resources/gawk/manyfiles.in deleted file mode 100644 index 7173d68e..00000000 --- a/src/test/resources/gawk/manyfiles.in +++ /dev/null @@ -1,1030 +0,0 @@ -1 1 -2 2 -3 3 -4 4 -5 5 -6 6 -7 7 -8 8 -9 9 -10 10 -11 11 -12 12 -13 13 -14 14 -15 15 -16 16 -17 17 -18 18 -19 19 -20 20 -21 21 -22 22 -23 23 -24 24 -25 25 -26 26 -27 27 -28 28 -29 29 -30 30 -31 31 -32 32 -33 33 -34 34 -35 35 -36 36 -37 37 -38 38 -39 39 -40 40 -41 41 -42 42 -43 43 -44 44 -45 45 -46 46 -47 47 -48 48 -49 49 -50 50 -51 51 -52 52 -53 53 -54 54 -55 55 -56 56 -57 57 -58 58 -59 59 -60 60 -61 61 -62 62 -63 63 -64 64 -65 65 -66 66 -67 67 -68 68 -69 69 -70 70 -71 71 -72 72 -73 73 -74 74 -75 75 -76 76 -77 77 -78 78 -79 79 -80 80 -81 81 -82 82 -83 83 -84 84 -85 85 -86 86 -87 87 -88 88 -89 89 -90 90 -91 91 -92 92 -93 93 -94 94 -95 95 -96 96 -97 97 -98 98 -99 99 -100 100 -101 101 -102 102 -103 103 -104 104 -105 105 -106 106 -107 107 -108 108 -109 109 -110 110 -111 111 -112 112 -113 113 -114 114 -115 115 -116 116 -117 117 -118 118 -119 119 -120 120 -121 121 -122 122 -123 123 -124 124 -125 125 -126 126 -127 127 -128 128 -129 129 -130 130 -131 131 -132 132 -133 133 -134 134 -135 135 -136 136 -137 137 -138 138 -139 139 -140 140 -141 141 -142 142 -143 143 -144 144 -145 145 -146 146 -147 147 -148 148 -149 149 -150 150 -151 151 -152 152 -153 153 -154 154 -155 155 -156 156 -157 157 -158 158 -159 159 -160 160 -161 161 -162 162 -163 163 -164 164 -165 165 -166 166 -167 167 -168 168 -169 169 -170 170 -171 171 -172 172 -173 173 -174 174 -175 175 -176 176 -177 177 -178 178 -179 179 -180 180 -181 181 -182 182 -183 183 -184 184 -185 185 -186 186 -187 187 -188 188 -189 189 -190 190 -191 191 -192 192 -193 193 -194 194 -195 195 -196 196 -197 197 -198 198 -199 199 -200 200 -201 201 -202 202 -203 203 -204 204 -205 205 -206 206 -207 207 -208 208 -209 209 -210 210 -211 211 -212 212 -213 213 -214 214 -215 215 -216 216 -217 217 -218 218 -219 219 -220 220 -221 221 -222 222 -223 223 -224 224 -225 225 -226 226 -227 227 -228 228 -229 229 -230 230 -231 231 -232 232 -233 233 -234 234 -235 235 -236 236 -237 237 -238 238 -239 239 -240 240 -241 241 -242 242 -243 243 -244 244 -245 245 -246 246 -247 247 -248 248 -249 249 -250 250 -251 251 -252 252 -253 253 -254 254 -255 255 -256 256 -257 257 -258 258 -259 259 -260 260 -261 261 -262 262 -263 263 -264 264 -265 265 -266 266 -267 267 -268 268 -269 269 -270 270 -271 271 -272 272 -273 273 -274 274 -275 275 -276 276 -277 277 -278 278 -279 279 -280 280 -281 281 -282 282 -283 283 -284 284 -285 285 -286 286 -287 287 -288 288 -289 289 -290 290 -291 291 -292 292 -293 293 -294 294 -295 295 -296 296 -297 297 -298 298 -299 299 -300 300 -301 301 -302 302 -303 303 -304 304 -305 305 -306 306 -307 307 -308 308 -309 309 -310 310 -311 311 -312 312 -313 313 -314 314 -315 315 -316 316 -317 317 -318 318 -319 319 -320 320 -321 321 -322 322 -323 323 -324 324 -325 325 -326 326 -327 327 -328 328 -329 329 -330 330 -331 331 -332 332 -333 333 -334 334 -335 335 -336 336 -337 337 -338 338 -339 339 -340 340 -341 341 -342 342 -343 343 -344 344 -345 345 -346 346 -347 347 -348 348 -349 349 -350 350 -351 351 -352 352 -353 353 -354 354 -355 355 -356 356 -357 357 -358 358 -359 359 -360 360 -361 361 -362 362 -363 363 -364 364 -365 365 -366 366 -367 367 -368 368 -369 369 -370 370 -371 371 -372 372 -373 373 -374 374 -375 375 -376 376 -377 377 -378 378 -379 379 -380 380 -381 381 -382 382 -383 383 -384 384 -385 385 -386 386 -387 387 -388 388 -389 389 -390 390 -391 391 -392 392 -393 393 -394 394 -395 395 -396 396 -397 397 -398 398 -399 399 -400 400 -401 401 -402 402 -403 403 -404 404 -405 405 -406 406 -407 407 -408 408 -409 409 -410 410 -411 411 -412 412 -413 413 -414 414 -415 415 -416 416 -417 417 -418 418 -419 419 -420 420 -421 421 -422 422 -423 423 -424 424 -425 425 -426 426 -427 427 -428 428 -429 429 -430 430 -431 431 -432 432 -433 433 -434 434 -435 435 -436 436 -437 437 -438 438 -439 439 -440 440 -441 441 -442 442 -443 443 -444 444 -445 445 -446 446 -447 447 -448 448 -449 449 -450 450 -451 451 -452 452 -453 453 -454 454 -455 455 -456 456 -457 457 -458 458 -459 459 -460 460 -461 461 -462 462 -463 463 -464 464 -465 465 -466 466 -467 467 -468 468 -469 469 -470 470 -471 471 -472 472 -473 473 -474 474 -475 475 -476 476 -477 477 -478 478 -479 479 -480 480 -481 481 -482 482 -483 483 -484 484 -485 485 -486 486 -487 487 -488 488 -489 489 -490 490 -491 491 -492 492 -493 493 -494 494 -495 495 -496 496 -497 497 -498 498 -499 499 -500 500 -501 501 -502 502 -503 503 -504 504 -505 505 -506 506 -507 507 -508 508 -509 509 -510 510 -511 511 -512 512 -513 513 -514 514 -515 515 -516 516 -517 517 -518 518 -519 519 -520 520 -521 521 -522 522 -523 523 -524 524 -525 525 -526 526 -527 527 -528 528 -529 529 -530 530 -531 531 -532 532 -533 533 -534 534 -535 535 -536 536 -537 537 -538 538 -539 539 -540 540 -541 541 -542 542 -543 543 -544 544 -545 545 -546 546 -547 547 -548 548 -549 549 -550 550 -551 551 -552 552 -553 553 -554 554 -555 555 -556 556 -557 557 -558 558 -559 559 -560 560 -561 561 -562 562 -563 563 -564 564 -565 565 -566 566 -567 567 -568 568 -569 569 -570 570 -571 571 -572 572 -573 573 -574 574 -575 575 -576 576 -577 577 -578 578 -579 579 -580 580 -581 581 -582 582 -583 583 -584 584 -585 585 -586 586 -587 587 -588 588 -589 589 -590 590 -591 591 -592 592 -593 593 -594 594 -595 595 -596 596 -597 597 -598 598 -599 599 -600 600 -601 601 -602 602 -603 603 -604 604 -605 605 -606 606 -607 607 -608 608 -609 609 -610 610 -611 611 -612 612 -613 613 -614 614 -615 615 -616 616 -617 617 -618 618 -619 619 -620 620 -621 621 -622 622 -623 623 -624 624 -625 625 -626 626 -627 627 -628 628 -629 629 -630 630 -631 631 -632 632 -633 633 -634 634 -635 635 -636 636 -637 637 -638 638 -639 639 -640 640 -641 641 -642 642 -643 643 -644 644 -645 645 -646 646 -647 647 -648 648 -649 649 -650 650 -651 651 -652 652 -653 653 -654 654 -655 655 -656 656 -657 657 -658 658 -659 659 -660 660 -661 661 -662 662 -663 663 -664 664 -665 665 -666 666 -667 667 -668 668 -669 669 -670 670 -671 671 -672 672 -673 673 -674 674 -675 675 -676 676 -677 677 -678 678 -679 679 -680 680 -681 681 -682 682 -683 683 -684 684 -685 685 -686 686 -687 687 -688 688 -689 689 -690 690 -691 691 -692 692 -693 693 -694 694 -695 695 -696 696 -697 697 -698 698 -699 699 -700 700 -701 701 -702 702 -703 703 -704 704 -705 705 -706 706 -707 707 -708 708 -709 709 -710 710 -711 711 -712 712 -713 713 -714 714 -715 715 -716 716 -717 717 -718 718 -719 719 -720 720 -721 721 -722 722 -723 723 -724 724 -725 725 -726 726 -727 727 -728 728 -729 729 -730 730 -731 731 -732 732 -733 733 -734 734 -735 735 -736 736 -737 737 -738 738 -739 739 -740 740 -741 741 -742 742 -743 743 -744 744 -745 745 -746 746 -747 747 -748 748 -749 749 -750 750 -751 751 -752 752 -753 753 -754 754 -755 755 -756 756 -757 757 -758 758 -759 759 -760 760 -761 761 -762 762 -763 763 -764 764 -765 765 -766 766 -767 767 -768 768 -769 769 -770 770 -771 771 -772 772 -773 773 -774 774 -775 775 -776 776 -777 777 -778 778 -779 779 -780 780 -781 781 -782 782 -783 783 -784 784 -785 785 -786 786 -787 787 -788 788 -789 789 -790 790 -791 791 -792 792 -793 793 -794 794 -795 795 -796 796 -797 797 -798 798 -799 799 -800 800 -801 801 -802 802 -803 803 -804 804 -805 805 -806 806 -807 807 -808 808 -809 809 -810 810 -811 811 -812 812 -813 813 -814 814 -815 815 -816 816 -817 817 -818 818 -819 819 -820 820 -821 821 -822 822 -823 823 -824 824 -825 825 -826 826 -827 827 -828 828 -829 829 -830 830 -831 831 -832 832 -833 833 -834 834 -835 835 -836 836 -837 837 -838 838 -839 839 -840 840 -841 841 -842 842 -843 843 -844 844 -845 845 -846 846 -847 847 -848 848 -849 849 -850 850 -851 851 -852 852 -853 853 -854 854 -855 855 -856 856 -857 857 -858 858 -859 859 -860 860 -861 861 -862 862 -863 863 -864 864 -865 865 -866 866 -867 867 -868 868 -869 869 -870 870 -871 871 -872 872 -873 873 -874 874 -875 875 -876 876 -877 877 -878 878 -879 879 -880 880 -881 881 -882 882 -883 883 -884 884 -885 885 -886 886 -887 887 -888 888 -889 889 -890 890 -891 891 -892 892 -893 893 -894 894 -895 895 -896 896 -897 897 -898 898 -899 899 -900 900 -901 901 -902 902 -903 903 -904 904 -905 905 -906 906 -907 907 -908 908 -909 909 -910 910 -911 911 -912 912 -913 913 -914 914 -915 915 -916 916 -917 917 -918 918 -919 919 -920 920 -921 921 -922 922 -923 923 -924 924 -925 925 -926 926 -927 927 -928 928 -929 929 -930 930 -931 931 -932 932 -933 933 -934 934 -935 935 -936 936 -937 937 -938 938 -939 939 -940 940 -941 941 -942 942 -943 943 -944 944 -945 945 -946 946 -947 947 -948 948 -949 949 -950 950 -951 951 -952 952 -953 953 -954 954 -955 955 -956 956 -957 957 -958 958 -959 959 -960 960 -961 961 -962 962 -963 963 -964 964 -965 965 -966 966 -967 967 -968 968 -969 969 -970 970 -971 971 -972 972 -973 973 -974 974 -975 975 -976 976 -977 977 -978 978 -979 979 -980 980 -981 981 -982 982 -983 983 -984 984 -985 985 -986 986 -987 987 -988 988 -989 989 -990 990 -991 991 -992 992 -993 993 -994 994 -995 995 -996 996 -997 997 -998 998 -999 999 -1000 1000 -1001 1001 -1002 1002 -1003 1003 -1004 1004 -1005 1005 -1006 1006 -1007 1007 -1008 1008 -1009 1009 -1010 1010 -1011 1011 -1012 1012 -1013 1013 -1014 1014 -1015 1015 -1016 1016 -1017 1017 -1018 1018 -1019 1019 -1020 1020 -1021 1021 -1022 1022 -1023 1023 -1024 1024 -1025 1025 -1026 1026 -1027 1027 -1028 1028 -1029 1029 -1030 1030 diff --git a/src/test/resources/gawk/unterm.awk b/src/test/resources/gawk/unterm.awk deleted file mode 100644 index c22f6cde..00000000 --- a/src/test/resources/gawk/unterm.awk +++ /dev/null @@ -1 +0,0 @@ -BEGIN{x="...} \ No newline at end of file diff --git a/src/test/resources/gawk/unterm.ok b/src/test/resources/gawk/unterm.ok deleted file mode 100644 index 1cee2cef..00000000 --- a/src/test/resources/gawk/unterm.ok +++ /dev/null @@ -1,3 +0,0 @@ -gawk: unterm.awk:1: BEGIN{x="...} -gawk: unterm.awk:1: ^ unterminated string -EXIT CODE: 1 From 7a469cd4daad231826fa6cb113cb120efe3861eb Mon Sep 17 00:00:00 2001 From: Bertrand Martin Date: Tue, 21 Apr 2026 16:53:03 +0200 Subject: [PATCH 02/15] Address review feedback on compatibility harness --- pom.xml | 3 -- src/it/java/io/jawk/GawkCompatibilityIT.java | 32 ++++++++++++++++--- src/it/java/io/jawk/GawkMaketestsParser.java | 8 ++--- .../java/io/jawk/GawkMaketestsParserTest.java | 19 +++++++++++ 4 files changed, 49 insertions(+), 13 deletions(-) diff --git a/pom.xml b/pom.xml index 8c4cefb2..8eb08a96 100644 --- a/pom.xml +++ b/pom.xml @@ -220,9 +220,6 @@ - - true - integration-test verify diff --git a/src/it/java/io/jawk/GawkCompatibilityIT.java b/src/it/java/io/jawk/GawkCompatibilityIT.java index 1697b8e4..0aafc6d9 100644 --- a/src/it/java/io/jawk/GawkCompatibilityIT.java +++ b/src/it/java/io/jawk/GawkCompatibilityIT.java @@ -62,6 +62,7 @@ public class GawkCompatibilityIT { private static final String SKIP_MANIFEST_FILE = "skips.properties"; private static final String EXIT_CODE_PREFIX = "EXIT CODE: "; private static final String ACTUAL_OUTPUT_DIRECTORY = "gawk-actual"; + private static final String STAGED_DIRECTORY_NAME = "gawk-staged"; private static final int MAX_CAPTURED_OUTPUT_BYTES = 1024 * 1024; private static final int DIFF_CONTEXT_RADIUS = 80; private static final boolean LOG_PROGRESS = Boolean.getBoolean("jawk.gawk.progress"); @@ -172,10 +173,33 @@ private static Path resolveResourceDirectory() throws Exception { private static Path stageResourceDirectory(Path sourceDirectory) throws IOException { Path workingDirectory = Paths.get("").toAbsolutePath().normalize(); + Path stagedDirectory = workingDirectory.resolve(STAGED_DIRECTORY_NAME); + deleteRecursively(stagedDirectory); + Files.createDirectories(stagedDirectory); try (Stream paths = Files.walk(sourceDirectory)) { - paths.forEach(path -> copyToWorkingDirectory(sourceDirectory, workingDirectory, path)); + paths.forEach(path -> copyToWorkingDirectory(sourceDirectory, stagedDirectory, path)); + } + return stagedDirectory; + } + + private static void deleteRecursively(Path directory) throws IOException { + if (!Files.exists(directory)) { + return; + } + try (Stream paths = Files.walk(directory)) { + paths.sorted((left, right) -> Integer.compare(right.getNameCount(), left.getNameCount())).forEach(path -> { + try { + Files.delete(path); + } catch (IOException ex) { + throw new IllegalStateException("Failed to delete staged gawk resource " + path, ex); + } + }); + } catch (IllegalStateException ex) { + if (ex.getCause() instanceof IOException) { + throw (IOException) ex.getCause(); + } + throw ex; } - return workingDirectory; } private static void copyToWorkingDirectory(Path sourceDirectory, Path workingDirectory, Path sourcePath) { @@ -184,7 +208,7 @@ private static void copyToWorkingDirectory(Path sourceDirectory, Path workingDir if (relativePath.toString().isEmpty()) { return; } - Path destination = workingDirectory.resolve(relativePath.toString()); + Path destination = workingDirectory.resolve(relativePath); if (Files.isDirectory(sourcePath)) { Files.createDirectories(destination); } else { @@ -327,7 +351,7 @@ private static String readUtf8(Path path) throws IOException { } private static String normalizeNewlines(String text) { - return text.replace("\r\n", "\n"); + return text.replace("\r\n", "\n").replace("\r", "\n"); } private static final class SuiteState { diff --git a/src/it/java/io/jawk/GawkMaketestsParser.java b/src/it/java/io/jawk/GawkMaketestsParser.java index 33f5b54b..10946f97 100644 --- a/src/it/java/io/jawk/GawkMaketestsParser.java +++ b/src/it/java/io/jawk/GawkMaketestsParser.java @@ -117,11 +117,7 @@ private static List parseFlags(String commandLine) { LinkedHashSet flags = new LinkedHashSet<>(); Matcher matcher = FLAG_PATTERN.matcher(commandLine); while (matcher.find()) { - String flag = matcher.group(); - if ("-f".equals(flag)) { - continue; - } - flags.add(flag); + flags.add(matcher.group()); } return Collections.unmodifiableList(new ArrayList<>(flags)); } @@ -133,7 +129,7 @@ private static String parseLocaleTag(String blockText) { } String gawkLocale = matcher.group(1); if ("C".equals(gawkLocale)) { - return Locale.US.toLanguageTag(); + return null; } String[] languageAndCountry = gawkLocale.split("[_.]", 3); if (languageAndCountry.length < 2) { diff --git a/src/test/java/io/jawk/GawkMaketestsParserTest.java b/src/test/java/io/jawk/GawkMaketestsParserTest.java index f10a9670..9e6a9b7d 100644 --- a/src/test/java/io/jawk/GawkMaketestsParserTest.java +++ b/src/test/java/io/jawk/GawkMaketestsParserTest.java @@ -24,6 +24,7 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import java.io.StringReader; @@ -81,6 +82,24 @@ public void parseLocaleAndSupportedFlags() throws Exception { assertFalse(gawkCase.requiresExplicitSkip()); } + /** + * Verifies that the POSIX {@code C} locale does not force a JVM locale + * override in the Jawk harness. + * + * @throws Exception when parsing the sample metadata fails + */ + @Test + public void parseCLocaleAsNoOverride() throws Exception { + GawkMaketestsParser.GawkCase gawkCase = parseSingleCase( + "localecase:\n" + + "\t@echo $@\n" + + "\t@-[ -z \"$$GAWKLOCALE\" ] && GAWKLOCALE=C; export GAWKLOCALE; \\\n" + + "\tAWKPATH=\"$(srcdir)\" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@\n" + + "\t@-$(CMP) \"$(srcdir)\"/$@.ok _$@ && rm -f _$@\n"); + + assertNull(gawkCase.localeTag()); + } + /** * Verifies that shell-script rules are identified as explicit skips because * the Jawk harness does not execute external shell scripts in-process. From 096e54243b761857573a4f615f884a3cd6d5f63b Mon Sep 17 00:00:00 2001 From: Bertrand Martin Date: Tue, 21 Apr 2026 17:06:11 +0200 Subject: [PATCH 03/15] Preserve raw stdin bytes in gawk ITs --- src/it/java/io/jawk/GawkCompatibilityIT.java | 2 +- src/test/java/io/jawk/AwkTestSupport.java | 51 ++++++++++++++++++-- src/test/java/io/jawk/CliOptionTest.java | 11 +++++ 3 files changed, 58 insertions(+), 6 deletions(-) diff --git a/src/it/java/io/jawk/GawkCompatibilityIT.java b/src/it/java/io/jawk/GawkCompatibilityIT.java index 0aafc6d9..e6794abf 100644 --- a/src/it/java/io/jawk/GawkCompatibilityIT.java +++ b/src/it/java/io/jawk/GawkCompatibilityIT.java @@ -125,7 +125,7 @@ public void test() throws Exception { } builder.argument("-f", gawkCase.scriptFileName()); if (gawkCase.stdinFileName() != null) { - builder.stdin(readUtf8(state.stagedDirectory.resolve(gawkCase.stdinFileName()))); + builder.stdin(Files.readAllBytes(state.stagedDirectory.resolve(gawkCase.stdinFileName()))); } AwkTestSupport.TestResult result; diff --git a/src/test/java/io/jawk/AwkTestSupport.java b/src/test/java/io/jawk/AwkTestSupport.java index 0dcc9508..c595297e 100644 --- a/src/test/java/io/jawk/AwkTestSupport.java +++ b/src/test/java/io/jawk/AwkTestSupport.java @@ -463,6 +463,7 @@ public static final class CliTestBuilder extends BaseTestBuilder private boolean emulateCliMain; private boolean mergeStdoutAndStderr; private Integer maxOutputBytes; + private byte[] stdinBytes; private CliTestBuilder(String description) { super(description); @@ -493,6 +494,40 @@ public CliTestBuilder preassign(String name, Object value) { return this; } + /** + * Provides text data that will be delivered on standard input when the + * script runs. Calling this method clears any previously configured raw + * byte stdin for the same builder. + * + * @param stdin the content to stream into standard input + * @return this builder for method chaining + */ + @Override + public CliTestBuilder stdin(String stdin) { + stdinBytes = null; + return super.stdin(stdin); + } + + /** + * Provides raw bytes that will be delivered on standard input when the + * script runs. This preserves fixture bytes exactly as supplied, which is + * useful for compatibility cases whose redirected input is not valid + * UTF-8. Calling this method clears any previously configured text stdin + * for the same builder. + * + * @param stdinParam raw bytes to stream into standard input + * @return this builder for method chaining + * @throws IllegalArgumentException when {@code stdinParam} is {@code null} + */ + public CliTestBuilder stdin(byte[] stdinParam) { + if (stdinParam == null) { + throw new IllegalArgumentException("stdinParam must not be null"); + } + stdin = null; + stdinBytes = Arrays.copyOf(stdinParam, stdinParam.length); + return this; + } + /** * Captures CLI standard output and standard error through the same * stream. This mirrors shell invocations that redirect {@code 2>&1}, @@ -554,7 +589,8 @@ protected CliTestCase buildTestCase( assignments, emulateCliMain, mergeStdoutAndStderr, - maxOutputBytes); + maxOutputBytes, + stdinBytes); } } @@ -1054,6 +1090,7 @@ private static final class CliTestCase extends BaseTestCase { private final boolean emulateCliMain; private final boolean mergeStdoutAndStderr; private final Integer maxOutputBytes; + private final byte[] stdinBytes; CliTestCase( TestLayout layout, @@ -1065,21 +1102,25 @@ private static final class CliTestCase extends BaseTestCase { Map assignments, boolean emulateCliMain, boolean mergeStdoutAndStderr, - Integer maxOutputBytes) { + Integer maxOutputBytes, + byte[] stdinBytes) { super(layout, fileContents, operandSpecs, pathPlaceholders, requiresPosix); this.argumentSpecs = new ArrayList<>(argumentSpecs); this.assignments = new LinkedHashMap<>(assignments); this.emulateCliMain = emulateCliMain; this.mergeStdoutAndStderr = mergeStdoutAndStderr; this.maxOutputBytes = maxOutputBytes; + this.stdinBytes = stdinBytes != null ? Arrays.copyOf(stdinBytes, stdinBytes.length) : null; } @Override protected ActualResult execute(ExecutionEnvironment env) throws Exception { String stdin = resolvedStdin(env); - InputStream in = stdin != null ? - new ByteArrayInputStream(stdin.getBytes(StandardCharsets.UTF_8)) : - new ByteArrayInputStream(new byte[0]); + InputStream in = stdinBytes != null ? + new ByteArrayInputStream(Arrays.copyOf(stdinBytes, stdinBytes.length)) : + stdin != null ? + new ByteArrayInputStream(stdin.getBytes(StandardCharsets.UTF_8)) : + new ByteArrayInputStream(new byte[0]); ByteArrayOutputStream outBytes = maxOutputBytes != null ? new LimitedByteArrayOutputStream(maxOutputBytes.intValue()) : new ByteArrayOutputStream(); diff --git a/src/test/java/io/jawk/CliOptionTest.java b/src/test/java/io/jawk/CliOptionTest.java index ad47f5c2..8e94f1e2 100644 --- a/src/test/java/io/jawk/CliOptionTest.java +++ b/src/test/java/io/jawk/CliOptionTest.java @@ -137,6 +137,17 @@ public void cliTestBuilderRejectsRunawayOutput() throws Exception { .run(); } + @Test + public void cliTestBuilderAcceptsRawStdinBytes() throws Exception { + AwkTestSupport + .cliTest("CLI raw stdin bytes") + .script("{ print length($0) }") + .stdin(new byte[] + { (byte) 0xED, (byte) 0xA0, (byte) 0x80, '\n' }) + .expectLines("1") + .runAndAssert(); + } + @Test public void loadOptionWithWrongSerializedTypeThrowsFriendlyError() throws Exception { File bad = tempFolder.newFile("wrong-type.ser"); From 15f080c017c7ff7076e694c310f273f240b8227a Mon Sep 17 00:00:00 2001 From: Bertrand Martin Date: Tue, 21 Apr 2026 19:40:11 +0200 Subject: [PATCH 04/15] Tighten compatibility harness review fixes --- src/it/java/io/jawk/BwkPIT.java | 2 +- src/it/java/io/jawk/GawkCompatibilityIT.java | 29 +++---------------- src/it/java/io/jawk/GawkMaketestsParser.java | 2 ++ .../java/io/jawk/GawkMaketestsParserTest.java | 20 +++++++++++++ 4 files changed, 27 insertions(+), 26 deletions(-) diff --git a/src/it/java/io/jawk/BwkPIT.java b/src/it/java/io/jawk/BwkPIT.java index 6d35fb4a..64b46548 100644 --- a/src/it/java/io/jawk/BwkPIT.java +++ b/src/it/java/io/jawk/BwkPIT.java @@ -73,7 +73,7 @@ public static Iterable awkList() throws Exception { throw new IOException("Couldn't find resource " + BWK_P_PATH); } Path bwkPPath = Paths.get(bwkPUrl.toURI()); - bwkPDirectory = new File(".").getAbsoluteFile().toPath().relativize(bwkPPath); + bwkPDirectory = bwkPPath.toAbsolutePath().normalize(); if (!bwkPDirectory.toFile().isDirectory()) { throw new IOException(BWK_P_PATH + " is not a directory"); } diff --git a/src/it/java/io/jawk/GawkCompatibilityIT.java b/src/it/java/io/jawk/GawkCompatibilityIT.java index e6794abf..39ed98af 100644 --- a/src/it/java/io/jawk/GawkCompatibilityIT.java +++ b/src/it/java/io/jawk/GawkCompatibilityIT.java @@ -62,7 +62,7 @@ public class GawkCompatibilityIT { private static final String SKIP_MANIFEST_FILE = "skips.properties"; private static final String EXIT_CODE_PREFIX = "EXIT CODE: "; private static final String ACTUAL_OUTPUT_DIRECTORY = "gawk-actual"; - private static final String STAGED_DIRECTORY_NAME = "gawk-staged"; + private static final String STAGED_DIRECTORY_PREFIX = "gawk-staged-"; private static final int MAX_CAPTURED_OUTPUT_BYTES = 1024 * 1024; private static final int DIFF_CONTEXT_RADIUS = 80; private static final boolean LOG_PROGRESS = Boolean.getBoolean("jawk.gawk.progress"); @@ -123,7 +123,7 @@ public void test() throws Exception { for (String flag : gawkCase.runnableFlags()) { builder.argument(flag); } - builder.argument("-f", gawkCase.scriptFileName()); + builder.argument("-f", state.stagedDirectory.resolve(gawkCase.scriptFileName()).toString()); if (gawkCase.stdinFileName() != null) { builder.stdin(Files.readAllBytes(state.stagedDirectory.resolve(gawkCase.stdinFileName()))); } @@ -173,35 +173,14 @@ private static Path resolveResourceDirectory() throws Exception { private static Path stageResourceDirectory(Path sourceDirectory) throws IOException { Path workingDirectory = Paths.get("").toAbsolutePath().normalize(); - Path stagedDirectory = workingDirectory.resolve(STAGED_DIRECTORY_NAME); - deleteRecursively(stagedDirectory); - Files.createDirectories(stagedDirectory); + Files.createDirectories(workingDirectory); + Path stagedDirectory = Files.createTempDirectory(workingDirectory, STAGED_DIRECTORY_PREFIX); try (Stream paths = Files.walk(sourceDirectory)) { paths.forEach(path -> copyToWorkingDirectory(sourceDirectory, stagedDirectory, path)); } return stagedDirectory; } - private static void deleteRecursively(Path directory) throws IOException { - if (!Files.exists(directory)) { - return; - } - try (Stream paths = Files.walk(directory)) { - paths.sorted((left, right) -> Integer.compare(right.getNameCount(), left.getNameCount())).forEach(path -> { - try { - Files.delete(path); - } catch (IOException ex) { - throw new IllegalStateException("Failed to delete staged gawk resource " + path, ex); - } - }); - } catch (IllegalStateException ex) { - if (ex.getCause() instanceof IOException) { - throw (IOException) ex.getCause(); - } - throw ex; - } - } - private static void copyToWorkingDirectory(Path sourceDirectory, Path workingDirectory, Path sourcePath) { try { Path relativePath = sourceDirectory.relativize(sourcePath); diff --git a/src/it/java/io/jawk/GawkMaketestsParser.java b/src/it/java/io/jawk/GawkMaketestsParser.java index 10946f97..3f0dc7e7 100644 --- a/src/it/java/io/jawk/GawkMaketestsParser.java +++ b/src/it/java/io/jawk/GawkMaketestsParser.java @@ -86,6 +86,8 @@ private static void addCase(List cases, String target, List bl continue; } else if (UNSUPPORTED_FLAGS.contains(flag)) { unsupportedFlags.add(flag); + } else { + unsupportedFlags.add(flag); } } String localeTag = parseLocaleTag(blockText); diff --git a/src/test/java/io/jawk/GawkMaketestsParserTest.java b/src/test/java/io/jawk/GawkMaketestsParserTest.java index 9e6a9b7d..ac9bdfed 100644 --- a/src/test/java/io/jawk/GawkMaketestsParserTest.java +++ b/src/test/java/io/jawk/GawkMaketestsParserTest.java @@ -177,6 +177,26 @@ public void parseNoOpCompatibilityFlags() throws Exception { assertFalse(gawkCase.requiresExplicitSkip()); } + /** + * Verifies that unclassified flags are treated as unsupported so the harness + * does not silently run altered semantics. + * + * @throws Exception when parsing the sample metadata fails + */ + @Test + public void parseUnknownFlagsAsUnsupported() throws Exception { + GawkMaketestsParser.GawkCase gawkCase = parseSingleCase( + "mystery:\n" + + "\t@echo $@\n" + + "\t@-AWKPATH=\"$(srcdir)\" $(AWK) -f $@.awk --mystery < \"$(srcdir)\"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@\n" + + "\t@-$(CMP) \"$(srcdir)\"/$@.ok _$@ && rm -f _$@\n"); + + assertTrue(gawkCase.flags().contains("--mystery")); + assertEquals(1, gawkCase.unsupportedFlags().size()); + assertEquals("--mystery", gawkCase.unsupportedFlags().get(0)); + assertTrue(gawkCase.requiresExplicitSkip()); + } + private static GawkMaketestsParser.GawkCase parseSingleCase(String maketestsSnippet) throws Exception { List cases = GawkMaketestsParser.parse(new StringReader(maketestsSnippet)); assertEquals(1, cases.size()); From 7726afb09303f476efd9fe373793d8be8668eefb Mon Sep 17 00:00:00 2001 From: Bertrand Martin Date: Tue, 21 Apr 2026 21:56:51 +0200 Subject: [PATCH 05/15] Add curated manual gawk compatibility cases --- src/it/java/io/jawk/BwkMiscIT.java | 1 + src/it/java/io/jawk/BwkPIT.java | 1 + src/it/java/io/jawk/BwkTIT.java | 1 + .../java/io/jawk/GawkCompatibilityCase.java | 86 +++++++++ src/it/java/io/jawk/GawkCompatibilityIT.java | 111 +++++++++-- src/it/java/io/jawk/GawkMaketestsParser.java | 41 +++- .../java/io/jawk/GawkManualCasesParser.java | 182 ++++++++++++++++++ src/it/resources/gawk/manual-cases.properties | 57 ++++++ src/site/markdown/compatibility.md | 4 +- .../java/io/jawk/GawkMaketestsParserTest.java | 18 ++ .../io/jawk/GawkManualCasesParserTest.java | 88 +++++++++ 11 files changed, 560 insertions(+), 30 deletions(-) create mode 100644 src/it/java/io/jawk/GawkCompatibilityCase.java create mode 100644 src/it/java/io/jawk/GawkManualCasesParser.java create mode 100644 src/it/resources/gawk/manual-cases.properties create mode 100644 src/test/java/io/jawk/GawkManualCasesParserTest.java diff --git a/src/it/java/io/jawk/BwkMiscIT.java b/src/it/java/io/jawk/BwkMiscIT.java index a3fbbc88..ab9b60db 100644 --- a/src/it/java/io/jawk/BwkMiscIT.java +++ b/src/it/java/io/jawk/BwkMiscIT.java @@ -83,6 +83,7 @@ public static Iterable awkList() throws Exception { .stream(scriptsDirectory.listFiles()) .filter(scriptFile -> scriptFile.getName().endsWith(".awk")) .map(File::getName) + .sorted() .collect(Collectors.toList()); } diff --git a/src/it/java/io/jawk/BwkPIT.java b/src/it/java/io/jawk/BwkPIT.java index 64b46548..02d9fefb 100644 --- a/src/it/java/io/jawk/BwkPIT.java +++ b/src/it/java/io/jawk/BwkPIT.java @@ -86,6 +86,7 @@ public static Iterable awkList() throws Exception { .stream(scriptsDirectory.toFile().listFiles()) .filter(scriptFile -> scriptFile.getName().startsWith("p.")) .map(File::getName) + .sorted() .collect(Collectors.toList()); } diff --git a/src/it/java/io/jawk/BwkTIT.java b/src/it/java/io/jawk/BwkTIT.java index 64a64fb7..a130987a 100644 --- a/src/it/java/io/jawk/BwkTIT.java +++ b/src/it/java/io/jawk/BwkTIT.java @@ -87,6 +87,7 @@ public static Iterable awkList() throws Exception { .stream(scriptsDirectory.toFile().listFiles()) .filter(scriptFile -> scriptFile.getName().startsWith("t.")) .map(File::getName) + .sorted() .collect(Collectors.toList()); } diff --git a/src/it/java/io/jawk/GawkCompatibilityCase.java b/src/it/java/io/jawk/GawkCompatibilityCase.java new file mode 100644 index 00000000..c3f4e6ec --- /dev/null +++ b/src/it/java/io/jawk/GawkCompatibilityCase.java @@ -0,0 +1,86 @@ +package io.jawk; + +/*- + * ╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲ + * Jawk + * ჻჻჻჻჻჻ + * Copyright (C) 2006 - 2026 MetricsHub + * ჻჻჻჻჻჻ + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * . + * ╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱ + */ + +import java.util.List; + +/** + * Shared model for compatibility cases consumed by {@link GawkCompatibilityIT}. + * Implementations may come from gawk's generated {@code Maketests} metadata or + * from a curated manifest of handwritten {@code Makefile.am} rules. + */ +interface GawkCompatibilityCase { + + /** + * Returns the stable gawk target name for this compatibility case. + * + * @return case name used in reporting and expected-output lookup + */ + String name(); + + /** + * Returns the raw command-line arguments that must appear before any + * {@code -f} script arguments. + * + * @return immutable list of CLI arguments + */ + List arguments(); + + /** + * Returns the staged script file names that should be passed through + * {@code -f} in the declared order. + * + * @return immutable list of staged script file names + */ + List scriptFileNames(); + + /** + * Returns the operand list that should be supplied after all script + * arguments. + * + * @return immutable list of AWK operands + */ + List operands(); + + /** + * Returns the staged stdin fixture file name, if the case redirects stdin. + * + * @return fixture file name or {@code null} when stdin is unused + */ + String stdinFileName(); + + /** + * Returns the staged expected-output fixture file name. + * + * @return expected-output file name + */ + String expectedFileName(); + + /** + * Indicates whether the compatibility harness requires an explicit skip + * manifest entry before the case may appear in the suite. + * + * @return {@code true} when the case must be listed in {@code skips.properties} + */ + boolean requiresExplicitSkip(); +} diff --git a/src/it/java/io/jawk/GawkCompatibilityIT.java b/src/it/java/io/jawk/GawkCompatibilityIT.java index 39ed98af..4d6ddadf 100644 --- a/src/it/java/io/jawk/GawkCompatibilityIT.java +++ b/src/it/java/io/jawk/GawkCompatibilityIT.java @@ -41,6 +41,7 @@ import java.util.TreeSet; import java.util.stream.Stream; import org.junit.Assume; +import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; import org.junit.runner.RunWith; @@ -49,20 +50,23 @@ import org.junit.runners.Parameterized.Parameters; /** - * Integration suite derived from gawk's generated {@code Maketests} metadata. - * The suite stages the vendored gawk snapshot into the Failsafe working - * directory, parses the portable rules from {@code Maketests}, and executes - * those rules through {@link AwkTestSupport#cliTest(String)}. + * Integration suite derived from vendored gawk metadata. The suite stages the + * gawk snapshot into the Failsafe working directory, parses the portable + * generated rules from {@code Maketests}, loads a curated manifest of simple + * handwritten {@code Makefile.am} rules, and executes those cases through + * {@link AwkTestSupport#cliTest(String)}. */ @RunWith(Parameterized.class) public class GawkCompatibilityIT { private static final String GAWK_RESOURCE_PATH = "/gawk"; private static final String MAKETESTS_FILE = "Maketests"; + private static final String MANUAL_CASES_FILE = "manual-cases.properties"; private static final String SKIP_MANIFEST_FILE = "skips.properties"; private static final String EXIT_CODE_PREFIX = "EXIT CODE: "; private static final String ACTUAL_OUTPUT_DIRECTORY = "gawk-actual"; private static final String STAGED_DIRECTORY_PREFIX = "gawk-staged-"; + private static final String STAGED_PATH_PREFIX = "@path:"; private static final int MAX_CAPTURED_OUTPUT_BYTES = 1024 * 1024; private static final int DIFF_CONTEXT_RADIUS = 80; private static final boolean LOG_PROGRESS = Boolean.getBoolean("jawk.gawk.progress"); @@ -80,21 +84,35 @@ public static void beforeAll() throws Exception { loadSuiteState(); } + /** + * Removes the staged gawk snapshot after the parameterised suite completes. + * + * @throws Exception when cleaning the staged resources fails + */ + @AfterClass + public static void afterAll() throws Exception { + if (suiteState == null) { + return; + } + deleteRecursively(suiteState.stagedDirectory); + suiteState = null; + } + /** * Returns every gawk compatibility case discovered from the vendored - * {@code Maketests} snapshot. + * generated and handwritten metadata snapshots. * * @return parameter values for the suite - * @throws Exception when loading or validating the Maketests metadata fails + * @throws Exception when loading or validating the gawk metadata fails */ @Parameters(name = "GAWK {0}") - public static Iterable parameters() throws Exception { + public static Iterable parameters() throws Exception { return loadSuiteState().cases; } /** Gawk compatibility case under test. */ @Parameter - public GawkMaketestsParser.GawkCase gawkCase; + public GawkCompatibilityCase gawkCase; /** * Executes one gawk compatibility case unless the explicit skip manifest marks @@ -117,13 +135,15 @@ public void test() throws Exception { .mergeStdoutAndStderr() .maxOutputBytes(MAX_CAPTURED_OUTPUT_BYTES); - if (gawkCase.localeTag() != null) { - builder.argument("--locale", gawkCase.localeTag()); + for (String argument : gawkCase.arguments()) { + builder.argument(resolveStagedPathSpec(state.stagedDirectory, argument)); + } + for (String scriptFileName : gawkCase.scriptFileNames()) { + builder.argument("-f", state.stagedDirectory.resolve(scriptFileName).toString()); } - for (String flag : gawkCase.runnableFlags()) { - builder.argument(flag); + for (String operand : gawkCase.operands()) { + builder.operand(resolveStagedPathSpec(state.stagedDirectory, operand)); } - builder.argument("-f", state.stagedDirectory.resolve(gawkCase.scriptFileName()).toString()); if (gawkCase.stdinFileName() != null) { builder.stdin(Files.readAllBytes(state.stagedDirectory.resolve(gawkCase.stdinFileName()))); } @@ -152,7 +172,9 @@ private static synchronized SuiteState loadSuiteState() throws Exception { Path resourceDirectory = resolveResourceDirectory(); Path stagedDirectory = stageResourceDirectory(resourceDirectory); Path actualOutputDirectory = Files.createDirectories(stagedDirectory.resolve(ACTUAL_OUTPUT_DIRECTORY)); - List parsedCases = parseCases(resourceDirectory.resolve(MAKETESTS_FILE)); + List parsedCases = parseCases( + resourceDirectory.resolve(MAKETESTS_FILE), + resourceDirectory.resolve(MANUAL_CASES_FILE)); Map skipReasons = loadSkipReasons(resourceDirectory.resolve(SKIP_MANIFEST_FILE)); validateCoverage(parsedCases, skipReasons); suiteState = new SuiteState(stagedDirectory, actualOutputDirectory, parsedCases, skipReasons); @@ -178,6 +200,7 @@ private static Path stageResourceDirectory(Path sourceDirectory) throws IOExcept try (Stream paths = Files.walk(sourceDirectory)) { paths.forEach(path -> copyToWorkingDirectory(sourceDirectory, stagedDirectory, path)); } + createConfiguredMakefileAlias(stagedDirectory); return stagedDirectory; } @@ -202,10 +225,15 @@ private static void copyToWorkingDirectory(Path sourceDirectory, Path workingDir } } - private static List parseCases(Path maketestsPath) throws IOException { + private static List parseCases(Path maketestsPath, Path manualCasesPath) throws IOException { + List cases = new ArrayList<>(); try (Reader reader = Files.newBufferedReader(maketestsPath, StandardCharsets.UTF_8)) { - return new ArrayList<>(GawkMaketestsParser.parse(reader)); + cases.addAll(GawkMaketestsParser.parse(reader)); + } + try (Reader reader = Files.newBufferedReader(manualCasesPath, StandardCharsets.UTF_8)) { + cases.addAll(GawkManualCasesParser.parse(reader)); } + return Collections.unmodifiableList(cases); } private static Map loadSkipReasons(Path manifestPath) throws IOException { @@ -221,16 +249,22 @@ private static Map loadSkipReasons(Path manifestPath) throws IOE } private static void validateCoverage( - List parsedCases, + List parsedCases, Map skipReasons) { TreeSet parsedNames = new TreeSet<>(); + TreeSet duplicateNames = new TreeSet<>(); TreeSet missingSkipEntries = new TreeSet<>(); - for (GawkMaketestsParser.GawkCase parsedCase : parsedCases) { - parsedNames.add(parsedCase.name()); + for (GawkCompatibilityCase parsedCase : parsedCases) { + if (!parsedNames.add(parsedCase.name())) { + duplicateNames.add(parsedCase.name()); + } if (parsedCase.requiresExplicitSkip() && !skipReasons.containsKey(parsedCase.name())) { missingSkipEntries.add(parsedCase.name()); } } + if (!duplicateNames.isEmpty()) { + throw new IllegalStateException("Duplicate gawk case names discovered: " + String.join(", ", duplicateNames)); + } if (!missingSkipEntries.isEmpty()) { throw new IllegalStateException("Missing gawk skip manifest entries: " + String.join(", ", missingSkipEntries)); } @@ -251,6 +285,41 @@ private static String renderMaketestsOutput(String output, int exitCode) { return normalized + EXIT_CODE_PREFIX + exitCode + "\n"; } + private static String resolveStagedPathSpec(Path stagedDirectory, String value) { + if (value != null && value.startsWith(STAGED_PATH_PREFIX)) { + return stagedDirectory.resolve(value.substring(STAGED_PATH_PREFIX.length())).normalize().toString(); + } + return value; + } + + private static void createConfiguredMakefileAlias(Path stagedDirectory) throws IOException { + Path makefile = stagedDirectory.resolve("Makefile"); + Path makefileIn = stagedDirectory.resolve("Makefile.in"); + if (Files.notExists(makefile) && Files.exists(makefileIn)) { + Files.copy(makefileIn, makefile); + } + } + + private static void deleteRecursively(Path directory) throws IOException { + if (directory == null || Files.notExists(directory)) { + return; + } + try (Stream paths = Files.walk(directory)) { + paths.sorted((left, right) -> right.compareTo(left)).forEach(path -> { + try { + Files.deleteIfExists(path); + } catch (IOException ex) { + throw new IllegalStateException("Failed to delete staged gawk resource " + path, ex); + } + }); + } catch (IllegalStateException ex) { + if (ex.getCause() instanceof IOException) { + throw (IOException) ex.getCause(); + } + throw ex; + } + } + private void assertOutputMatches(SuiteState state, String expected, String actual) throws IOException { if (expected.equals(actual)) { return; @@ -336,13 +405,13 @@ private static String normalizeNewlines(String text) { private static final class SuiteState { private final Path stagedDirectory; private final Path actualOutputDirectory; - private final List cases; + private final List cases; private final Map skipReasons; SuiteState( Path stagedDirectory, Path actualOutputDirectory, - List cases, + List cases, Map skipReasons) { this.stagedDirectory = stagedDirectory; this.actualOutputDirectory = actualOutputDirectory; diff --git a/src/it/java/io/jawk/GawkMaketestsParser.java b/src/it/java/io/jawk/GawkMaketestsParser.java index 3f0dc7e7..0c39a9ca 100644 --- a/src/it/java/io/jawk/GawkMaketestsParser.java +++ b/src/it/java/io/jawk/GawkMaketestsParser.java @@ -133,16 +133,18 @@ private static String parseLocaleTag(String blockText) { if ("C".equals(gawkLocale)) { return null; } - String[] languageAndCountry = gawkLocale.split("[_.]", 3); + int modifierIndex = gawkLocale.indexOf('@'); + String localeWithoutModifier = modifierIndex >= 0 ? gawkLocale.substring(0, modifierIndex) : gawkLocale; + String[] languageAndCountry = localeWithoutModifier.split("[_.]", 3); if (languageAndCountry.length < 2) { - return gawkLocale; + return localeWithoutModifier; } return languageAndCountry[0].toLowerCase(Locale.ROOT) + "-" + languageAndCountry[1].toUpperCase(Locale.ROOT); } - static final class GawkCase { + static final class GawkCase implements GawkCompatibilityCase { private final String name; private final boolean shellScript; private final List flags; @@ -171,7 +173,8 @@ static final class GawkCase { this.localeTag = localeTag; } - String name() { + @Override + public String name() { return name; } @@ -199,7 +202,8 @@ boolean readsStandardInput() { return readsStandardInput; } - String stdinFileName() { + @Override + public String stdinFileName() { return readsStandardInput ? name + ".in" : null; } @@ -207,7 +211,8 @@ boolean hasMpfrExpectedVariant() { return hasMpfrExpectedVariant; } - String expectedFileName() { + @Override + public String expectedFileName() { return name + ".ok"; } @@ -215,10 +220,32 @@ String localeTag() { return localeTag; } - boolean requiresExplicitSkip() { + @Override + public boolean requiresExplicitSkip() { return shellScript || !unsupportedFlags.isEmpty(); } + @Override + public List arguments() { + List arguments = new ArrayList<>(); + if (localeTag != null) { + arguments.add("--locale"); + arguments.add(localeTag); + } + arguments.addAll(runnableFlags); + return Collections.unmodifiableList(arguments); + } + + @Override + public List scriptFileNames() { + return Collections.singletonList(scriptFileName()); + } + + @Override + public List operands() { + return Collections.emptyList(); + } + @Override public String toString() { return name; diff --git a/src/it/java/io/jawk/GawkManualCasesParser.java b/src/it/java/io/jawk/GawkManualCasesParser.java new file mode 100644 index 00000000..e4ad11f1 --- /dev/null +++ b/src/it/java/io/jawk/GawkManualCasesParser.java @@ -0,0 +1,182 @@ +package io.jawk; + +/*- + * ╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲ + * Jawk + * ჻჻჻჻჻჻ + * Copyright (C) 2006 - 2026 MetricsHub + * ჻჻჻჻჻჻ + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * . + * ╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱ + */ + +import java.io.IOException; +import java.io.Reader; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Properties; +import java.util.Set; + +final class GawkManualCasesParser { + + private static final String CASES_PROPERTY = "cases"; + + private GawkManualCasesParser() {} + + static List parse(Reader reader) throws IOException { + Properties properties = new Properties(); + properties.load(reader); + List caseNames = parseCaseNames(properties.getProperty(CASES_PROPERTY)); + List cases = new ArrayList<>(caseNames.size()); + Set seen = new LinkedHashSet<>(); + for (String caseName : caseNames) { + if (!seen.add(caseName)) { + throw new IllegalArgumentException("Duplicate manual gawk case name: " + caseName); + } + cases.add(parseCase(properties, caseName)); + } + return Collections.unmodifiableList(cases); + } + + private static GawkCompatibilityCase parseCase(Properties properties, String caseName) { + List scripts = parseList(require(properties, caseName, "scripts")); + if (scripts.isEmpty()) { + throw new IllegalArgumentException("Manual gawk case " + caseName + " must declare at least one script"); + } + return new ManualGawkCase( + caseName, + parseList(properties.getProperty(propertyName(caseName, "arguments"))), + scripts, + parseList(properties.getProperty(propertyName(caseName, "operands"))), + optional(properties, caseName, "stdin"), + require(properties, caseName, "expected")); + } + + private static List parseCaseNames(String rawCaseNames) { + if (rawCaseNames == null || rawCaseNames.trim().isEmpty()) { + return Collections.emptyList(); + } + List caseNames = new ArrayList<>(); + for (String rawCaseName : rawCaseNames.split(",")) { + String caseName = rawCaseName.trim(); + if (!caseName.isEmpty()) { + caseNames.add(caseName); + } + } + return Collections.unmodifiableList(caseNames); + } + + private static List parseList(String rawValue) { + if (rawValue == null || rawValue.trim().isEmpty()) { + return Collections.emptyList(); + } + List values = new ArrayList<>(); + Arrays.stream(rawValue.split("\\|", -1)).forEach(value -> { + if (!value.isEmpty()) { + values.add(value); + } + }); + return Collections.unmodifiableList(values); + } + + private static String require(Properties properties, String caseName, String suffix) { + String value = optional(properties, caseName, suffix); + if (value == null) { + throw new IllegalArgumentException( + "Missing property " + propertyName(caseName, suffix) + " for manual gawk case " + caseName); + } + return value; + } + + private static String optional(Properties properties, String caseName, String suffix) { + String value = properties.getProperty(propertyName(caseName, suffix)); + if (value == null) { + return null; + } + String trimmed = value.trim(); + return trimmed.isEmpty() ? null : trimmed; + } + + private static String propertyName(String caseName, String suffix) { + return caseName + "." + suffix; + } + + private static final class ManualGawkCase implements GawkCompatibilityCase { + private final String name; + private final List arguments; + private final List scriptFileNames; + private final List operands; + private final String stdinFileName; + private final String expectedFileName; + + ManualGawkCase( + String name, + List arguments, + List scriptFileNames, + List operands, + String stdinFileName, + String expectedFileName) { + this.name = name; + this.arguments = Collections.unmodifiableList(new ArrayList<>(arguments)); + this.scriptFileNames = Collections.unmodifiableList(new ArrayList<>(scriptFileNames)); + this.operands = Collections.unmodifiableList(new ArrayList<>(operands)); + this.stdinFileName = stdinFileName; + this.expectedFileName = expectedFileName; + } + + @Override + public String name() { + return name; + } + + @Override + public List arguments() { + return arguments; + } + + @Override + public List scriptFileNames() { + return scriptFileNames; + } + + @Override + public List operands() { + return operands; + } + + @Override + public String stdinFileName() { + return stdinFileName; + } + + @Override + public String expectedFileName() { + return expectedFileName; + } + + @Override + public boolean requiresExplicitSkip() { + return false; + } + + @Override + public String toString() { + return name; + } + } +} diff --git a/src/it/resources/gawk/manual-cases.properties b/src/it/resources/gawk/manual-cases.properties new file mode 100644 index 00000000..77003cef --- /dev/null +++ b/src/it/resources/gawk/manual-cases.properties @@ -0,0 +1,57 @@ +# Curated handwritten Makefile.am rules that map cleanly onto AwkTestSupport. +# These cases complement Maketests without attempting to model arbitrary make recipes. + +cases = argcasfile, beginfile1, eofsrc1, longwrds, nsawk1a, nsawk1b, nsawk1c, nsawk2a, nsawk2b, nsidentifier, readfile2, spacere, symtab6, symtab9 + +argcasfile.scripts = argcasfile.awk +argcasfile.operands = ARGC=1| /no/such/file +argcasfile.stdin = argcasfile.in +argcasfile.expected = argcasfile.ok + +beginfile1.scripts = beginfile1.awk +beginfile1.operands = @path:beginfile1.awk|@path:.|@path:./no/such/file|@path:Makefile +beginfile1.expected = beginfile1.ok + +eofsrc1.scripts = eofsrc1a.awk|eofsrc1b.awk +eofsrc1.expected = eofsrc1.ok + +longwrds.arguments = -v|SORT=sort +longwrds.scripts = longwrds.awk +longwrds.stdin = longwrds.in +longwrds.expected = longwrds.ok + +nsawk1a.scripts = nsawk1.awk +nsawk1a.expected = nsawk1a.ok + +nsawk1b.arguments = -v|I=fine +nsawk1b.scripts = nsawk1.awk +nsawk1b.expected = nsawk1b.ok + +nsawk1c.arguments = -v|awk::I=fine +nsawk1c.scripts = nsawk1.awk +nsawk1c.expected = nsawk1c.ok + +nsawk2a.arguments = -v|I=fine +nsawk2a.scripts = nsawk2.awk +nsawk2a.expected = nsawk2a.ok + +nsawk2b.arguments = -v|awk::I=fine +nsawk2b.scripts = nsawk2.awk +nsawk2b.expected = nsawk2b.ok + +nsidentifier.arguments = -v|SORT=sort +nsidentifier.scripts = nsidentifier.awk +nsidentifier.expected = nsidentifier.ok + +readfile2.scripts = readfile2.awk +readfile2.operands = @path:readfile2.awk|@path:readdir.awk +readfile2.expected = readfile2.ok + +spacere.scripts = spacere.awk +spacere.expected = spacere.ok + +symtab6.scripts = symtab6.awk +symtab6.expected = symtab6.ok + +symtab9.scripts = symtab9.awk +symtab9.expected = symtab9.ok diff --git a/src/site/markdown/compatibility.md b/src/site/markdown/compatibility.md index eea779f0..7386f69c 100644 --- a/src/site/markdown/compatibility.md +++ b/src/site/markdown/compatibility.md @@ -77,14 +77,14 @@ Jawk tuples are reusable, but they should be treated as internal artifacts tied Jawk maintains compatibility tests derived from the BWK (One True AWK) and gawk test suites. These run automatically as integration tests during `mvn verify`. Compatibility suites now live under `src/it/java`, with their vendored inputs under `src/it/resources`. -The gawk suite is metadata-driven: Jawk vendors gawk's `Makefile.am`, `Gentests`, and generated `Maketests` snapshot, parses the portable `Maketests` rules in JUnit 4, and executes those cases through the Jawk CLI without depending on `make`. +The gawk suite is metadata-driven: Jawk vendors gawk's `Makefile.am`, `Gentests`, and generated `Maketests` snapshot, parses the portable `Maketests` rules in JUnit 4, and also loads a small curated manifest of handwritten `Makefile.am` rules that map directly onto `AwkTestSupport`. | Suite | Coverage | | --- | --- | | **BwkPIT** | Pattern matching and basic AWK operations from the BWK test collection | | **BwkTIT** | Text processing, field splitting, built-in functions, and output formatting | | **BwkMiscIT** | Miscellaneous BWK compatibility edge cases | -| **GawkCompatibilityIT** | Portable gawk compatibility derived from the vendored `Maketests` snapshot, with unsupported shell, debugger, CSV, pretty-print, lint, traditional, and bignum modes skipped explicitly | +| **GawkCompatibilityIT** | Portable gawk compatibility derived from the vendored `Maketests` snapshot plus a curated handwritten-manifest subset, with unsupported shell, debugger, CSV, pretty-print, lint, traditional, and bignum modes skipped explicitly | Not all gawk compatibility cases pass, primarily because Jawk uses Java regular expressions and `java.util.Formatter` rather than their C equivalents. Linux CI is the authoritative environment for the full compatibility pass rate. Windows can still run the portable metadata-driven subset without requiring Unix tooling. diff --git a/src/test/java/io/jawk/GawkMaketestsParserTest.java b/src/test/java/io/jawk/GawkMaketestsParserTest.java index ac9bdfed..6edb169e 100644 --- a/src/test/java/io/jawk/GawkMaketestsParserTest.java +++ b/src/test/java/io/jawk/GawkMaketestsParserTest.java @@ -100,6 +100,24 @@ public void parseCLocaleAsNoOverride() throws Exception { assertNull(gawkCase.localeTag()); } + /** + * Verifies that gawk locale modifiers such as {@code @euro} are ignored when + * mapping the locale to a BCP-47 language tag. + * + * @throws Exception when parsing the sample metadata fails + */ + @Test + public void parseLocaleWithModifier() throws Exception { + GawkMaketestsParser.GawkCase gawkCase = parseSingleCase( + "localemod:\n" + + "\t@echo $@\n" + + "\t@-[ -z \"$$GAWKLOCALE\" ] && GAWKLOCALE=de_DE@euro; export GAWKLOCALE; \\\n" + + "\tAWKPATH=\"$(srcdir)\" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@\n" + + "\t@-$(CMP) \"$(srcdir)\"/$@.ok _$@ && rm -f _$@\n"); + + assertEquals("de-DE", gawkCase.localeTag()); + } + /** * Verifies that shell-script rules are identified as explicit skips because * the Jawk harness does not execute external shell scripts in-process. diff --git a/src/test/java/io/jawk/GawkManualCasesParserTest.java b/src/test/java/io/jawk/GawkManualCasesParserTest.java new file mode 100644 index 00000000..62a53f69 --- /dev/null +++ b/src/test/java/io/jawk/GawkManualCasesParserTest.java @@ -0,0 +1,88 @@ +package io.jawk; + +/*- + * ╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲ + * Jawk + * ჻჻჻჻჻჻ + * Copyright 2006 - 2026 MetricsHub + * ჻჻჻჻჻჻ + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * . + * ╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱ + */ + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; + +import java.io.StringReader; +import java.util.List; +import org.junit.Test; + +/** + * Unit tests for the curated manifest of handwritten gawk compatibility cases. + */ +public class GawkManualCasesParserTest { + + /** + * Verifies that the handwritten manifest preserves raw CLI arguments, staged + * path operands, and leading whitespace in literal operands. + * + * @throws Exception when parsing the manifest snippet fails + */ + @Test + public void parseManualCaseWithArgumentsAndOperands() throws Exception { + GawkCompatibilityCase gawkCase = parseSingleCase( + "cases = manualcase\n" + + "manualcase.arguments = -v|awk::I=fine\n" + + "manualcase.scripts = first.awk|second.awk\n" + + "manualcase.operands = @path:first.awk| /no/such/file\n" + + "manualcase.stdin = data.in\n" + + "manualcase.expected = data.ok\n"); + + assertEquals("manualcase", gawkCase.name()); + assertEquals(2, gawkCase.arguments().size()); + assertEquals("-v", gawkCase.arguments().get(0)); + assertEquals("awk::I=fine", gawkCase.arguments().get(1)); + assertEquals(2, gawkCase.scriptFileNames().size()); + assertEquals("first.awk", gawkCase.scriptFileNames().get(0)); + assertEquals("second.awk", gawkCase.scriptFileNames().get(1)); + assertEquals(2, gawkCase.operands().size()); + assertEquals("@path:first.awk", gawkCase.operands().get(0)); + assertEquals(" /no/such/file", gawkCase.operands().get(1)); + assertEquals("data.in", gawkCase.stdinFileName()); + assertEquals("data.ok", gawkCase.expectedFileName()); + assertFalse(gawkCase.requiresExplicitSkip()); + } + + /** + * Verifies that the handwritten manifest rejects cases that do not declare a + * comparison target. + * + * @throws Exception when parsing unexpectedly succeeds + */ + @Test(expected = IllegalArgumentException.class) + public void rejectMissingExpectedFile() throws Exception { + GawkManualCasesParser + .parse( + new StringReader( + "cases = broken\n" + + "broken.scripts = broken.awk\n")); + } + + private static GawkCompatibilityCase parseSingleCase(String manifestSnippet) throws Exception { + List cases = GawkManualCasesParser.parse(new StringReader(manifestSnippet)); + assertEquals(1, cases.size()); + return cases.get(0); + } +} From f2f59553df591fb7ab56075019925d7707bb5744 Mon Sep 17 00:00:00 2001 From: Bertrand Martin Date: Wed, 22 Apr 2026 14:47:44 +0200 Subject: [PATCH 06/15] Replace manual gawk manifest with direct IT --- .../java/io/jawk/GawkCompatibilityCase.java | 86 ---- src/it/java/io/jawk/GawkCompatibilityIT.java | 60 +-- src/it/java/io/jawk/GawkMaketestsParser.java | 27 +- .../java/io/jawk/GawkManualCasesParser.java | 182 -------- src/it/java/io/jawk/GawkManualIT.java | 435 ++++++++++++++++++ src/it/resources/gawk/manual-cases.properties | 57 --- src/site/markdown/compatibility.md | 5 +- .../io/jawk/GawkManualCasesParserTest.java | 88 ---- 8 files changed, 455 insertions(+), 485 deletions(-) delete mode 100644 src/it/java/io/jawk/GawkCompatibilityCase.java delete mode 100644 src/it/java/io/jawk/GawkManualCasesParser.java create mode 100644 src/it/java/io/jawk/GawkManualIT.java delete mode 100644 src/it/resources/gawk/manual-cases.properties delete mode 100644 src/test/java/io/jawk/GawkManualCasesParserTest.java diff --git a/src/it/java/io/jawk/GawkCompatibilityCase.java b/src/it/java/io/jawk/GawkCompatibilityCase.java deleted file mode 100644 index c3f4e6ec..00000000 --- a/src/it/java/io/jawk/GawkCompatibilityCase.java +++ /dev/null @@ -1,86 +0,0 @@ -package io.jawk; - -/*- - * ╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲ - * Jawk - * ჻჻჻჻჻჻ - * Copyright (C) 2006 - 2026 MetricsHub - * ჻჻჻჻჻჻ - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . - * ╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱ - */ - -import java.util.List; - -/** - * Shared model for compatibility cases consumed by {@link GawkCompatibilityIT}. - * Implementations may come from gawk's generated {@code Maketests} metadata or - * from a curated manifest of handwritten {@code Makefile.am} rules. - */ -interface GawkCompatibilityCase { - - /** - * Returns the stable gawk target name for this compatibility case. - * - * @return case name used in reporting and expected-output lookup - */ - String name(); - - /** - * Returns the raw command-line arguments that must appear before any - * {@code -f} script arguments. - * - * @return immutable list of CLI arguments - */ - List arguments(); - - /** - * Returns the staged script file names that should be passed through - * {@code -f} in the declared order. - * - * @return immutable list of staged script file names - */ - List scriptFileNames(); - - /** - * Returns the operand list that should be supplied after all script - * arguments. - * - * @return immutable list of AWK operands - */ - List operands(); - - /** - * Returns the staged stdin fixture file name, if the case redirects stdin. - * - * @return fixture file name or {@code null} when stdin is unused - */ - String stdinFileName(); - - /** - * Returns the staged expected-output fixture file name. - * - * @return expected-output file name - */ - String expectedFileName(); - - /** - * Indicates whether the compatibility harness requires an explicit skip - * manifest entry before the case may appear in the suite. - * - * @return {@code true} when the case must be listed in {@code skips.properties} - */ - boolean requiresExplicitSkip(); -} diff --git a/src/it/java/io/jawk/GawkCompatibilityIT.java b/src/it/java/io/jawk/GawkCompatibilityIT.java index 4d6ddadf..7a5882db 100644 --- a/src/it/java/io/jawk/GawkCompatibilityIT.java +++ b/src/it/java/io/jawk/GawkCompatibilityIT.java @@ -52,8 +52,7 @@ /** * Integration suite derived from vendored gawk metadata. The suite stages the * gawk snapshot into the Failsafe working directory, parses the portable - * generated rules from {@code Maketests}, loads a curated manifest of simple - * handwritten {@code Makefile.am} rules, and executes those cases through + * generated rules from {@code Maketests} and executes those cases through * {@link AwkTestSupport#cliTest(String)}. */ @RunWith(Parameterized.class) @@ -61,12 +60,10 @@ public class GawkCompatibilityIT { private static final String GAWK_RESOURCE_PATH = "/gawk"; private static final String MAKETESTS_FILE = "Maketests"; - private static final String MANUAL_CASES_FILE = "manual-cases.properties"; private static final String SKIP_MANIFEST_FILE = "skips.properties"; private static final String EXIT_CODE_PREFIX = "EXIT CODE: "; private static final String ACTUAL_OUTPUT_DIRECTORY = "gawk-actual"; private static final String STAGED_DIRECTORY_PREFIX = "gawk-staged-"; - private static final String STAGED_PATH_PREFIX = "@path:"; private static final int MAX_CAPTURED_OUTPUT_BYTES = 1024 * 1024; private static final int DIFF_CONTEXT_RADIUS = 80; private static final boolean LOG_PROGRESS = Boolean.getBoolean("jawk.gawk.progress"); @@ -100,19 +97,19 @@ public static void afterAll() throws Exception { /** * Returns every gawk compatibility case discovered from the vendored - * generated and handwritten metadata snapshots. + * generated metadata snapshot. * * @return parameter values for the suite * @throws Exception when loading or validating the gawk metadata fails */ @Parameters(name = "GAWK {0}") - public static Iterable parameters() throws Exception { + public static Iterable parameters() throws Exception { return loadSuiteState().cases; } /** Gawk compatibility case under test. */ @Parameter - public GawkCompatibilityCase gawkCase; + public GawkMaketestsParser.GawkCase gawkCase; /** * Executes one gawk compatibility case unless the explicit skip manifest marks @@ -135,15 +132,13 @@ public void test() throws Exception { .mergeStdoutAndStderr() .maxOutputBytes(MAX_CAPTURED_OUTPUT_BYTES); - for (String argument : gawkCase.arguments()) { - builder.argument(resolveStagedPathSpec(state.stagedDirectory, argument)); + if (gawkCase.localeTag() != null) { + builder.argument("--locale", gawkCase.localeTag()); } - for (String scriptFileName : gawkCase.scriptFileNames()) { - builder.argument("-f", state.stagedDirectory.resolve(scriptFileName).toString()); - } - for (String operand : gawkCase.operands()) { - builder.operand(resolveStagedPathSpec(state.stagedDirectory, operand)); + for (String flag : gawkCase.runnableFlags()) { + builder.argument(flag); } + builder.argument("-f", state.stagedDirectory.resolve(gawkCase.scriptFileName()).toString()); if (gawkCase.stdinFileName() != null) { builder.stdin(Files.readAllBytes(state.stagedDirectory.resolve(gawkCase.stdinFileName()))); } @@ -172,9 +167,7 @@ private static synchronized SuiteState loadSuiteState() throws Exception { Path resourceDirectory = resolveResourceDirectory(); Path stagedDirectory = stageResourceDirectory(resourceDirectory); Path actualOutputDirectory = Files.createDirectories(stagedDirectory.resolve(ACTUAL_OUTPUT_DIRECTORY)); - List parsedCases = parseCases( - resourceDirectory.resolve(MAKETESTS_FILE), - resourceDirectory.resolve(MANUAL_CASES_FILE)); + List parsedCases = parseCases(resourceDirectory.resolve(MAKETESTS_FILE)); Map skipReasons = loadSkipReasons(resourceDirectory.resolve(SKIP_MANIFEST_FILE)); validateCoverage(parsedCases, skipReasons); suiteState = new SuiteState(stagedDirectory, actualOutputDirectory, parsedCases, skipReasons); @@ -200,7 +193,6 @@ private static Path stageResourceDirectory(Path sourceDirectory) throws IOExcept try (Stream paths = Files.walk(sourceDirectory)) { paths.forEach(path -> copyToWorkingDirectory(sourceDirectory, stagedDirectory, path)); } - createConfiguredMakefileAlias(stagedDirectory); return stagedDirectory; } @@ -225,15 +217,10 @@ private static void copyToWorkingDirectory(Path sourceDirectory, Path workingDir } } - private static List parseCases(Path maketestsPath, Path manualCasesPath) throws IOException { - List cases = new ArrayList<>(); + private static List parseCases(Path maketestsPath) throws IOException { try (Reader reader = Files.newBufferedReader(maketestsPath, StandardCharsets.UTF_8)) { - cases.addAll(GawkMaketestsParser.parse(reader)); - } - try (Reader reader = Files.newBufferedReader(manualCasesPath, StandardCharsets.UTF_8)) { - cases.addAll(GawkManualCasesParser.parse(reader)); + return new ArrayList<>(GawkMaketestsParser.parse(reader)); } - return Collections.unmodifiableList(cases); } private static Map loadSkipReasons(Path manifestPath) throws IOException { @@ -249,12 +236,12 @@ private static Map loadSkipReasons(Path manifestPath) throws IOE } private static void validateCoverage( - List parsedCases, + List parsedCases, Map skipReasons) { TreeSet parsedNames = new TreeSet<>(); TreeSet duplicateNames = new TreeSet<>(); TreeSet missingSkipEntries = new TreeSet<>(); - for (GawkCompatibilityCase parsedCase : parsedCases) { + for (GawkMaketestsParser.GawkCase parsedCase : parsedCases) { if (!parsedNames.add(parsedCase.name())) { duplicateNames.add(parsedCase.name()); } @@ -285,21 +272,6 @@ private static String renderMaketestsOutput(String output, int exitCode) { return normalized + EXIT_CODE_PREFIX + exitCode + "\n"; } - private static String resolveStagedPathSpec(Path stagedDirectory, String value) { - if (value != null && value.startsWith(STAGED_PATH_PREFIX)) { - return stagedDirectory.resolve(value.substring(STAGED_PATH_PREFIX.length())).normalize().toString(); - } - return value; - } - - private static void createConfiguredMakefileAlias(Path stagedDirectory) throws IOException { - Path makefile = stagedDirectory.resolve("Makefile"); - Path makefileIn = stagedDirectory.resolve("Makefile.in"); - if (Files.notExists(makefile) && Files.exists(makefileIn)) { - Files.copy(makefileIn, makefile); - } - } - private static void deleteRecursively(Path directory) throws IOException { if (directory == null || Files.notExists(directory)) { return; @@ -405,13 +377,13 @@ private static String normalizeNewlines(String text) { private static final class SuiteState { private final Path stagedDirectory; private final Path actualOutputDirectory; - private final List cases; + private final List cases; private final Map skipReasons; SuiteState( Path stagedDirectory, Path actualOutputDirectory, - List cases, + List cases, Map skipReasons) { this.stagedDirectory = stagedDirectory; this.actualOutputDirectory = actualOutputDirectory; diff --git a/src/it/java/io/jawk/GawkMaketestsParser.java b/src/it/java/io/jawk/GawkMaketestsParser.java index 0c39a9ca..078f4f17 100644 --- a/src/it/java/io/jawk/GawkMaketestsParser.java +++ b/src/it/java/io/jawk/GawkMaketestsParser.java @@ -144,7 +144,7 @@ private static String parseLocaleTag(String blockText) { + languageAndCountry[1].toUpperCase(Locale.ROOT); } - static final class GawkCase implements GawkCompatibilityCase { + static final class GawkCase { private final String name; private final boolean shellScript; private final List flags; @@ -173,7 +173,6 @@ static final class GawkCase implements GawkCompatibilityCase { this.localeTag = localeTag; } - @Override public String name() { return name; } @@ -202,7 +201,6 @@ boolean readsStandardInput() { return readsStandardInput; } - @Override public String stdinFileName() { return readsStandardInput ? name + ".in" : null; } @@ -211,7 +209,6 @@ boolean hasMpfrExpectedVariant() { return hasMpfrExpectedVariant; } - @Override public String expectedFileName() { return name + ".ok"; } @@ -220,32 +217,10 @@ String localeTag() { return localeTag; } - @Override public boolean requiresExplicitSkip() { return shellScript || !unsupportedFlags.isEmpty(); } - @Override - public List arguments() { - List arguments = new ArrayList<>(); - if (localeTag != null) { - arguments.add("--locale"); - arguments.add(localeTag); - } - arguments.addAll(runnableFlags); - return Collections.unmodifiableList(arguments); - } - - @Override - public List scriptFileNames() { - return Collections.singletonList(scriptFileName()); - } - - @Override - public List operands() { - return Collections.emptyList(); - } - @Override public String toString() { return name; diff --git a/src/it/java/io/jawk/GawkManualCasesParser.java b/src/it/java/io/jawk/GawkManualCasesParser.java deleted file mode 100644 index e4ad11f1..00000000 --- a/src/it/java/io/jawk/GawkManualCasesParser.java +++ /dev/null @@ -1,182 +0,0 @@ -package io.jawk; - -/*- - * ╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲ - * Jawk - * ჻჻჻჻჻჻ - * Copyright (C) 2006 - 2026 MetricsHub - * ჻჻჻჻჻჻ - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . - * ╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱ - */ - -import java.io.IOException; -import java.io.Reader; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Properties; -import java.util.Set; - -final class GawkManualCasesParser { - - private static final String CASES_PROPERTY = "cases"; - - private GawkManualCasesParser() {} - - static List parse(Reader reader) throws IOException { - Properties properties = new Properties(); - properties.load(reader); - List caseNames = parseCaseNames(properties.getProperty(CASES_PROPERTY)); - List cases = new ArrayList<>(caseNames.size()); - Set seen = new LinkedHashSet<>(); - for (String caseName : caseNames) { - if (!seen.add(caseName)) { - throw new IllegalArgumentException("Duplicate manual gawk case name: " + caseName); - } - cases.add(parseCase(properties, caseName)); - } - return Collections.unmodifiableList(cases); - } - - private static GawkCompatibilityCase parseCase(Properties properties, String caseName) { - List scripts = parseList(require(properties, caseName, "scripts")); - if (scripts.isEmpty()) { - throw new IllegalArgumentException("Manual gawk case " + caseName + " must declare at least one script"); - } - return new ManualGawkCase( - caseName, - parseList(properties.getProperty(propertyName(caseName, "arguments"))), - scripts, - parseList(properties.getProperty(propertyName(caseName, "operands"))), - optional(properties, caseName, "stdin"), - require(properties, caseName, "expected")); - } - - private static List parseCaseNames(String rawCaseNames) { - if (rawCaseNames == null || rawCaseNames.trim().isEmpty()) { - return Collections.emptyList(); - } - List caseNames = new ArrayList<>(); - for (String rawCaseName : rawCaseNames.split(",")) { - String caseName = rawCaseName.trim(); - if (!caseName.isEmpty()) { - caseNames.add(caseName); - } - } - return Collections.unmodifiableList(caseNames); - } - - private static List parseList(String rawValue) { - if (rawValue == null || rawValue.trim().isEmpty()) { - return Collections.emptyList(); - } - List values = new ArrayList<>(); - Arrays.stream(rawValue.split("\\|", -1)).forEach(value -> { - if (!value.isEmpty()) { - values.add(value); - } - }); - return Collections.unmodifiableList(values); - } - - private static String require(Properties properties, String caseName, String suffix) { - String value = optional(properties, caseName, suffix); - if (value == null) { - throw new IllegalArgumentException( - "Missing property " + propertyName(caseName, suffix) + " for manual gawk case " + caseName); - } - return value; - } - - private static String optional(Properties properties, String caseName, String suffix) { - String value = properties.getProperty(propertyName(caseName, suffix)); - if (value == null) { - return null; - } - String trimmed = value.trim(); - return trimmed.isEmpty() ? null : trimmed; - } - - private static String propertyName(String caseName, String suffix) { - return caseName + "." + suffix; - } - - private static final class ManualGawkCase implements GawkCompatibilityCase { - private final String name; - private final List arguments; - private final List scriptFileNames; - private final List operands; - private final String stdinFileName; - private final String expectedFileName; - - ManualGawkCase( - String name, - List arguments, - List scriptFileNames, - List operands, - String stdinFileName, - String expectedFileName) { - this.name = name; - this.arguments = Collections.unmodifiableList(new ArrayList<>(arguments)); - this.scriptFileNames = Collections.unmodifiableList(new ArrayList<>(scriptFileNames)); - this.operands = Collections.unmodifiableList(new ArrayList<>(operands)); - this.stdinFileName = stdinFileName; - this.expectedFileName = expectedFileName; - } - - @Override - public String name() { - return name; - } - - @Override - public List arguments() { - return arguments; - } - - @Override - public List scriptFileNames() { - return scriptFileNames; - } - - @Override - public List operands() { - return operands; - } - - @Override - public String stdinFileName() { - return stdinFileName; - } - - @Override - public String expectedFileName() { - return expectedFileName; - } - - @Override - public boolean requiresExplicitSkip() { - return false; - } - - @Override - public String toString() { - return name; - } - } -} diff --git a/src/it/java/io/jawk/GawkManualIT.java b/src/it/java/io/jawk/GawkManualIT.java new file mode 100644 index 00000000..106655ff --- /dev/null +++ b/src/it/java/io/jawk/GawkManualIT.java @@ -0,0 +1,435 @@ +package io.jawk; + +/*- + * ╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲ + * Jawk + * ᛫᛫᛫᛫᛫᛫ + * Copyright (C) 2006 - 2026 MetricsHub + * ᛫᛫᛫᛫᛫᛫ + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * . + * ╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲ + */ + +import static org.junit.Assert.fail; + +import java.io.IOException; +import java.net.URL; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.nio.file.StandardCopyOption; +import java.util.stream.Stream; +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Test; + +/** + * Curated handwritten gawk compatibility cases expressed directly with + * {@link AwkTestSupport}. These cover simple {@code Makefile.am} rules that do + * not justify another metadata parser. + */ +public class GawkManualIT { + + private static final String GAWK_RESOURCE_PATH = "/gawk"; + private static final String EXIT_CODE_PREFIX = "EXIT CODE: "; + private static final String ACTUAL_OUTPUT_DIRECTORY = "gawk-manual-actual"; + private static final String STAGED_DIRECTORY_PREFIX = "gawk-manual-"; + private static final int MAX_CAPTURED_OUTPUT_BYTES = 1024 * 1024; + private static final int DIFF_CONTEXT_RADIUS = 80; + private static final boolean LOG_PROGRESS = Boolean.getBoolean("jawk.gawk.progress"); + + private static SuiteState suiteState; + + @BeforeClass + public static void beforeAll() throws Exception { + loadSuiteState(); + } + + @AfterClass + public static void afterAll() throws Exception { + if (suiteState == null) { + return; + } + deleteRecursively(suiteState.stagedDirectory); + suiteState = null; + } + + @Test + public void argcasfile() throws Exception { + assertManualCase( + "argcasfile", + (builder, state) -> { + builder.argument("-f", state.stagedDirectory.resolve("argcasfile.awk").toString()); + builder.operand("ARGC=1", " /no/such/file"); + builder.stdin(Files.readAllBytes(state.stagedDirectory.resolve("argcasfile.in"))); + }); + } + + @Test + public void beginfile1() throws Exception { + assertManualCase( + "beginfile1", + (builder, state) -> { + builder.argument("-f", state.stagedDirectory.resolve("beginfile1.awk").toString()); + builder + .operand( + state.stagedDirectory.resolve("beginfile1.awk").toString(), + state.stagedDirectory.toString(), + state.stagedDirectory.resolve("no").resolve("such").resolve("file").toString(), + state.stagedDirectory.resolve("Makefile").toString()); + }); + } + + @Test + public void eofsrc1() throws Exception { + assertManualCase( + "eofsrc1", + (builder, state) -> builder + .argument( + "-f", + state.stagedDirectory.resolve("eofsrc1a.awk").toString(), + "-f", + state.stagedDirectory.resolve("eofsrc1b.awk").toString())); + } + + @Test + public void longwrds() throws Exception { + assertManualCase( + "longwrds", + (builder, state) -> { + builder.argument("-v", "SORT=sort", "-f", state.stagedDirectory.resolve("longwrds.awk").toString()); + builder.stdin(Files.readAllBytes(state.stagedDirectory.resolve("longwrds.in"))); + }); + } + + @Test + public void nsawk1a() throws Exception { + assertManualCase( + "nsawk1a", + (builder, state) -> builder.argument("-f", state.stagedDirectory.resolve("nsawk1.awk").toString())); + } + + @Test + public void nsawk1b() throws Exception { + assertManualCase( + "nsawk1b", + (builder, state) -> builder + .argument( + "-v", + "I=fine", + "-f", + state.stagedDirectory.resolve("nsawk1.awk").toString())); + } + + @Test + public void nsawk1c() throws Exception { + assertManualCase( + "nsawk1c", + (builder, state) -> builder + .argument( + "-v", + "awk::I=fine", + "-f", + state.stagedDirectory.resolve("nsawk1.awk").toString())); + } + + @Test + public void nsawk2a() throws Exception { + assertManualCase( + "nsawk2a", + (builder, state) -> builder + .argument( + "-v", + "I=fine", + "-f", + state.stagedDirectory.resolve("nsawk2.awk").toString())); + } + + @Test + public void nsawk2b() throws Exception { + assertManualCase( + "nsawk2b", + (builder, state) -> builder + .argument( + "-v", + "awk::I=fine", + "-f", + state.stagedDirectory.resolve("nsawk2.awk").toString())); + } + + @Test + public void nsidentifier() throws Exception { + assertManualCase( + "nsidentifier", + (builder, state) -> builder + .argument( + "-v", + "SORT=sort", + "-f", + state.stagedDirectory.resolve("nsidentifier.awk").toString())); + } + + @Test + public void readfile2() throws Exception { + assertManualCase( + "readfile2", + (builder, state) -> { + builder.argument("-f", state.stagedDirectory.resolve("readfile2.awk").toString()); + builder + .operand( + state.stagedDirectory.resolve("readfile2.awk").toString(), + state.stagedDirectory.resolve("readdir.awk").toString()); + }); + } + + @Test + public void spacere() throws Exception { + assertManualCase( + "spacere", + (builder, state) -> builder.argument("-f", state.stagedDirectory.resolve("spacere.awk").toString())); + } + + @Test + public void symtab6() throws Exception { + assertManualCase( + "symtab6", + (builder, state) -> builder.argument("-f", state.stagedDirectory.resolve("symtab6.awk").toString())); + } + + @Test + public void symtab9() throws Exception { + assertManualCase( + "symtab9", + (builder, state) -> builder.argument("-f", state.stagedDirectory.resolve("symtab9.awk").toString())); + } + + private void assertManualCase(String caseName, ManualCaseConfigurer configurer) throws Exception { + SuiteState state = loadSuiteState(); + if (LOG_PROGRESS) { + System.out.println("GAWK manual " + caseName); + } + AwkTestSupport.CliTestBuilder builder = AwkTestSupport + .cliTest("GAWK " + caseName) + .emulateCliMain() + .mergeStdoutAndStderr() + .maxOutputBytes(MAX_CAPTURED_OUTPUT_BYTES); + configurer.configure(builder, state); + AwkTestSupport.TestResult result; + try { + result = builder.build().run(); + } catch (AwkTestSupport.OutputLimitExceededException ex) { + fail( + "Captured output for GAWK " + + caseName + + " exceeded " + + ex.maxBytes() + + " bytes. Enable -Djawk.gawk.progress=true to log case execution."); + return; + } + String actual = renderCliOutput(result.output(), result.exitCode()); + String expected = normalizeNewlines(readUtf8(state.stagedDirectory.resolve(caseName + ".ok"))); + assertOutputMatches(state, caseName, expected, actual); + } + + private static synchronized SuiteState loadSuiteState() throws Exception { + if (suiteState != null) { + return suiteState; + } + Path resourceDirectory = resolveResourceDirectory(); + Path stagedDirectory = stageResourceDirectory(resourceDirectory); + Path actualOutputDirectory = Files.createDirectories(stagedDirectory.resolve(ACTUAL_OUTPUT_DIRECTORY)); + suiteState = new SuiteState(stagedDirectory, actualOutputDirectory); + return suiteState; + } + + private static Path resolveResourceDirectory() throws Exception { + URL resourceUrl = GawkManualIT.class.getResource(GAWK_RESOURCE_PATH); + if (resourceUrl == null) { + throw new IOException("Couldn't find resource " + GAWK_RESOURCE_PATH); + } + Path resourceDirectory = Paths.get(resourceUrl.toURI()); + if (!Files.isDirectory(resourceDirectory)) { + throw new IOException(GAWK_RESOURCE_PATH + " is not a directory"); + } + return resourceDirectory; + } + + private static Path stageResourceDirectory(Path sourceDirectory) throws IOException { + Path workingDirectory = Paths.get("").toAbsolutePath().normalize(); + Files.createDirectories(workingDirectory); + Path stagedDirectory = Files.createTempDirectory(workingDirectory, STAGED_DIRECTORY_PREFIX); + try (Stream paths = Files.walk(sourceDirectory)) { + paths.forEach(path -> copyToWorkingDirectory(sourceDirectory, stagedDirectory, path)); + } + createConfiguredMakefileAlias(stagedDirectory); + return stagedDirectory; + } + + private static void copyToWorkingDirectory(Path sourceDirectory, Path workingDirectory, Path sourcePath) { + try { + Path relativePath = sourceDirectory.relativize(sourcePath); + if (relativePath.toString().isEmpty()) { + return; + } + Path destination = workingDirectory.resolve(relativePath); + if (Files.isDirectory(sourcePath)) { + Files.createDirectories(destination); + } else { + Path parent = destination.getParent(); + if (parent != null) { + Files.createDirectories(parent); + } + Files.copy(sourcePath, destination, StandardCopyOption.REPLACE_EXISTING); + } + } catch (IOException ex) { + throw new IllegalStateException("Failed to stage gawk resource " + sourcePath, ex); + } + } + + private static void createConfiguredMakefileAlias(Path stagedDirectory) throws IOException { + Path makefile = stagedDirectory.resolve("Makefile"); + Path makefileIn = stagedDirectory.resolve("Makefile.in"); + if (Files.notExists(makefile) && Files.exists(makefileIn)) { + Files.copy(makefileIn, makefile); + } + } + + private static void deleteRecursively(Path directory) throws IOException { + if (directory == null || Files.notExists(directory)) { + return; + } + try (Stream paths = Files.walk(directory)) { + paths.sorted((left, right) -> right.compareTo(left)).forEach(path -> { + try { + Files.deleteIfExists(path); + } catch (IOException ex) { + throw new IllegalStateException("Failed to delete staged gawk resource " + path, ex); + } + }); + } catch (IllegalStateException ex) { + if (ex.getCause() instanceof IOException) { + throw (IOException) ex.getCause(); + } + throw ex; + } + } + + private void assertOutputMatches(SuiteState state, String caseName, String expected, String actual) + throws IOException { + if (expected.equals(actual)) { + return; + } + Path actualOutputPath = state.actualOutputDirectory.resolve(caseName + ".actual"); + Files.write(actualOutputPath, actual.getBytes(StandardCharsets.UTF_8)); + int mismatchIndex = firstMismatchIndex(expected, actual); + throw new AssertionError(buildMismatchMessage(caseName, actualOutputPath, expected, actual, mismatchIndex)); + } + + private String buildMismatchMessage( + String caseName, + Path actualOutputPath, + String expected, + String actual, + int mismatchIndex) { + StringBuilder message = new StringBuilder(); + message.append("Unexpected output for GAWK ").append(caseName); + if (mismatchIndex >= 0) { + message.append(" at char ").append(mismatchIndex); + } + message + .append(" (expected length ") + .append(expected.length()) + .append(", actual length ") + .append(actual.length()) + .append(")."); + if (mismatchIndex >= 0) { + message + .append(" Expected snippet: ") + .append(snippetAround(expected, mismatchIndex)) + .append(". Actual snippet: ") + .append(snippetAround(actual, mismatchIndex)) + .append("."); + } + message.append(" Actual output written to ").append(actualOutputPath); + return message.toString(); + } + + private static int firstMismatchIndex(String expected, String actual) { + int commonLength = Math.min(expected.length(), actual.length()); + for (int index = 0; index < commonLength; index++) { + if (expected.charAt(index) != actual.charAt(index)) { + return index; + } + } + if (expected.length() != actual.length()) { + return commonLength; + } + return -1; + } + + private static String snippetAround(String text, int index) { + if (text.isEmpty()) { + return "\"\""; + } + int start = Math.max(0, index - DIFF_CONTEXT_RADIUS); + int end = Math.min(text.length(), index + DIFF_CONTEXT_RADIUS); + String prefix = start > 0 ? "..." : ""; + String suffix = end < text.length() ? "..." : ""; + return "\"" + + prefix + + sanitizeSnippet(text.substring(start, end)) + + suffix + + "\""; + } + + private static String sanitizeSnippet(String text) { + return text + .replace("\\", "\\\\") + .replace("\r", "\\r") + .replace("\n", "\\n") + .replace("\t", "\\t"); + } + + private static String renderCliOutput(String output, int exitCode) { + String normalized = normalizeNewlines(output); + if (exitCode == 0) { + return normalized; + } + return normalized + EXIT_CODE_PREFIX + exitCode + "\n"; + } + + private static String readUtf8(Path path) throws IOException { + return new String(Files.readAllBytes(path), StandardCharsets.UTF_8); + } + + private static String normalizeNewlines(String text) { + return text.replace("\r\n", "\n").replace("\r", "\n"); + } + + private interface ManualCaseConfigurer { + void configure(AwkTestSupport.CliTestBuilder builder, SuiteState state) throws Exception; + } + + private static final class SuiteState { + private final Path stagedDirectory; + private final Path actualOutputDirectory; + + SuiteState(Path stagedDirectory, Path actualOutputDirectory) { + this.stagedDirectory = stagedDirectory; + this.actualOutputDirectory = actualOutputDirectory; + } + } +} diff --git a/src/it/resources/gawk/manual-cases.properties b/src/it/resources/gawk/manual-cases.properties deleted file mode 100644 index 77003cef..00000000 --- a/src/it/resources/gawk/manual-cases.properties +++ /dev/null @@ -1,57 +0,0 @@ -# Curated handwritten Makefile.am rules that map cleanly onto AwkTestSupport. -# These cases complement Maketests without attempting to model arbitrary make recipes. - -cases = argcasfile, beginfile1, eofsrc1, longwrds, nsawk1a, nsawk1b, nsawk1c, nsawk2a, nsawk2b, nsidentifier, readfile2, spacere, symtab6, symtab9 - -argcasfile.scripts = argcasfile.awk -argcasfile.operands = ARGC=1| /no/such/file -argcasfile.stdin = argcasfile.in -argcasfile.expected = argcasfile.ok - -beginfile1.scripts = beginfile1.awk -beginfile1.operands = @path:beginfile1.awk|@path:.|@path:./no/such/file|@path:Makefile -beginfile1.expected = beginfile1.ok - -eofsrc1.scripts = eofsrc1a.awk|eofsrc1b.awk -eofsrc1.expected = eofsrc1.ok - -longwrds.arguments = -v|SORT=sort -longwrds.scripts = longwrds.awk -longwrds.stdin = longwrds.in -longwrds.expected = longwrds.ok - -nsawk1a.scripts = nsawk1.awk -nsawk1a.expected = nsawk1a.ok - -nsawk1b.arguments = -v|I=fine -nsawk1b.scripts = nsawk1.awk -nsawk1b.expected = nsawk1b.ok - -nsawk1c.arguments = -v|awk::I=fine -nsawk1c.scripts = nsawk1.awk -nsawk1c.expected = nsawk1c.ok - -nsawk2a.arguments = -v|I=fine -nsawk2a.scripts = nsawk2.awk -nsawk2a.expected = nsawk2a.ok - -nsawk2b.arguments = -v|awk::I=fine -nsawk2b.scripts = nsawk2.awk -nsawk2b.expected = nsawk2b.ok - -nsidentifier.arguments = -v|SORT=sort -nsidentifier.scripts = nsidentifier.awk -nsidentifier.expected = nsidentifier.ok - -readfile2.scripts = readfile2.awk -readfile2.operands = @path:readfile2.awk|@path:readdir.awk -readfile2.expected = readfile2.ok - -spacere.scripts = spacere.awk -spacere.expected = spacere.ok - -symtab6.scripts = symtab6.awk -symtab6.expected = symtab6.ok - -symtab9.scripts = symtab9.awk -symtab9.expected = symtab9.ok diff --git a/src/site/markdown/compatibility.md b/src/site/markdown/compatibility.md index 7386f69c..8b3dc5b6 100644 --- a/src/site/markdown/compatibility.md +++ b/src/site/markdown/compatibility.md @@ -77,14 +77,15 @@ Jawk tuples are reusable, but they should be treated as internal artifacts tied Jawk maintains compatibility tests derived from the BWK (One True AWK) and gawk test suites. These run automatically as integration tests during `mvn verify`. Compatibility suites now live under `src/it/java`, with their vendored inputs under `src/it/resources`. -The gawk suite is metadata-driven: Jawk vendors gawk's `Makefile.am`, `Gentests`, and generated `Maketests` snapshot, parses the portable `Maketests` rules in JUnit 4, and also loads a small curated manifest of handwritten `Makefile.am` rules that map directly onto `AwkTestSupport`. +The gawk coverage is split in two parts: Jawk vendors gawk's `Makefile.am`, `Gentests`, and generated `Maketests` snapshot, parses the portable generated `Maketests` rules in JUnit 4, and keeps a separate handwritten `AwkTestSupport` suite for a curated subset of manual `Makefile.am` rules. | Suite | Coverage | | --- | --- | | **BwkPIT** | Pattern matching and basic AWK operations from the BWK test collection | | **BwkTIT** | Text processing, field splitting, built-in functions, and output formatting | | **BwkMiscIT** | Miscellaneous BWK compatibility edge cases | -| **GawkCompatibilityIT** | Portable gawk compatibility derived from the vendored `Maketests` snapshot plus a curated handwritten-manifest subset, with unsupported shell, debugger, CSV, pretty-print, lint, traditional, and bignum modes skipped explicitly | +| **GawkCompatibilityIT** | Portable gawk compatibility derived from the vendored `Maketests` snapshot, with unsupported shell, debugger, CSV, pretty-print, lint, traditional, and bignum modes skipped explicitly | +| **GawkManualIT** | Curated handwritten `Makefile.am` rules expressed directly as `AwkTestSupport` integration tests | Not all gawk compatibility cases pass, primarily because Jawk uses Java regular expressions and `java.util.Formatter` rather than their C equivalents. Linux CI is the authoritative environment for the full compatibility pass rate. Windows can still run the portable metadata-driven subset without requiring Unix tooling. diff --git a/src/test/java/io/jawk/GawkManualCasesParserTest.java b/src/test/java/io/jawk/GawkManualCasesParserTest.java deleted file mode 100644 index 62a53f69..00000000 --- a/src/test/java/io/jawk/GawkManualCasesParserTest.java +++ /dev/null @@ -1,88 +0,0 @@ -package io.jawk; - -/*- - * ╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲ - * Jawk - * ჻჻჻჻჻჻ - * Copyright 2006 - 2026 MetricsHub - * ჻჻჻჻჻჻ - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . - * ╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱ - */ - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; - -import java.io.StringReader; -import java.util.List; -import org.junit.Test; - -/** - * Unit tests for the curated manifest of handwritten gawk compatibility cases. - */ -public class GawkManualCasesParserTest { - - /** - * Verifies that the handwritten manifest preserves raw CLI arguments, staged - * path operands, and leading whitespace in literal operands. - * - * @throws Exception when parsing the manifest snippet fails - */ - @Test - public void parseManualCaseWithArgumentsAndOperands() throws Exception { - GawkCompatibilityCase gawkCase = parseSingleCase( - "cases = manualcase\n" - + "manualcase.arguments = -v|awk::I=fine\n" - + "manualcase.scripts = first.awk|second.awk\n" - + "manualcase.operands = @path:first.awk| /no/such/file\n" - + "manualcase.stdin = data.in\n" - + "manualcase.expected = data.ok\n"); - - assertEquals("manualcase", gawkCase.name()); - assertEquals(2, gawkCase.arguments().size()); - assertEquals("-v", gawkCase.arguments().get(0)); - assertEquals("awk::I=fine", gawkCase.arguments().get(1)); - assertEquals(2, gawkCase.scriptFileNames().size()); - assertEquals("first.awk", gawkCase.scriptFileNames().get(0)); - assertEquals("second.awk", gawkCase.scriptFileNames().get(1)); - assertEquals(2, gawkCase.operands().size()); - assertEquals("@path:first.awk", gawkCase.operands().get(0)); - assertEquals(" /no/such/file", gawkCase.operands().get(1)); - assertEquals("data.in", gawkCase.stdinFileName()); - assertEquals("data.ok", gawkCase.expectedFileName()); - assertFalse(gawkCase.requiresExplicitSkip()); - } - - /** - * Verifies that the handwritten manifest rejects cases that do not declare a - * comparison target. - * - * @throws Exception when parsing unexpectedly succeeds - */ - @Test(expected = IllegalArgumentException.class) - public void rejectMissingExpectedFile() throws Exception { - GawkManualCasesParser - .parse( - new StringReader( - "cases = broken\n" - + "broken.scripts = broken.awk\n")); - } - - private static GawkCompatibilityCase parseSingleCase(String manifestSnippet) throws Exception { - List cases = GawkManualCasesParser.parse(new StringReader(manifestSnippet)); - assertEquals(1, cases.size()); - return cases.get(0); - } -} From ab780ede12269d06186fc42b966973964940e039 Mon Sep 17 00:00:00 2001 From: Bertrand Martin Date: Wed, 22 Apr 2026 15:31:12 +0200 Subject: [PATCH 07/15] Address remaining PR review feedback --- src/it/java/io/jawk/BwkMiscIT.java | 6 +- src/it/java/io/jawk/BwkPIT.java | 6 +- src/it/java/io/jawk/BwkTIT.java | 6 +- src/it/java/io/jawk/GawkCompatibilityIT.java | 21 ++++- src/it/java/io/jawk/GawkMaketestsParser.java | 84 +++++++++++++++++-- src/it/java/io/jawk/GawkManualIT.java | 21 ++++- .../java/io/jawk/GawkMaketestsParserTest.java | 21 +++++ 7 files changed, 155 insertions(+), 10 deletions(-) diff --git a/src/it/java/io/jawk/BwkMiscIT.java b/src/it/java/io/jawk/BwkMiscIT.java index ab9b60db..e9da56da 100644 --- a/src/it/java/io/jawk/BwkMiscIT.java +++ b/src/it/java/io/jawk/BwkMiscIT.java @@ -78,9 +78,13 @@ public static Iterable awkList() throws Exception { if (!scriptsDirectory.isDirectory()) { throw new IOException("scripts is not a directory"); } + File[] scriptFiles = scriptsDirectory.listFiles(); + if (scriptFiles == null) { + throw new IOException("Couldn't list files in " + scriptsDirectory); + } return Arrays - .stream(scriptsDirectory.listFiles()) + .stream(scriptFiles) .filter(scriptFile -> scriptFile.getName().endsWith(".awk")) .map(File::getName) .sorted() diff --git a/src/it/java/io/jawk/BwkPIT.java b/src/it/java/io/jawk/BwkPIT.java index 02d9fefb..1a1511ac 100644 --- a/src/it/java/io/jawk/BwkPIT.java +++ b/src/it/java/io/jawk/BwkPIT.java @@ -81,9 +81,13 @@ public static Iterable awkList() throws Exception { if (!scriptsDirectory.toFile().isDirectory()) { throw new IOException("scripts is not a directory"); } + File[] scriptFiles = scriptsDirectory.toFile().listFiles(); + if (scriptFiles == null) { + throw new IOException("Couldn't list files in " + scriptsDirectory); + } return Arrays - .stream(scriptsDirectory.toFile().listFiles()) + .stream(scriptFiles) .filter(scriptFile -> scriptFile.getName().startsWith("p.")) .map(File::getName) .sorted() diff --git a/src/it/java/io/jawk/BwkTIT.java b/src/it/java/io/jawk/BwkTIT.java index a130987a..eb0145c0 100644 --- a/src/it/java/io/jawk/BwkTIT.java +++ b/src/it/java/io/jawk/BwkTIT.java @@ -82,9 +82,13 @@ public static Iterable awkList() throws Exception { if (!scriptsDirectory.toFile().isDirectory()) { throw new IOException("scripts is not a directory"); } + File[] scriptFiles = scriptsDirectory.toFile().listFiles(); + if (scriptFiles == null) { + throw new IOException("Couldn't list files in " + scriptsDirectory); + } return Arrays - .stream(scriptsDirectory.toFile().listFiles()) + .stream(scriptFiles) .filter(scriptFile -> scriptFile.getName().startsWith("t.")) .map(File::getName) .sorted() diff --git a/src/it/java/io/jawk/GawkCompatibilityIT.java b/src/it/java/io/jawk/GawkCompatibilityIT.java index 7a5882db..2c2663bd 100644 --- a/src/it/java/io/jawk/GawkCompatibilityIT.java +++ b/src/it/java/io/jawk/GawkCompatibilityIT.java @@ -166,7 +166,7 @@ private static synchronized SuiteState loadSuiteState() throws Exception { } Path resourceDirectory = resolveResourceDirectory(); Path stagedDirectory = stageResourceDirectory(resourceDirectory); - Path actualOutputDirectory = Files.createDirectories(stagedDirectory.resolve(ACTUAL_OUTPUT_DIRECTORY)); + Path actualOutputDirectory = resolveActualOutputDirectory(); List parsedCases = parseCases(resourceDirectory.resolve(MAKETESTS_FILE)); Map skipReasons = loadSkipReasons(resourceDirectory.resolve(SKIP_MANIFEST_FILE)); validateCoverage(parsedCases, skipReasons); @@ -272,6 +272,25 @@ private static String renderMaketestsOutput(String output, int exitCode) { return normalized + EXIT_CODE_PREFIX + exitCode + "\n"; } + private static Path resolveActualOutputDirectory() throws IOException { + Path actualOutputDirectory = resolveBuildDirectory().resolve("failsafe-reports").resolve(ACTUAL_OUTPUT_DIRECTORY); + return Files.createDirectories(actualOutputDirectory); + } + + private static Path resolveBuildDirectory() throws IOException { + try { + Path classesDirectory = Paths + .get(GawkCompatibilityIT.class.getProtectionDomain().getCodeSource().getLocation().toURI()); + Path buildDirectory = classesDirectory.getParent(); + if (buildDirectory == null) { + throw new IOException("Couldn't determine build directory from " + classesDirectory); + } + return buildDirectory; + } catch (Exception ex) { + throw new IOException("Couldn't resolve Jawk build directory", ex); + } + } + private static void deleteRecursively(Path directory) throws IOException { if (directory == null || Files.notExists(directory)) { return; diff --git a/src/it/java/io/jawk/GawkMaketestsParser.java b/src/it/java/io/jawk/GawkMaketestsParser.java index 078f4f17..c2ad0589 100644 --- a/src/it/java/io/jawk/GawkMaketestsParser.java +++ b/src/it/java/io/jawk/GawkMaketestsParser.java @@ -38,9 +38,11 @@ final class GawkMaketestsParser { private static final String DUMMY_TARGET = "Gt-dummy"; + private static final String AWK_COMMAND_TOKEN = "$(AWK)"; private static final Pattern TARGET_PATTERN = Pattern.compile("^([A-Za-z0-9_.+-]+):\\s*$"); - private static final Pattern FLAG_PATTERN = Pattern.compile("--[a-z-]+|-M"); private static final Pattern LOCALE_PATTERN = Pattern.compile("GAWKLOCALE=([^;\\s]+)"); + private static final Set SHORT_OPTIONS_WITH_ARGUMENT = new LinkedHashSet<>( + Arrays.asList("-E", "-F", "-f", "-i", "-e", "-v")); private static final Set DIRECT_CLI_FLAGS = new LinkedHashSet<>(Arrays.asList("--posix", "--sandbox")); private static final Set NOOP_FLAGS = new LinkedHashSet<>( Arrays.asList("--non-decimal-data", "--re-interval")); @@ -80,7 +82,9 @@ private static void addCase(List cases, String target, List bl List runnableFlags = new ArrayList<>(); List unsupportedFlags = new ArrayList<>(); for (String flag : flags) { - if (DIRECT_CLI_FLAGS.contains(flag)) { + if ("-f".equals(flag)) { + continue; + } else if (DIRECT_CLI_FLAGS.contains(flag)) { runnableFlags.add(flag); } else if (NOOP_FLAGS.contains(flag)) { continue; @@ -117,13 +121,83 @@ private static String findCommandLine(String target, List blockLines) { private static List parseFlags(String commandLine) { LinkedHashSet flags = new LinkedHashSet<>(); - Matcher matcher = FLAG_PATTERN.matcher(commandLine); - while (matcher.find()) { - flags.add(matcher.group()); + boolean awkCommandSeen = false; + List tokens = tokenizeCommandLine(commandLine); + for (int index = 0; index < tokens.size(); index++) { + String token = tokens.get(index); + if (!awkCommandSeen) { + if (AWK_COMMAND_TOKEN.equals(token)) { + awkCommandSeen = true; + } + continue; + } + if (token.isEmpty() || "--".equals(token) || !token.startsWith("-") || "-".equals(token)) { + continue; + } + if (token.startsWith("--")) { + int equalsIndex = token.indexOf('='); + flags.add(equalsIndex >= 0 ? token.substring(0, equalsIndex) : token); + continue; + } + for (int flagIndex = 1; flagIndex < token.length(); flagIndex++) { + String shortFlag = "-" + token.charAt(flagIndex); + flags.add(shortFlag); + if (SHORT_OPTIONS_WITH_ARGUMENT.contains(shortFlag)) { + if (flagIndex + 1 == token.length()) { + index++; + } + break; + } + } } return Collections.unmodifiableList(new ArrayList<>(flags)); } + private static List tokenizeCommandLine(String commandLine) { + List tokens = new ArrayList<>(); + StringBuilder current = new StringBuilder(); + boolean inSingleQuotes = false; + boolean inDoubleQuotes = false; + boolean escaped = false; + for (int index = 0; index < commandLine.length(); index++) { + char currentChar = commandLine.charAt(index); + if (escaped) { + current.append(currentChar); + escaped = false; + continue; + } + if (currentChar == '\\' && !inSingleQuotes) { + escaped = true; + continue; + } + if (currentChar == '\'' && !inDoubleQuotes) { + inSingleQuotes = !inSingleQuotes; + continue; + } + if (currentChar == '"' && !inSingleQuotes) { + inDoubleQuotes = !inDoubleQuotes; + continue; + } + if (Character.isWhitespace(currentChar) && !inSingleQuotes && !inDoubleQuotes) { + addCurrentToken(tokens, current); + continue; + } + current.append(currentChar); + } + if (escaped) { + current.append('\\'); + } + addCurrentToken(tokens, current); + return Collections.unmodifiableList(tokens); + } + + private static void addCurrentToken(List tokens, StringBuilder current) { + if (current.length() > 0) { + tokens.add(current.toString()); + current.setLength(0); + } + } + private static String parseLocaleTag(String blockText) { Matcher matcher = LOCALE_PATTERN.matcher(blockText); if (!matcher.find()) { diff --git a/src/it/java/io/jawk/GawkManualIT.java b/src/it/java/io/jawk/GawkManualIT.java index 106655ff..cfd280a3 100644 --- a/src/it/java/io/jawk/GawkManualIT.java +++ b/src/it/java/io/jawk/GawkManualIT.java @@ -250,7 +250,7 @@ private static synchronized SuiteState loadSuiteState() throws Exception { } Path resourceDirectory = resolveResourceDirectory(); Path stagedDirectory = stageResourceDirectory(resourceDirectory); - Path actualOutputDirectory = Files.createDirectories(stagedDirectory.resolve(ACTUAL_OUTPUT_DIRECTORY)); + Path actualOutputDirectory = resolveActualOutputDirectory(); suiteState = new SuiteState(stagedDirectory, actualOutputDirectory); return suiteState; } @@ -411,6 +411,25 @@ private static String renderCliOutput(String output, int exitCode) { return normalized + EXIT_CODE_PREFIX + exitCode + "\n"; } + private static Path resolveActualOutputDirectory() throws IOException { + Path actualOutputDirectory = resolveBuildDirectory().resolve("failsafe-reports").resolve(ACTUAL_OUTPUT_DIRECTORY); + return Files.createDirectories(actualOutputDirectory); + } + + private static Path resolveBuildDirectory() throws IOException { + try { + Path classesDirectory = Paths + .get(GawkManualIT.class.getProtectionDomain().getCodeSource().getLocation().toURI()); + Path buildDirectory = classesDirectory.getParent(); + if (buildDirectory == null) { + throw new IOException("Couldn't determine build directory from " + classesDirectory); + } + return buildDirectory; + } catch (Exception ex) { + throw new IOException("Couldn't resolve Jawk build directory", ex); + } + } + private static String readUtf8(Path path) throws IOException { return new String(Files.readAllBytes(path), StandardCharsets.UTF_8); } diff --git a/src/test/java/io/jawk/GawkMaketestsParserTest.java b/src/test/java/io/jawk/GawkMaketestsParserTest.java index 6edb169e..c9828fa8 100644 --- a/src/test/java/io/jawk/GawkMaketestsParserTest.java +++ b/src/test/java/io/jawk/GawkMaketestsParserTest.java @@ -215,6 +215,27 @@ public void parseUnknownFlagsAsUnsupported() throws Exception { assertTrue(gawkCase.requiresExplicitSkip()); } + /** + * Verifies that short gawk options are detected instead of being silently + * ignored when generated metadata grows beyond the current snapshot. + * + * @throws Exception when parsing the sample metadata fails + */ + @Test + public void parseShortFlagsAsUnsupported() throws Exception { + GawkMaketestsParser.GawkCase gawkCase = parseSingleCase( + "shortopt:\n" + + "\t@echo $@\n" + + "\t@-AWKPATH=\"$(srcdir)\" $(AWK) -v name=value -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@\n" + + "\t@-$(CMP) \"$(srcdir)\"/$@.ok _$@ && rm -f _$@\n"); + + assertTrue(gawkCase.flags().contains("-v")); + assertTrue(gawkCase.flags().contains("-f")); + assertEquals(1, gawkCase.unsupportedFlags().size()); + assertEquals("-v", gawkCase.unsupportedFlags().get(0)); + assertTrue(gawkCase.requiresExplicitSkip()); + } + private static GawkMaketestsParser.GawkCase parseSingleCase(String maketestsSnippet) throws Exception { List cases = GawkMaketestsParser.parse(new StringReader(maketestsSnippet)); assertEquals(1, cases.size()); From 1581b358ff633ec7506b8185372114efddf306bc Mon Sep 17 00:00:00 2001 From: Bertrand Martin Date: Wed, 22 Apr 2026 20:07:49 +0200 Subject: [PATCH 08/15] Simplify gawk compatibility test support --- src/it/java/io/jawk/GawkCompatibilityIT.java | 191 ++------------- src/it/java/io/jawk/GawkMaketestsParser.java | 21 +- src/it/java/io/jawk/GawkManualIT.java | 221 ++---------------- src/test/java/io/jawk/AwkTestSupport.java | 173 +++++++++++++- src/test/java/io/jawk/AwkTestSupportTest.java | 116 +++++++++ .../java/io/jawk/GawkMaketestsParserTest.java | 39 ++++ 6 files changed, 389 insertions(+), 372 deletions(-) create mode 100644 src/test/java/io/jawk/AwkTestSupportTest.java diff --git a/src/it/java/io/jawk/GawkCompatibilityIT.java b/src/it/java/io/jawk/GawkCompatibilityIT.java index 2c2663bd..2394be06 100644 --- a/src/it/java/io/jawk/GawkCompatibilityIT.java +++ b/src/it/java/io/jawk/GawkCompatibilityIT.java @@ -31,7 +31,6 @@ import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; -import java.nio.file.StandardCopyOption; import java.util.ArrayList; import java.util.Collections; import java.util.LinkedHashMap; @@ -39,7 +38,6 @@ import java.util.Map; import java.util.Properties; import java.util.TreeSet; -import java.util.stream.Stream; import org.junit.Assume; import org.junit.AfterClass; import org.junit.BeforeClass; @@ -65,7 +63,6 @@ public class GawkCompatibilityIT { private static final String ACTUAL_OUTPUT_DIRECTORY = "gawk-actual"; private static final String STAGED_DIRECTORY_PREFIX = "gawk-staged-"; private static final int MAX_CAPTURED_OUTPUT_BYTES = 1024 * 1024; - private static final int DIFF_CONTEXT_RADIUS = 80; private static final boolean LOG_PROGRESS = Boolean.getBoolean("jawk.gawk.progress"); private static SuiteState suiteState; @@ -91,7 +88,7 @@ public static void afterAll() throws Exception { if (suiteState == null) { return; } - deleteRecursively(suiteState.stagedDirectory); + AwkTestSupport.deleteRecursively(suiteState.stagedDirectory); suiteState = null; } @@ -155,9 +152,15 @@ public void test() throws Exception { + " bytes. Enable -Djawk.gawk.progress=true to log case execution."); return; } - String actual = renderMaketestsOutput(result.output(), result.exitCode()); - String expected = normalizeNewlines(readUtf8(state.stagedDirectory.resolve(gawkCase.expectedFileName()))); - assertOutputMatches(state, expected, actual); + String actual = AwkTestSupport.appendExitCode(result.output(), result.exitCode(), EXIT_CODE_PREFIX); + String expected = AwkTestSupport.readUtf8Normalized(state.stagedDirectory.resolve(gawkCase.expectedFileName())); + AwkTestSupport + .assertOutputMatches( + "GAWK " + gawkCase.name(), + expected, + actual, + state.actualOutputDirectory.resolve(gawkCase.name() + ".actual"), + "Expected file: " + gawkCase.expectedFileName()); } private static synchronized SuiteState loadSuiteState() throws Exception { @@ -165,13 +168,19 @@ private static synchronized SuiteState loadSuiteState() throws Exception { return suiteState; } Path resourceDirectory = resolveResourceDirectory(); - Path stagedDirectory = stageResourceDirectory(resourceDirectory); - Path actualOutputDirectory = resolveActualOutputDirectory(); List parsedCases = parseCases(resourceDirectory.resolve(MAKETESTS_FILE)); Map skipReasons = loadSkipReasons(resourceDirectory.resolve(SKIP_MANIFEST_FILE)); validateCoverage(parsedCases, skipReasons); - suiteState = new SuiteState(stagedDirectory, actualOutputDirectory, parsedCases, skipReasons); - return suiteState; + Path stagedDirectory = null; + try { + stagedDirectory = AwkTestSupport.stageDirectory(resourceDirectory, STAGED_DIRECTORY_PREFIX); + Path actualOutputDirectory = resolveActualOutputDirectory(); + suiteState = new SuiteState(stagedDirectory, actualOutputDirectory, parsedCases, skipReasons); + return suiteState; + } catch (Exception ex) { + AwkTestSupport.deleteRecursively(stagedDirectory); + throw ex; + } } private static Path resolveResourceDirectory() throws Exception { @@ -186,37 +195,6 @@ private static Path resolveResourceDirectory() throws Exception { return resourceDirectory; } - private static Path stageResourceDirectory(Path sourceDirectory) throws IOException { - Path workingDirectory = Paths.get("").toAbsolutePath().normalize(); - Files.createDirectories(workingDirectory); - Path stagedDirectory = Files.createTempDirectory(workingDirectory, STAGED_DIRECTORY_PREFIX); - try (Stream paths = Files.walk(sourceDirectory)) { - paths.forEach(path -> copyToWorkingDirectory(sourceDirectory, stagedDirectory, path)); - } - return stagedDirectory; - } - - private static void copyToWorkingDirectory(Path sourceDirectory, Path workingDirectory, Path sourcePath) { - try { - Path relativePath = sourceDirectory.relativize(sourcePath); - if (relativePath.toString().isEmpty()) { - return; - } - Path destination = workingDirectory.resolve(relativePath); - if (Files.isDirectory(sourcePath)) { - Files.createDirectories(destination); - } else { - Path parent = destination.getParent(); - if (parent != null) { - Files.createDirectories(parent); - } - Files.copy(sourcePath, destination, StandardCopyOption.REPLACE_EXISTING); - } - } catch (IOException ex) { - throw new IllegalStateException("Failed to stage gawk resource " + sourcePath, ex); - } - } - private static List parseCases(Path maketestsPath) throws IOException { try (Reader reader = Files.newBufferedReader(maketestsPath, StandardCharsets.UTF_8)) { return new ArrayList<>(GawkMaketestsParser.parse(reader)); @@ -264,135 +242,14 @@ private static void validateCoverage( } } - private static String renderMaketestsOutput(String output, int exitCode) { - String normalized = normalizeNewlines(output); - if (exitCode == 0) { - return normalized; - } - return normalized + EXIT_CODE_PREFIX + exitCode + "\n"; - } - private static Path resolveActualOutputDirectory() throws IOException { - Path actualOutputDirectory = resolveBuildDirectory().resolve("failsafe-reports").resolve(ACTUAL_OUTPUT_DIRECTORY); + Path actualOutputDirectory = AwkTestSupport + .buildDirectory(GawkCompatibilityIT.class) + .resolve("failsafe-reports") + .resolve(ACTUAL_OUTPUT_DIRECTORY); return Files.createDirectories(actualOutputDirectory); } - private static Path resolveBuildDirectory() throws IOException { - try { - Path classesDirectory = Paths - .get(GawkCompatibilityIT.class.getProtectionDomain().getCodeSource().getLocation().toURI()); - Path buildDirectory = classesDirectory.getParent(); - if (buildDirectory == null) { - throw new IOException("Couldn't determine build directory from " + classesDirectory); - } - return buildDirectory; - } catch (Exception ex) { - throw new IOException("Couldn't resolve Jawk build directory", ex); - } - } - - private static void deleteRecursively(Path directory) throws IOException { - if (directory == null || Files.notExists(directory)) { - return; - } - try (Stream paths = Files.walk(directory)) { - paths.sorted((left, right) -> right.compareTo(left)).forEach(path -> { - try { - Files.deleteIfExists(path); - } catch (IOException ex) { - throw new IllegalStateException("Failed to delete staged gawk resource " + path, ex); - } - }); - } catch (IllegalStateException ex) { - if (ex.getCause() instanceof IOException) { - throw (IOException) ex.getCause(); - } - throw ex; - } - } - - private void assertOutputMatches(SuiteState state, String expected, String actual) throws IOException { - if (expected.equals(actual)) { - return; - } - Path actualOutputPath = state.actualOutputDirectory.resolve(gawkCase.name() + ".actual"); - Files.write(actualOutputPath, actual.getBytes(StandardCharsets.UTF_8)); - int mismatchIndex = firstMismatchIndex(expected, actual); - throw new AssertionError(buildMismatchMessage(actualOutputPath, expected, actual, mismatchIndex)); - } - - private String buildMismatchMessage(Path actualOutputPath, String expected, String actual, int mismatchIndex) { - StringBuilder message = new StringBuilder(); - message.append("Unexpected output for GAWK ").append(gawkCase.name()); - if (mismatchIndex >= 0) { - message.append(" at char ").append(mismatchIndex); - } - message - .append(" (expected length ") - .append(expected.length()) - .append(", actual length ") - .append(actual.length()) - .append(")."); - if (mismatchIndex >= 0) { - message - .append(" Expected snippet: ") - .append(snippetAround(expected, mismatchIndex)) - .append(". Actual snippet: ") - .append(snippetAround(actual, mismatchIndex)) - .append("."); - } - message - .append(" Expected file: ") - .append(gawkCase.expectedFileName()) - .append(". Actual output written to ") - .append(actualOutputPath); - return message.toString(); - } - - private static int firstMismatchIndex(String expected, String actual) { - int commonLength = Math.min(expected.length(), actual.length()); - for (int index = 0; index < commonLength; index++) { - if (expected.charAt(index) != actual.charAt(index)) { - return index; - } - } - if (expected.length() != actual.length()) { - return commonLength; - } - return -1; - } - - private static String snippetAround(String text, int index) { - if (text.isEmpty()) { - return "\"\""; - } - int start = Math.max(0, index - DIFF_CONTEXT_RADIUS); - int end = Math.min(text.length(), index + DIFF_CONTEXT_RADIUS); - String prefix = start > 0 ? "..." : ""; - String suffix = end < text.length() ? "..." : ""; - return "\"" - + prefix - + sanitizeSnippet(text.substring(start, end)) - + suffix - + "\""; - } - - private static String sanitizeSnippet(String text) { - return text - .replace("\\", "\\\\") - .replace("\r", "\\r") - .replace("\n", "\\n") - .replace("\t", "\\t"); - } - - private static String readUtf8(Path path) throws IOException { - return new String(Files.readAllBytes(path), StandardCharsets.UTF_8); - } - - private static String normalizeNewlines(String text) { - return text.replace("\r\n", "\n").replace("\r", "\n"); - } - private static final class SuiteState { private final Path stagedDirectory; private final Path actualOutputDirectory; diff --git a/src/it/java/io/jawk/GawkMaketestsParser.java b/src/it/java/io/jawk/GawkMaketestsParser.java index c2ad0589..af9c57a7 100644 --- a/src/it/java/io/jawk/GawkMaketestsParser.java +++ b/src/it/java/io/jawk/GawkMaketestsParser.java @@ -75,10 +75,9 @@ private static void addCase(List cases, String target, List bl if (target == null || DUMMY_TARGET.equals(target)) { return; } - String commandLine = findCommandLine(target, blockLines); String blockText = String.join("\n", blockLines); - boolean shellScript = commandLine.contains("$@.sh"); - List flags = parseFlags(commandLine); + boolean shellScript = blockText.contains("$@.sh"); + List flags = parseFlags(target, blockLines, shellScript); List runnableFlags = new ArrayList<>(); List unsupportedFlags = new ArrayList<>(); for (String flag : flags) { @@ -95,7 +94,7 @@ private static void addCase(List cases, String target, List bl } } String localeTag = parseLocaleTag(blockText); - boolean readsStandardInput = commandLine.contains("< \"$(srcdir)\"/$@.in"); + boolean readsStandardInput = blockText.contains("< \"$(srcdir)\"/$@.in"); boolean hasMpfrExpectedVariant = blockText.contains("$@-mpfr.ok"); cases .add( @@ -110,13 +109,19 @@ private static void addCase(List cases, String target, List bl localeTag)); } - private static String findCommandLine(String target, List blockLines) { + private static List parseFlags(String target, List blockLines, boolean shellScript) { + LinkedHashSet flags = new LinkedHashSet<>(); + boolean awkCommandFound = false; for (String line : blockLines) { - if (line.contains("$(AWK)") || line.contains("$@.sh")) { - return line; + if (line.contains(AWK_COMMAND_TOKEN)) { + awkCommandFound = true; + flags.addAll(parseFlags(line)); } } - throw new IllegalArgumentException("Unable to find AWK command line for Maketests target " + target); + if (!awkCommandFound && !shellScript) { + throw new IllegalArgumentException("Unable to find AWK command line for Maketests target " + target); + } + return Collections.unmodifiableList(new ArrayList<>(flags)); } private static List parseFlags(String commandLine) { diff --git a/src/it/java/io/jawk/GawkManualIT.java b/src/it/java/io/jawk/GawkManualIT.java index cfd280a3..4f4d812a 100644 --- a/src/it/java/io/jawk/GawkManualIT.java +++ b/src/it/java/io/jawk/GawkManualIT.java @@ -3,9 +3,9 @@ /*- * ╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲ * Jawk - * ᛫᛫᛫᛫᛫᛫ + * ჻჻჻჻჻჻ * Copyright (C) 2006 - 2026 MetricsHub - * ᛫᛫᛫᛫᛫᛫ + * ჻჻჻჻჻჻ * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation, either version 3 of the @@ -26,12 +26,9 @@ import java.io.IOException; import java.net.URL; -import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; -import java.nio.file.StandardCopyOption; -import java.util.stream.Stream; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; @@ -48,7 +45,6 @@ public class GawkManualIT { private static final String ACTUAL_OUTPUT_DIRECTORY = "gawk-manual-actual"; private static final String STAGED_DIRECTORY_PREFIX = "gawk-manual-"; private static final int MAX_CAPTURED_OUTPUT_BYTES = 1024 * 1024; - private static final int DIFF_CONTEXT_RADIUS = 80; private static final boolean LOG_PROGRESS = Boolean.getBoolean("jawk.gawk.progress"); private static SuiteState suiteState; @@ -63,7 +59,7 @@ public static void afterAll() throws Exception { if (suiteState == null) { return; } - deleteRecursively(suiteState.stagedDirectory); + AwkTestSupport.deleteRecursively(suiteState.stagedDirectory); suiteState = null; } @@ -78,21 +74,6 @@ public void argcasfile() throws Exception { }); } - @Test - public void beginfile1() throws Exception { - assertManualCase( - "beginfile1", - (builder, state) -> { - builder.argument("-f", state.stagedDirectory.resolve("beginfile1.awk").toString()); - builder - .operand( - state.stagedDirectory.resolve("beginfile1.awk").toString(), - state.stagedDirectory.toString(), - state.stagedDirectory.resolve("no").resolve("such").resolve("file").toString(), - state.stagedDirectory.resolve("Makefile").toString()); - }); - } - @Test public void eofsrc1() throws Exception { assertManualCase( @@ -239,9 +220,14 @@ private void assertManualCase(String caseName, ManualCaseConfigurer configurer) + " bytes. Enable -Djawk.gawk.progress=true to log case execution."); return; } - String actual = renderCliOutput(result.output(), result.exitCode()); - String expected = normalizeNewlines(readUtf8(state.stagedDirectory.resolve(caseName + ".ok"))); - assertOutputMatches(state, caseName, expected, actual); + String actual = AwkTestSupport.appendExitCode(result.output(), result.exitCode(), EXIT_CODE_PREFIX); + String expected = AwkTestSupport.readUtf8Normalized(state.stagedDirectory.resolve(caseName + ".ok")); + AwkTestSupport + .assertOutputMatches( + "GAWK " + caseName, + expected, + actual, + state.actualOutputDirectory.resolve(caseName + ".actual")); } private static synchronized SuiteState loadSuiteState() throws Exception { @@ -249,10 +235,16 @@ private static synchronized SuiteState loadSuiteState() throws Exception { return suiteState; } Path resourceDirectory = resolveResourceDirectory(); - Path stagedDirectory = stageResourceDirectory(resourceDirectory); - Path actualOutputDirectory = resolveActualOutputDirectory(); - suiteState = new SuiteState(stagedDirectory, actualOutputDirectory); - return suiteState; + Path stagedDirectory = null; + try { + stagedDirectory = AwkTestSupport.stageDirectory(resourceDirectory, STAGED_DIRECTORY_PREFIX); + Path actualOutputDirectory = resolveActualOutputDirectory(); + suiteState = new SuiteState(stagedDirectory, actualOutputDirectory); + return suiteState; + } catch (Exception ex) { + AwkTestSupport.deleteRecursively(stagedDirectory); + throw ex; + } } private static Path resolveResourceDirectory() throws Exception { @@ -267,177 +259,14 @@ private static Path resolveResourceDirectory() throws Exception { return resourceDirectory; } - private static Path stageResourceDirectory(Path sourceDirectory) throws IOException { - Path workingDirectory = Paths.get("").toAbsolutePath().normalize(); - Files.createDirectories(workingDirectory); - Path stagedDirectory = Files.createTempDirectory(workingDirectory, STAGED_DIRECTORY_PREFIX); - try (Stream paths = Files.walk(sourceDirectory)) { - paths.forEach(path -> copyToWorkingDirectory(sourceDirectory, stagedDirectory, path)); - } - createConfiguredMakefileAlias(stagedDirectory); - return stagedDirectory; - } - - private static void copyToWorkingDirectory(Path sourceDirectory, Path workingDirectory, Path sourcePath) { - try { - Path relativePath = sourceDirectory.relativize(sourcePath); - if (relativePath.toString().isEmpty()) { - return; - } - Path destination = workingDirectory.resolve(relativePath); - if (Files.isDirectory(sourcePath)) { - Files.createDirectories(destination); - } else { - Path parent = destination.getParent(); - if (parent != null) { - Files.createDirectories(parent); - } - Files.copy(sourcePath, destination, StandardCopyOption.REPLACE_EXISTING); - } - } catch (IOException ex) { - throw new IllegalStateException("Failed to stage gawk resource " + sourcePath, ex); - } - } - - private static void createConfiguredMakefileAlias(Path stagedDirectory) throws IOException { - Path makefile = stagedDirectory.resolve("Makefile"); - Path makefileIn = stagedDirectory.resolve("Makefile.in"); - if (Files.notExists(makefile) && Files.exists(makefileIn)) { - Files.copy(makefileIn, makefile); - } - } - - private static void deleteRecursively(Path directory) throws IOException { - if (directory == null || Files.notExists(directory)) { - return; - } - try (Stream paths = Files.walk(directory)) { - paths.sorted((left, right) -> right.compareTo(left)).forEach(path -> { - try { - Files.deleteIfExists(path); - } catch (IOException ex) { - throw new IllegalStateException("Failed to delete staged gawk resource " + path, ex); - } - }); - } catch (IllegalStateException ex) { - if (ex.getCause() instanceof IOException) { - throw (IOException) ex.getCause(); - } - throw ex; - } - } - - private void assertOutputMatches(SuiteState state, String caseName, String expected, String actual) - throws IOException { - if (expected.equals(actual)) { - return; - } - Path actualOutputPath = state.actualOutputDirectory.resolve(caseName + ".actual"); - Files.write(actualOutputPath, actual.getBytes(StandardCharsets.UTF_8)); - int mismatchIndex = firstMismatchIndex(expected, actual); - throw new AssertionError(buildMismatchMessage(caseName, actualOutputPath, expected, actual, mismatchIndex)); - } - - private String buildMismatchMessage( - String caseName, - Path actualOutputPath, - String expected, - String actual, - int mismatchIndex) { - StringBuilder message = new StringBuilder(); - message.append("Unexpected output for GAWK ").append(caseName); - if (mismatchIndex >= 0) { - message.append(" at char ").append(mismatchIndex); - } - message - .append(" (expected length ") - .append(expected.length()) - .append(", actual length ") - .append(actual.length()) - .append(")."); - if (mismatchIndex >= 0) { - message - .append(" Expected snippet: ") - .append(snippetAround(expected, mismatchIndex)) - .append(". Actual snippet: ") - .append(snippetAround(actual, mismatchIndex)) - .append("."); - } - message.append(" Actual output written to ").append(actualOutputPath); - return message.toString(); - } - - private static int firstMismatchIndex(String expected, String actual) { - int commonLength = Math.min(expected.length(), actual.length()); - for (int index = 0; index < commonLength; index++) { - if (expected.charAt(index) != actual.charAt(index)) { - return index; - } - } - if (expected.length() != actual.length()) { - return commonLength; - } - return -1; - } - - private static String snippetAround(String text, int index) { - if (text.isEmpty()) { - return "\"\""; - } - int start = Math.max(0, index - DIFF_CONTEXT_RADIUS); - int end = Math.min(text.length(), index + DIFF_CONTEXT_RADIUS); - String prefix = start > 0 ? "..." : ""; - String suffix = end < text.length() ? "..." : ""; - return "\"" - + prefix - + sanitizeSnippet(text.substring(start, end)) - + suffix - + "\""; - } - - private static String sanitizeSnippet(String text) { - return text - .replace("\\", "\\\\") - .replace("\r", "\\r") - .replace("\n", "\\n") - .replace("\t", "\\t"); - } - - private static String renderCliOutput(String output, int exitCode) { - String normalized = normalizeNewlines(output); - if (exitCode == 0) { - return normalized; - } - return normalized + EXIT_CODE_PREFIX + exitCode + "\n"; - } - private static Path resolveActualOutputDirectory() throws IOException { - Path actualOutputDirectory = resolveBuildDirectory().resolve("failsafe-reports").resolve(ACTUAL_OUTPUT_DIRECTORY); + Path actualOutputDirectory = AwkTestSupport + .buildDirectory(GawkManualIT.class) + .resolve("failsafe-reports") + .resolve(ACTUAL_OUTPUT_DIRECTORY); return Files.createDirectories(actualOutputDirectory); } - private static Path resolveBuildDirectory() throws IOException { - try { - Path classesDirectory = Paths - .get(GawkManualIT.class.getProtectionDomain().getCodeSource().getLocation().toURI()); - Path buildDirectory = classesDirectory.getParent(); - if (buildDirectory == null) { - throw new IOException("Couldn't determine build directory from " + classesDirectory); - } - return buildDirectory; - } catch (Exception ex) { - throw new IOException("Couldn't resolve Jawk build directory", ex); - } - } - - private static String readUtf8(Path path) throws IOException { - return new String(Files.readAllBytes(path), StandardCharsets.UTF_8); - } - - private static String normalizeNewlines(String text) { - return text.replace("\r\n", "\n").replace("\r", "\n"); - } - private interface ManualCaseConfigurer { void configure(AwkTestSupport.CliTestBuilder builder, SuiteState state) throws Exception; } diff --git a/src/test/java/io/jawk/AwkTestSupport.java b/src/test/java/io/jawk/AwkTestSupport.java index c595297e..8d64619e 100644 --- a/src/test/java/io/jawk/AwkTestSupport.java +++ b/src/test/java/io/jawk/AwkTestSupport.java @@ -39,6 +39,7 @@ import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Path; +import java.nio.file.Paths; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; @@ -69,6 +70,7 @@ public final class AwkTestSupport { .getProperty("os.name", "") .toLowerCase(Locale.ROOT) .contains("win"); + private static final int DIFF_CONTEXT_RADIUS = 80; private static final Path SHARED_TEMP_DIR; @@ -118,6 +120,85 @@ public static Path sharedTempDirectory() { return SHARED_TEMP_DIR; } + static Path buildDirectory(Class anchor) throws IOException { + try { + Path classesDirectory = Paths.get(anchor.getProtectionDomain().getCodeSource().getLocation().toURI()); + Path buildDirectory = classesDirectory.getParent(); + if (buildDirectory == null) { + throw new IOException("Couldn't determine build directory from " + classesDirectory); + } + return buildDirectory; + } catch (IOException ex) { + throw ex; + } catch (Exception ex) { + throw new IOException("Couldn't resolve Jawk build directory", ex); + } + } + + static Path stageDirectory(Path sourceDirectory, String prefix) throws IOException { + Path workingDirectory = Paths.get("").toAbsolutePath().normalize(); + Files.createDirectories(workingDirectory); + Path stagedDirectory = Files.createTempDirectory(workingDirectory, prefix); + try { + copyDirectoryRecursively(sourceDirectory, stagedDirectory); + return stagedDirectory; + } catch (IOException | RuntimeException ex) { + deleteRecursively(stagedDirectory); + throw ex; + } + } + + static void copyDirectoryRecursively(Path sourceDirectory, Path destinationDirectory) throws IOException { + try (Stream paths = Files.walk(sourceDirectory)) { + paths.forEach(path -> copyToDirectory(sourceDirectory, destinationDirectory, path)); + } + } + + static String readUtf8(Path path) throws IOException { + return new String(Files.readAllBytes(path), StandardCharsets.UTF_8); + } + + static String readUtf8Normalized(Path path) throws IOException { + return normalizeNewlines(readUtf8(path)); + } + + static String normalizeNewlines(String text) { + return text.replace("\r\n", "\n").replace("\r", "\n"); + } + + static String appendExitCode(String output, int exitCode, String exitCodePrefix) { + String normalized = normalizeNewlines(output); + if (exitCode == 0) { + return normalized; + } + return normalized + exitCodePrefix + exitCode + "\n"; + } + + static void assertOutputMatches(String description, String expected, String actual, Path actualOutputPath) + throws IOException { + assertOutputMatches(description, expected, actual, actualOutputPath, null); + } + + static void assertOutputMatches( + String description, + String expected, + String actual, + Path actualOutputPath, + String expectedReference) + throws IOException { + if (expected.equals(actual)) { + return; + } + Path parent = actualOutputPath.getParent(); + if (parent != null) { + Files.createDirectories(parent); + } + Files.write(actualOutputPath, actual.getBytes(StandardCharsets.UTF_8)); + int mismatchIndex = firstMismatchIndex(expected, actual); + throw new AssertionError( + buildMismatchMessage(description, expected, actual, actualOutputPath, mismatchIndex, expectedReference)); + } + static final class OutputLimitExceededException extends RuntimeException { private static final long serialVersionUID = 1L; @@ -1292,7 +1373,7 @@ private static final class TestLayout { } } - private static void deleteRecursively(Path root) throws IOException { + static void deleteRecursively(Path root) throws IOException { if (root == null || !Files.exists(root)) { return; } @@ -1318,6 +1399,96 @@ private static OutputLimitExceededException findOutputLimitExceeded(Throwable th return null; } + private static void copyToDirectory(Path sourceDirectory, Path destinationDirectory, Path sourcePath) { + try { + Path relativePath = sourceDirectory.relativize(sourcePath); + if (relativePath.toString().isEmpty()) { + return; + } + Path destination = destinationDirectory.resolve(relativePath); + if (Files.isDirectory(sourcePath)) { + Files.createDirectories(destination); + } else { + Path parent = destination.getParent(); + if (parent != null) { + Files.createDirectories(parent); + } + Files.copy(sourcePath, destination); + } + } catch (IOException ex) { + throw new IllegalStateException("Failed to stage test resource " + sourcePath, ex); + } + } + + private static String buildMismatchMessage( + String description, + String expected, + String actual, + Path actualOutputPath, + int mismatchIndex, + String expectedReference) { + StringBuilder message = new StringBuilder(); + message.append("Unexpected output for ").append(description); + if (mismatchIndex >= 0) { + message.append(" at char ").append(mismatchIndex); + } + message + .append(" (expected length ") + .append(expected.length()) + .append(", actual length ") + .append(actual.length()) + .append(")."); + if (mismatchIndex >= 0) { + message + .append(" Expected snippet: ") + .append(snippetAround(expected, mismatchIndex)) + .append(". Actual snippet: ") + .append(snippetAround(actual, mismatchIndex)) + .append("."); + } + if (expectedReference != null && !expectedReference.isEmpty()) { + message.append(" ").append(expectedReference).append("."); + } + message.append(" Actual output written to ").append(actualOutputPath); + return message.toString(); + } + + private static int firstMismatchIndex(String expected, String actual) { + int commonLength = Math.min(expected.length(), actual.length()); + for (int index = 0; index < commonLength; index++) { + if (expected.charAt(index) != actual.charAt(index)) { + return index; + } + } + if (expected.length() != actual.length()) { + return commonLength; + } + return -1; + } + + private static String snippetAround(String text, int index) { + if (text.isEmpty()) { + return "\"\""; + } + int start = Math.max(0, index - DIFF_CONTEXT_RADIUS); + int end = Math.min(text.length(), index + DIFF_CONTEXT_RADIUS); + String prefix = start > 0 ? "..." : ""; + String suffix = end < text.length() ? "..." : ""; + return "\"" + + prefix + + sanitizeSnippet(text.substring(start, end)) + + suffix + + "\""; + } + + private static String sanitizeSnippet(String text) { + return text + .replace("\\", "\\\\") + .replace("\r", "\\r") + .replace("\n", "\\n") + .replace("\t", "\\t"); + } + private static String escapeForAwkString(String value) { StringBuilder builder = new StringBuilder(value.length() * 2); for (int i = 0; i < value.length(); i++) { diff --git a/src/test/java/io/jawk/AwkTestSupportTest.java b/src/test/java/io/jawk/AwkTestSupportTest.java new file mode 100644 index 00000000..9fd56837 --- /dev/null +++ b/src/test/java/io/jawk/AwkTestSupportTest.java @@ -0,0 +1,116 @@ +package io.jawk; + +/*- + * ╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲ + * Jawk + * ჻჻჻჻჻჻ + * Copyright (C) 2006 - 2026 MetricsHub + * ჻჻჻჻჻჻ + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * . + * ╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱ + */ + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; + +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Path; +import org.junit.Test; + +/** + * Unit tests for generic helpers in {@link AwkTestSupport}. + */ +public class AwkTestSupportTest { + + /** + * Verifies that newline normalization collapses both CRLF and lone CR + * sequences to LF. + */ + @Test + public void normalizeNewlines() { + assertEquals("a\nb\nc\n", AwkTestSupport.normalizeNewlines("a\r\nb\rc\r\n")); + } + + /** + * Verifies that CLI-style exit-code rendering only appends the synthetic + * footer when execution fails. + */ + @Test + public void appendExitCode() { + assertEquals("ok\n", AwkTestSupport.appendExitCode("ok\r\n", 0, "EXIT CODE: ")); + assertEquals("fail\nEXIT CODE: 2\n", AwkTestSupport.appendExitCode("fail\r\n", 2, "EXIT CODE: ")); + } + + /** + * Verifies that mismatch assertions write the actual output artifact and + * report a useful failure message. + * + * @throws Exception when preparing or cleaning the temporary artifact path + * fails + */ + @Test + public void assertOutputMatchesWritesActualArtifact() throws Exception { + Path tempDirectory = Files.createTempDirectory("jawk-support-assert"); + Path actualOutputPath = tempDirectory.resolve("case.actual"); + try { + try { + AwkTestSupport + .assertOutputMatches( + "fixture", + "abc\n", + "adc\n", + actualOutputPath, + "Expected file: fixture.ok"); + fail("Expected an AssertionError"); + } catch (AssertionError ex) { + assertTrue(ex.getMessage().contains("Unexpected output for fixture at char 1")); + assertTrue(ex.getMessage().contains("Expected file: fixture.ok")); + assertEquals("adc\n", new String(Files.readAllBytes(actualOutputPath), StandardCharsets.UTF_8)); + } + } finally { + AwkTestSupport.deleteRecursively(tempDirectory); + } + } + + /** + * Verifies that resource staging copies nested fixture trees into a fresh + * temporary directory. + * + * @throws Exception when preparing or cleaning the temporary directories + * fails + */ + @Test + public void stageDirectoryCopiesNestedFixtures() throws Exception { + Path sourceDirectory = Files.createTempDirectory("jawk-support-source"); + Path nestedFile = sourceDirectory.resolve("nested").resolve("fixture.txt"); + Files.createDirectories(nestedFile.getParent()); + Files.write(nestedFile, "hello".getBytes(StandardCharsets.UTF_8)); + + Path stagedDirectory = null; + try { + stagedDirectory = AwkTestSupport.stageDirectory(sourceDirectory, "jawk-support-stage-"); + assertEquals( + "hello", + new String( + Files.readAllBytes(stagedDirectory.resolve("nested").resolve("fixture.txt")), + StandardCharsets.UTF_8)); + } finally { + AwkTestSupport.deleteRecursively(stagedDirectory); + AwkTestSupport.deleteRecursively(sourceDirectory); + } + } +} diff --git a/src/test/java/io/jawk/GawkMaketestsParserTest.java b/src/test/java/io/jawk/GawkMaketestsParserTest.java index c9828fa8..4c988ffa 100644 --- a/src/test/java/io/jawk/GawkMaketestsParserTest.java +++ b/src/test/java/io/jawk/GawkMaketestsParserTest.java @@ -137,6 +137,24 @@ public void parseShellRuleAsUnsupported() throws Exception { assertTrue(gawkCase.unsupportedFlags().isEmpty()); } + /** + * Verifies that shell-script rules remain classified as shell-driven even when + * another recipe line mentions {@code $(AWK)} for logging or environment setup. + * + * @throws Exception when parsing the sample metadata fails + */ + @Test + public void parseShellRuleWhenAnotherLineMentionsAwk() throws Exception { + GawkMaketestsParser.GawkCase gawkCase = parseSingleCase( + "shellmeta:\n" + + "\t@echo using $(AWK)\n" + + "\t@-$(LOCALES) AWK=\"$(AWKPROG)\" \"$(srcdir)\"/$@.sh > _$@ 2>&1 || echo EXIT CODE: $$? >>_$@\n" + + "\t@-$(CMP) \"$(srcdir)\"/$@.ok _$@ && rm -f _$@\n"); + + assertEquals("sh", gawkCase.scriptMode()); + assertTrue(gawkCase.requiresExplicitSkip()); + } + /** * Verifies that unsupported gawk-only CLI flags are surfaced for explicit * skip coverage. @@ -236,6 +254,27 @@ public void parseShortFlagsAsUnsupported() throws Exception { assertTrue(gawkCase.requiresExplicitSkip()); } + /** + * Verifies that flags are collected from every AWK invocation line in the + * recipe block instead of depending on a single matching line. + * + * @throws Exception when parsing the sample metadata fails + */ + @Test + public void parseFlagsAcrossMultipleAwkCommandLines() throws Exception { + GawkMaketestsParser.GawkCase gawkCase = parseSingleCase( + "multiawk:\n" + + "\t@echo $@\n" + + "\t@-if test -n \"$$GAWK_TEST_ARGS\"; then AWKPATH=\"$(srcdir)\" $(AWK) --posix -f $@.awk >_$@ 2>&1; fi\n" + + "\t@-AWKPATH=\"$(srcdir)\" $(AWK) --sandbox -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@\n" + + "\t@-$(CMP) \"$(srcdir)\"/$@.ok _$@ && rm -f _$@\n"); + + assertTrue(gawkCase.flags().contains("--posix")); + assertTrue(gawkCase.flags().contains("--sandbox")); + assertEquals(2, gawkCase.runnableFlags().size()); + assertFalse(gawkCase.requiresExplicitSkip()); + } + private static GawkMaketestsParser.GawkCase parseSingleCase(String maketestsSnippet) throws Exception { List cases = GawkMaketestsParser.parse(new StringReader(maketestsSnippet)); assertEquals(1, cases.size()); From 37935ae71655634f815a613deb887ea4ffcbc898 Mon Sep 17 00:00:00 2001 From: Bertrand Martin Date: Wed, 22 Apr 2026 20:29:59 +0200 Subject: [PATCH 09/15] Delegate compatibility diffs to JUnit --- src/test/java/io/jawk/AwkTestSupport.java | 90 +++---------------- src/test/java/io/jawk/AwkTestSupportTest.java | 3 +- 2 files changed, 13 insertions(+), 80 deletions(-) diff --git a/src/test/java/io/jawk/AwkTestSupport.java b/src/test/java/io/jawk/AwkTestSupport.java index 8d64619e..82338cad 100644 --- a/src/test/java/io/jawk/AwkTestSupport.java +++ b/src/test/java/io/jawk/AwkTestSupport.java @@ -70,7 +70,6 @@ public final class AwkTestSupport { .getProperty("os.name", "") .toLowerCase(Locale.ROOT) .contains("win"); - private static final int DIFF_CONTEXT_RADIUS = 80; private static final Path SHARED_TEMP_DIR; @@ -186,17 +185,19 @@ static void assertOutputMatches( Path actualOutputPath, String expectedReference) throws IOException { - if (expected.equals(actual)) { - return; + if (!expected.equals(actual)) { + Path parent = actualOutputPath.getParent(); + if (parent != null) { + Files.createDirectories(parent); + } + Files.write(actualOutputPath, actual.getBytes(StandardCharsets.UTF_8)); } - Path parent = actualOutputPath.getParent(); - if (parent != null) { - Files.createDirectories(parent); + StringBuilder message = new StringBuilder("Unexpected output for ").append(description); + if (expectedReference != null && !expectedReference.isEmpty()) { + message.append(". ").append(expectedReference); } - Files.write(actualOutputPath, actual.getBytes(StandardCharsets.UTF_8)); - int mismatchIndex = firstMismatchIndex(expected, actual); - throw new AssertionError( - buildMismatchMessage(description, expected, actual, actualOutputPath, mismatchIndex, expectedReference)); + message.append(". Actual output written to ").append(actualOutputPath); + assertEquals(message.toString(), expected, actual); } static final class OutputLimitExceededException extends RuntimeException { @@ -1420,75 +1421,6 @@ private static void copyToDirectory(Path sourceDirectory, Path destinationDirect } } - private static String buildMismatchMessage( - String description, - String expected, - String actual, - Path actualOutputPath, - int mismatchIndex, - String expectedReference) { - StringBuilder message = new StringBuilder(); - message.append("Unexpected output for ").append(description); - if (mismatchIndex >= 0) { - message.append(" at char ").append(mismatchIndex); - } - message - .append(" (expected length ") - .append(expected.length()) - .append(", actual length ") - .append(actual.length()) - .append(")."); - if (mismatchIndex >= 0) { - message - .append(" Expected snippet: ") - .append(snippetAround(expected, mismatchIndex)) - .append(". Actual snippet: ") - .append(snippetAround(actual, mismatchIndex)) - .append("."); - } - if (expectedReference != null && !expectedReference.isEmpty()) { - message.append(" ").append(expectedReference).append("."); - } - message.append(" Actual output written to ").append(actualOutputPath); - return message.toString(); - } - - private static int firstMismatchIndex(String expected, String actual) { - int commonLength = Math.min(expected.length(), actual.length()); - for (int index = 0; index < commonLength; index++) { - if (expected.charAt(index) != actual.charAt(index)) { - return index; - } - } - if (expected.length() != actual.length()) { - return commonLength; - } - return -1; - } - - private static String snippetAround(String text, int index) { - if (text.isEmpty()) { - return "\"\""; - } - int start = Math.max(0, index - DIFF_CONTEXT_RADIUS); - int end = Math.min(text.length(), index + DIFF_CONTEXT_RADIUS); - String prefix = start > 0 ? "..." : ""; - String suffix = end < text.length() ? "..." : ""; - return "\"" - + prefix - + sanitizeSnippet(text.substring(start, end)) - + suffix - + "\""; - } - - private static String sanitizeSnippet(String text) { - return text - .replace("\\", "\\\\") - .replace("\r", "\\r") - .replace("\n", "\\n") - .replace("\t", "\\t"); - } - private static String escapeForAwkString(String value) { StringBuilder builder = new StringBuilder(value.length() * 2); for (int i = 0; i < value.length(); i++) { diff --git a/src/test/java/io/jawk/AwkTestSupportTest.java b/src/test/java/io/jawk/AwkTestSupportTest.java index 9fd56837..1ba75d91 100644 --- a/src/test/java/io/jawk/AwkTestSupportTest.java +++ b/src/test/java/io/jawk/AwkTestSupportTest.java @@ -77,8 +77,9 @@ public void assertOutputMatchesWritesActualArtifact() throws Exception { "Expected file: fixture.ok"); fail("Expected an AssertionError"); } catch (AssertionError ex) { - assertTrue(ex.getMessage().contains("Unexpected output for fixture at char 1")); + assertTrue(ex.getMessage().contains("Unexpected output for fixture")); assertTrue(ex.getMessage().contains("Expected file: fixture.ok")); + assertTrue(ex.getMessage().contains(actualOutputPath.toString())); assertEquals("adc\n", new String(Files.readAllBytes(actualOutputPath), StandardCharsets.UTF_8)); } } finally { From d6d7d4a7c5ee052c4a3f51b961de28eb67d88740 Mon Sep 17 00:00:00 2001 From: Bertrand Martin Date: Wed, 22 Apr 2026 21:07:52 +0200 Subject: [PATCH 10/15] Use AwkTestSupport expectations for gawk suites --- src/it/java/io/jawk/GawkCompatibilityIT.java | 34 ++------ src/it/java/io/jawk/GawkManualIT.java | 34 +++----- src/test/java/io/jawk/AwkTestSupport.java | 80 +++++++------------ src/test/java/io/jawk/AwkTestSupportTest.java | 54 ++++++------- 4 files changed, 73 insertions(+), 129 deletions(-) diff --git a/src/it/java/io/jawk/GawkCompatibilityIT.java b/src/it/java/io/jawk/GawkCompatibilityIT.java index 2394be06..9dff9c36 100644 --- a/src/it/java/io/jawk/GawkCompatibilityIT.java +++ b/src/it/java/io/jawk/GawkCompatibilityIT.java @@ -60,7 +60,6 @@ public class GawkCompatibilityIT { private static final String MAKETESTS_FILE = "Maketests"; private static final String SKIP_MANIFEST_FILE = "skips.properties"; private static final String EXIT_CODE_PREFIX = "EXIT CODE: "; - private static final String ACTUAL_OUTPUT_DIRECTORY = "gawk-actual"; private static final String STAGED_DIRECTORY_PREFIX = "gawk-staged-"; private static final int MAX_CAPTURED_OUTPUT_BYTES = 1024 * 1024; private static final boolean LOG_PROGRESS = Boolean.getBoolean("jawk.gawk.progress"); @@ -139,10 +138,15 @@ public void test() throws Exception { if (gawkCase.stdinFileName() != null) { builder.stdin(Files.readAllBytes(state.stagedDirectory.resolve(gawkCase.stdinFileName()))); } + AwkTestSupport.ExpectedCliTranscript expected = AwkTestSupport + .readExpectedCliTranscript(state.stagedDirectory.resolve(gawkCase.expectedFileName()), EXIT_CODE_PREFIX); + builder.postProcessWith(AwkTestSupport::normalizeNewlines).expect(expected.output()); + if (expected.exitCode() != null) { + builder.expectExit(expected.exitCode().intValue()); + } - AwkTestSupport.TestResult result; try { - result = builder.build().run(); + builder.build().runAndAssert(); } catch (AwkTestSupport.OutputLimitExceededException ex) { fail( "Captured output for GAWK " @@ -150,17 +154,7 @@ public void test() throws Exception { + " exceeded " + ex.maxBytes() + " bytes. Enable -Djawk.gawk.progress=true to log case execution."); - return; } - String actual = AwkTestSupport.appendExitCode(result.output(), result.exitCode(), EXIT_CODE_PREFIX); - String expected = AwkTestSupport.readUtf8Normalized(state.stagedDirectory.resolve(gawkCase.expectedFileName())); - AwkTestSupport - .assertOutputMatches( - "GAWK " + gawkCase.name(), - expected, - actual, - state.actualOutputDirectory.resolve(gawkCase.name() + ".actual"), - "Expected file: " + gawkCase.expectedFileName()); } private static synchronized SuiteState loadSuiteState() throws Exception { @@ -174,8 +168,7 @@ private static synchronized SuiteState loadSuiteState() throws Exception { Path stagedDirectory = null; try { stagedDirectory = AwkTestSupport.stageDirectory(resourceDirectory, STAGED_DIRECTORY_PREFIX); - Path actualOutputDirectory = resolveActualOutputDirectory(); - suiteState = new SuiteState(stagedDirectory, actualOutputDirectory, parsedCases, skipReasons); + suiteState = new SuiteState(stagedDirectory, parsedCases, skipReasons); return suiteState; } catch (Exception ex) { AwkTestSupport.deleteRecursively(stagedDirectory); @@ -242,27 +235,16 @@ private static void validateCoverage( } } - private static Path resolveActualOutputDirectory() throws IOException { - Path actualOutputDirectory = AwkTestSupport - .buildDirectory(GawkCompatibilityIT.class) - .resolve("failsafe-reports") - .resolve(ACTUAL_OUTPUT_DIRECTORY); - return Files.createDirectories(actualOutputDirectory); - } - private static final class SuiteState { private final Path stagedDirectory; - private final Path actualOutputDirectory; private final List cases; private final Map skipReasons; SuiteState( Path stagedDirectory, - Path actualOutputDirectory, List cases, Map skipReasons) { this.stagedDirectory = stagedDirectory; - this.actualOutputDirectory = actualOutputDirectory; this.cases = Collections.unmodifiableList(new ArrayList<>(cases)); this.skipReasons = skipReasons; } diff --git a/src/it/java/io/jawk/GawkManualIT.java b/src/it/java/io/jawk/GawkManualIT.java index 4f4d812a..ff5a34b6 100644 --- a/src/it/java/io/jawk/GawkManualIT.java +++ b/src/it/java/io/jawk/GawkManualIT.java @@ -42,7 +42,6 @@ public class GawkManualIT { private static final String GAWK_RESOURCE_PATH = "/gawk"; private static final String EXIT_CODE_PREFIX = "EXIT CODE: "; - private static final String ACTUAL_OUTPUT_DIRECTORY = "gawk-manual-actual"; private static final String STAGED_DIRECTORY_PREFIX = "gawk-manual-"; private static final int MAX_CAPTURED_OUTPUT_BYTES = 1024 * 1024; private static final boolean LOG_PROGRESS = Boolean.getBoolean("jawk.gawk.progress"); @@ -208,9 +207,14 @@ private void assertManualCase(String caseName, ManualCaseConfigurer configurer) .mergeStdoutAndStderr() .maxOutputBytes(MAX_CAPTURED_OUTPUT_BYTES); configurer.configure(builder, state); - AwkTestSupport.TestResult result; + AwkTestSupport.ExpectedCliTranscript expected = AwkTestSupport + .readExpectedCliTranscript(state.stagedDirectory.resolve(caseName + ".ok"), EXIT_CODE_PREFIX); + builder.postProcessWith(AwkTestSupport::normalizeNewlines).expect(expected.output()); + if (expected.exitCode() != null) { + builder.expectExit(expected.exitCode().intValue()); + } try { - result = builder.build().run(); + builder.build().runAndAssert(); } catch (AwkTestSupport.OutputLimitExceededException ex) { fail( "Captured output for GAWK " @@ -218,16 +222,7 @@ private void assertManualCase(String caseName, ManualCaseConfigurer configurer) + " exceeded " + ex.maxBytes() + " bytes. Enable -Djawk.gawk.progress=true to log case execution."); - return; } - String actual = AwkTestSupport.appendExitCode(result.output(), result.exitCode(), EXIT_CODE_PREFIX); - String expected = AwkTestSupport.readUtf8Normalized(state.stagedDirectory.resolve(caseName + ".ok")); - AwkTestSupport - .assertOutputMatches( - "GAWK " + caseName, - expected, - actual, - state.actualOutputDirectory.resolve(caseName + ".actual")); } private static synchronized SuiteState loadSuiteState() throws Exception { @@ -238,8 +233,7 @@ private static synchronized SuiteState loadSuiteState() throws Exception { Path stagedDirectory = null; try { stagedDirectory = AwkTestSupport.stageDirectory(resourceDirectory, STAGED_DIRECTORY_PREFIX); - Path actualOutputDirectory = resolveActualOutputDirectory(); - suiteState = new SuiteState(stagedDirectory, actualOutputDirectory); + suiteState = new SuiteState(stagedDirectory); return suiteState; } catch (Exception ex) { AwkTestSupport.deleteRecursively(stagedDirectory); @@ -259,25 +253,15 @@ private static Path resolveResourceDirectory() throws Exception { return resourceDirectory; } - private static Path resolveActualOutputDirectory() throws IOException { - Path actualOutputDirectory = AwkTestSupport - .buildDirectory(GawkManualIT.class) - .resolve("failsafe-reports") - .resolve(ACTUAL_OUTPUT_DIRECTORY); - return Files.createDirectories(actualOutputDirectory); - } - private interface ManualCaseConfigurer { void configure(AwkTestSupport.CliTestBuilder builder, SuiteState state) throws Exception; } private static final class SuiteState { private final Path stagedDirectory; - private final Path actualOutputDirectory; - SuiteState(Path stagedDirectory, Path actualOutputDirectory) { + SuiteState(Path stagedDirectory) { this.stagedDirectory = stagedDirectory; - this.actualOutputDirectory = actualOutputDirectory; } } } diff --git a/src/test/java/io/jawk/AwkTestSupport.java b/src/test/java/io/jawk/AwkTestSupport.java index 82338cad..6db03944 100644 --- a/src/test/java/io/jawk/AwkTestSupport.java +++ b/src/test/java/io/jawk/AwkTestSupport.java @@ -39,7 +39,6 @@ import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Path; -import java.nio.file.Paths; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; @@ -119,25 +118,8 @@ public static Path sharedTempDirectory() { return SHARED_TEMP_DIR; } - static Path buildDirectory(Class anchor) throws IOException { - try { - Path classesDirectory = Paths.get(anchor.getProtectionDomain().getCodeSource().getLocation().toURI()); - Path buildDirectory = classesDirectory.getParent(); - if (buildDirectory == null) { - throw new IOException("Couldn't determine build directory from " + classesDirectory); - } - return buildDirectory; - } catch (IOException ex) { - throw ex; - } catch (Exception ex) { - throw new IOException("Couldn't resolve Jawk build directory", ex); - } - } - static Path stageDirectory(Path sourceDirectory, String prefix) throws IOException { - Path workingDirectory = Paths.get("").toAbsolutePath().normalize(); - Files.createDirectories(workingDirectory); - Path stagedDirectory = Files.createTempDirectory(workingDirectory, prefix); + Path stagedDirectory = Files.createTempDirectory(prefix); try { copyDirectoryRecursively(sourceDirectory, stagedDirectory); return stagedDirectory; @@ -165,39 +147,21 @@ static String normalizeNewlines(String text) { return text.replace("\r\n", "\n").replace("\r", "\n"); } - static String appendExitCode(String output, int exitCode, String exitCodePrefix) { - String normalized = normalizeNewlines(output); - if (exitCode == 0) { - return normalized; + static ExpectedCliTranscript readExpectedCliTranscript(Path path, String exitCodePrefix) throws IOException { + String transcript = readUtf8Normalized(path); + int trailerLineStart = transcript.length(); + while (trailerLineStart > 0 && transcript.charAt(trailerLineStart - 1) == '\n') { + trailerLineStart--; } - return normalized + exitCodePrefix + exitCode + "\n"; - } - - static void assertOutputMatches(String description, String expected, String actual, Path actualOutputPath) - throws IOException { - assertOutputMatches(description, expected, actual, actualOutputPath, null); - } - - static void assertOutputMatches( - String description, - String expected, - String actual, - Path actualOutputPath, - String expectedReference) - throws IOException { - if (!expected.equals(actual)) { - Path parent = actualOutputPath.getParent(); - if (parent != null) { - Files.createDirectories(parent); - } - Files.write(actualOutputPath, actual.getBytes(StandardCharsets.UTF_8)); + while (trailerLineStart > 0 && transcript.charAt(trailerLineStart - 1) != '\n') { + trailerLineStart--; } - StringBuilder message = new StringBuilder("Unexpected output for ").append(description); - if (expectedReference != null && !expectedReference.isEmpty()) { - message.append(". ").append(expectedReference); + String lastLine = transcript.substring(trailerLineStart).trim(); + if (!lastLine.startsWith(exitCodePrefix)) { + return new ExpectedCliTranscript(transcript, null); } - message.append(". Actual output written to ").append(actualOutputPath); - assertEquals(message.toString(), expected, actual); + Integer exitCode = Integer.valueOf(lastLine.substring(exitCodePrefix.length()).trim()); + return new ExpectedCliTranscript(transcript.substring(0, trailerLineStart), exitCode); } static final class OutputLimitExceededException extends RuntimeException { @@ -215,6 +179,24 @@ int maxBytes() { } } + static final class ExpectedCliTranscript { + private final String output; + private final Integer exitCode; + + ExpectedCliTranscript(String output, Integer exitCode) { + this.output = output; + this.exitCode = exitCode; + } + + String output() { + return output; + } + + Integer exitCode() { + return exitCode; + } + } + /** * Represents a fully configured test case produced by one of the builders. * Implementations know how to prepare the execution environment, run the diff --git a/src/test/java/io/jawk/AwkTestSupportTest.java b/src/test/java/io/jawk/AwkTestSupportTest.java index 1ba75d91..746b213d 100644 --- a/src/test/java/io/jawk/AwkTestSupportTest.java +++ b/src/test/java/io/jawk/AwkTestSupportTest.java @@ -23,8 +23,7 @@ */ import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; +import static org.junit.Assert.assertNull; import java.nio.charset.StandardCharsets; import java.nio.file.Files; @@ -46,44 +45,41 @@ public void normalizeNewlines() { } /** - * Verifies that CLI-style exit-code rendering only appends the synthetic - * footer when execution fails. + * Verifies that CLI transcript parsing splits the synthetic exit-code trailer + * from the expected output content. */ @Test - public void appendExitCode() { - assertEquals("ok\n", AwkTestSupport.appendExitCode("ok\r\n", 0, "EXIT CODE: ")); - assertEquals("fail\nEXIT CODE: 2\n", AwkTestSupport.appendExitCode("fail\r\n", 2, "EXIT CODE: ")); + public void readExpectedCliTranscriptWithExitCode() throws Exception { + Path transcript = Files.createTempFile("jawk-support-transcript", ".ok"); + try { + Files.write(transcript, "fail\r\nEXIT CODE: 2\r\n".getBytes(StandardCharsets.UTF_8)); + AwkTestSupport.ExpectedCliTranscript expected = AwkTestSupport + .readExpectedCliTranscript(transcript, "EXIT CODE: "); + assertEquals("fail\n", expected.output()); + assertEquals(Integer.valueOf(2), expected.exitCode()); + } finally { + AwkTestSupport.deleteRecursively(transcript); + } } /** - * Verifies that mismatch assertions write the actual output artifact and - * report a useful failure message. + * Verifies that CLI transcript parsing leaves the exit code unset when the + * expected file contains only output. * - * @throws Exception when preparing or cleaning the temporary artifact path + * @throws Exception when preparing or cleaning the temporary transcript path * fails */ @Test - public void assertOutputMatchesWritesActualArtifact() throws Exception { - Path tempDirectory = Files.createTempDirectory("jawk-support-assert"); - Path actualOutputPath = tempDirectory.resolve("case.actual"); + public void readExpectedCliTranscriptWithoutExitCode() throws Exception { + Path transcript = Files.createTempFile("jawk-support-transcript", ".ok"); try { - try { - AwkTestSupport - .assertOutputMatches( - "fixture", - "abc\n", - "adc\n", - actualOutputPath, - "Expected file: fixture.ok"); - fail("Expected an AssertionError"); - } catch (AssertionError ex) { - assertTrue(ex.getMessage().contains("Unexpected output for fixture")); - assertTrue(ex.getMessage().contains("Expected file: fixture.ok")); - assertTrue(ex.getMessage().contains(actualOutputPath.toString())); - assertEquals("adc\n", new String(Files.readAllBytes(actualOutputPath), StandardCharsets.UTF_8)); - } + Files.write(transcript, "ok\r\n".getBytes(StandardCharsets.UTF_8)); + AwkTestSupport.ExpectedCliTranscript expected = AwkTestSupport + .readExpectedCliTranscript(transcript, "EXIT CODE: "); + assertEquals("ok\n", expected.output()); + assertNull(expected.exitCode()); } finally { - AwkTestSupport.deleteRecursively(tempDirectory); + AwkTestSupport.deleteRecursively(transcript); } } From 90680c013b9fc5ffb63422081e541dd736414e2e Mon Sep 17 00:00:00 2001 From: Bertrand Martin Date: Thu, 23 Apr 2026 17:56:22 +0200 Subject: [PATCH 11/15] Align compatibility suites on filesystem resources --- pom.xml | 14 - src/it/java/io/jawk/BwkMiscIT.java | 33 +- src/it/java/io/jawk/BwkPIT.java | 12 +- src/it/java/io/jawk/BwkTIT.java | 15 +- .../io/jawk/CompatibilityTestResources.java | 64 + src/it/java/io/jawk/GawkCompatibilityIT.java | 252 - src/it/java/io/jawk/GawkIT.java | 4515 +++++++++++++++++ src/it/java/io/jawk/GawkMaketestsParser.java | 308 -- src/it/java/io/jawk/GawkManualIT.java | 881 +++- src/it/resources/gawk/skips.properties | 71 - src/site/markdown/compatibility.md | 9 +- src/test/java/io/jawk/AwkTest.java | 21 + src/test/java/io/jawk/AwkTestSupport.java | 430 +- src/test/java/io/jawk/AwkTestSupportTest.java | 113 - src/test/java/io/jawk/CliOptionTest.java | 20 - .../java/io/jawk/GawkMaketestsParserTest.java | 283 -- 16 files changed, 5405 insertions(+), 1636 deletions(-) create mode 100644 src/it/java/io/jawk/CompatibilityTestResources.java delete mode 100644 src/it/java/io/jawk/GawkCompatibilityIT.java create mode 100644 src/it/java/io/jawk/GawkIT.java delete mode 100644 src/it/java/io/jawk/GawkMaketestsParser.java delete mode 100644 src/it/resources/gawk/skips.properties delete mode 100644 src/test/java/io/jawk/AwkTestSupportTest.java delete mode 100644 src/test/java/io/jawk/GawkMaketestsParserTest.java diff --git a/pom.xml b/pom.xml index 8eb08a96..4e229088 100644 --- a/pom.xml +++ b/pom.xml @@ -127,20 +127,6 @@ - - add-compatibility-test-resources - generate-test-resources - - add-test-resource - - - - - ${project.basedir}/src/it/resources - - - - diff --git a/src/it/java/io/jawk/BwkMiscIT.java b/src/it/java/io/jawk/BwkMiscIT.java index e9da56da..96bdca8a 100644 --- a/src/it/java/io/jawk/BwkMiscIT.java +++ b/src/it/java/io/jawk/BwkMiscIT.java @@ -24,7 +24,7 @@ import java.io.File; import java.io.IOException; -import java.net.URL; +import java.nio.file.Path; import java.util.Arrays; import java.util.stream.Collectors; import org.junit.AfterClass; @@ -45,9 +45,8 @@ @RunWith(Parameterized.class) public class BwkMiscIT { - private static final String BWK_MISC_PATH = "/bwk/misc"; - private static File bwkMiscDirectory; - private static File scriptsDirectory; + private static Path bwkMiscDirectory; + private static Path scriptsDirectory; /** * Initializes the BWK miscellaneous integration suite. @@ -66,19 +65,15 @@ public static void beforeAll() throws Exception {} */ @Parameters(name = "BWK.misc {0}") public static Iterable awkList() throws Exception { - URL bwkMiscUrl = BwkMiscIT.class.getResource(BWK_MISC_PATH); - if (bwkMiscUrl == null) { - throw new IOException("Couldn't find resource " + BWK_MISC_PATH); + bwkMiscDirectory = CompatibilityTestResources.resourceDirectory(BwkMiscIT.class, "bwk", "misc"); + if (!bwkMiscDirectory.toFile().isDirectory()) { + throw new IOException(bwkMiscDirectory + " is not a directory"); } - bwkMiscDirectory = new File(bwkMiscUrl.toURI()); - if (!bwkMiscDirectory.isDirectory()) { - throw new IOException(BWK_MISC_PATH + " is not a directory"); - } - scriptsDirectory = new File(bwkMiscDirectory, "scripts"); - if (!scriptsDirectory.isDirectory()) { + scriptsDirectory = bwkMiscDirectory.resolve("scripts"); + if (!scriptsDirectory.toFile().isDirectory()) { throw new IOException("scripts is not a directory"); } - File[] scriptFiles = scriptsDirectory.listFiles(); + File[] scriptFiles = scriptsDirectory.toFile().listFiles(); if (scriptFiles == null) { throw new IOException("Couldn't list files in " + scriptsDirectory); } @@ -103,15 +98,15 @@ public static Iterable awkList() throws Exception { */ @Test public void test() throws Exception { - File awkFile = new File(scriptsDirectory, awkName); + Path awkFile = scriptsDirectory.resolve(awkName); String shortName = awkName.substring(0, awkName.length() - 4); - File inputFile = new File(bwkMiscDirectory, "inputs/" + shortName + ".in"); - File okFile = new File(bwkMiscDirectory, "results/" + shortName + ".ok"); + Path inputFile = bwkMiscDirectory.resolve("inputs/" + shortName + ".in"); + Path okFile = bwkMiscDirectory.resolve("results/" + shortName + ".ok"); AwkTestSupport .cliTest("BWK.misc " + awkName) - .argument("-f", awkFile.getAbsolutePath()) - .operand(inputFile.getAbsolutePath()) + .argument("-f", awkFile.toString()) + .operand(inputFile.toString()) .expectLines(okFile) .build() .runAndAssert(); diff --git a/src/it/java/io/jawk/BwkPIT.java b/src/it/java/io/jawk/BwkPIT.java index 1a1511ac..543308ed 100644 --- a/src/it/java/io/jawk/BwkPIT.java +++ b/src/it/java/io/jawk/BwkPIT.java @@ -24,9 +24,7 @@ import java.io.File; import java.io.IOException; -import java.net.URL; import java.nio.file.Path; -import java.nio.file.Paths; import java.util.Arrays; import java.util.stream.Collectors; import org.junit.AfterClass; @@ -47,7 +45,6 @@ @RunWith(Parameterized.class) public class BwkPIT { - private static final String BWK_P_PATH = "/bwk/p"; private static Path bwkPDirectory; private static Path scriptsDirectory; @@ -68,14 +65,9 @@ public static void beforeAll() throws Exception {} */ @Parameters(name = "BWK.p {0}") public static Iterable awkList() throws Exception { - URL bwkPUrl = BwkPIT.class.getResource(BWK_P_PATH); - if (bwkPUrl == null) { - throw new IOException("Couldn't find resource " + BWK_P_PATH); - } - Path bwkPPath = Paths.get(bwkPUrl.toURI()); - bwkPDirectory = bwkPPath.toAbsolutePath().normalize(); + bwkPDirectory = CompatibilityTestResources.resourceDirectory(BwkPIT.class, "bwk", "p"); if (!bwkPDirectory.toFile().isDirectory()) { - throw new IOException(BWK_P_PATH + " is not a directory"); + throw new IOException(bwkPDirectory + " is not a directory"); } scriptsDirectory = bwkPDirectory.resolve("scripts"); if (!scriptsDirectory.toFile().isDirectory()) { diff --git a/src/it/java/io/jawk/BwkTIT.java b/src/it/java/io/jawk/BwkTIT.java index eb0145c0..04510b4d 100644 --- a/src/it/java/io/jawk/BwkTIT.java +++ b/src/it/java/io/jawk/BwkTIT.java @@ -24,11 +24,9 @@ import java.io.File; import java.io.IOException; -import java.net.URL; import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Path; -import java.nio.file.Paths; import java.util.Arrays; import java.util.stream.Collectors; import org.junit.AfterClass; @@ -49,7 +47,6 @@ @RunWith(Parameterized.class) public class BwkTIT { - private static final String BWK_T_PATH = "/bwk/t"; private static Path bwkTDirectory; private static Path scriptsDirectory; @@ -70,13 +67,9 @@ public static void beforeAll() throws Exception {} */ @Parameters(name = "BWK.t {0}") public static Iterable awkList() throws Exception { - URL bwkTUrl = BwkTIT.class.getResource(BWK_T_PATH); - if (bwkTUrl == null) { - throw new IOException("Couldn't find resource " + BWK_T_PATH); - } - bwkTDirectory = Paths.get(bwkTUrl.toURI()); + bwkTDirectory = CompatibilityTestResources.resourceDirectory(BwkTIT.class, "bwk", "t"); if (!bwkTDirectory.toFile().isDirectory()) { - throw new IOException(BWK_T_PATH + " is not a directory"); + throw new IOException(bwkTDirectory + " is not a directory"); } scriptsDirectory = bwkTDirectory.resolve("scripts"); if (!scriptsDirectory.toFile().isDirectory()) { @@ -126,7 +119,7 @@ public void test() throws Exception { AwkTestSupport .awkTest("BWK.t " + awkName) - .script(Files.newInputStream(awkPath)) + .script(awkPath) .operand(inputPath.toString()) .postProcessWith(output -> Arrays.stream(output.split("\\R")).sorted().collect(Collectors.joining("\n"))) .expect(expectedResult) @@ -136,7 +129,7 @@ public void test() throws Exception { } else { AwkTestSupport .awkTest("BWK.t " + awkName) - .script(Files.newInputStream(awkPath)) + .script(awkPath) .operand(inputPath.toString()) .expectLines(okPath) .expectExit(expectedCode) diff --git a/src/it/java/io/jawk/CompatibilityTestResources.java b/src/it/java/io/jawk/CompatibilityTestResources.java new file mode 100644 index 00000000..7ad3d4cd --- /dev/null +++ b/src/it/java/io/jawk/CompatibilityTestResources.java @@ -0,0 +1,64 @@ +package io.jawk; + +/*- + * ╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲ + * Jawk + * ჻჻჻჻჻჻ + * Copyright (C) 2006 - 2026 MetricsHub + * ჻჻჻჻჻჻ + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * . + * ╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱ + */ + +import java.net.URISyntaxException; +import java.nio.file.Path; +import java.nio.file.Paths; + +/** + * Resolves vendored integration-test resources directly from the repository + * checkout instead of relying on the Maven test classpath layout. + */ +final class CompatibilityTestResources { + + private CompatibilityTestResources() {} + + static Path projectDirectory(Class anchor) { + try { + Path testClassesDirectory = Paths + .get(anchor.getProtectionDomain().getCodeSource().getLocation().toURI()) + .toAbsolutePath() + .normalize(); + Path targetDirectory = testClassesDirectory.getParent(); + if (targetDirectory == null) { + throw new IllegalStateException("Cannot determine Maven target directory from " + testClassesDirectory); + } + Path projectDirectory = targetDirectory.getParent(); + if (projectDirectory == null) { + throw new IllegalStateException("Cannot determine project directory from " + targetDirectory); + } + return projectDirectory; + } catch (URISyntaxException ex) { + throw new IllegalStateException("Cannot resolve project directory", ex); + } + } + + static Path resourceDirectory(Class anchor, String firstSegment, String... additionalSegments) { + Path resourceDirectory = projectDirectory(anchor).resolve(Paths.get("src", "it", "resources", firstSegment)); + for (String segment : additionalSegments) { + resourceDirectory = resourceDirectory.resolve(segment); + } + return resourceDirectory; + } +} diff --git a/src/it/java/io/jawk/GawkCompatibilityIT.java b/src/it/java/io/jawk/GawkCompatibilityIT.java deleted file mode 100644 index 9dff9c36..00000000 --- a/src/it/java/io/jawk/GawkCompatibilityIT.java +++ /dev/null @@ -1,252 +0,0 @@ -package io.jawk; - -/*- - * ╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲ - * Jawk - * ჻჻჻჻჻჻ - * Copyright (C) 2006 - 2026 MetricsHub - * ჻჻჻჻჻჻ - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . - * ╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱ - */ - -import static org.junit.Assert.fail; - -import java.io.IOException; -import java.io.Reader; -import java.net.URL; -import java.nio.charset.StandardCharsets; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.util.ArrayList; -import java.util.Collections; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import java.util.Properties; -import java.util.TreeSet; -import org.junit.Assume; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.Parameterized; -import org.junit.runners.Parameterized.Parameter; -import org.junit.runners.Parameterized.Parameters; - -/** - * Integration suite derived from vendored gawk metadata. The suite stages the - * gawk snapshot into the Failsafe working directory, parses the portable - * generated rules from {@code Maketests} and executes those cases through - * {@link AwkTestSupport#cliTest(String)}. - */ -@RunWith(Parameterized.class) -public class GawkCompatibilityIT { - - private static final String GAWK_RESOURCE_PATH = "/gawk"; - private static final String MAKETESTS_FILE = "Maketests"; - private static final String SKIP_MANIFEST_FILE = "skips.properties"; - private static final String EXIT_CODE_PREFIX = "EXIT CODE: "; - private static final String STAGED_DIRECTORY_PREFIX = "gawk-staged-"; - private static final int MAX_CAPTURED_OUTPUT_BYTES = 1024 * 1024; - private static final boolean LOG_PROGRESS = Boolean.getBoolean("jawk.gawk.progress"); - - private static SuiteState suiteState; - - /** - * Ensures that the vendored gawk resources are staged and parsed before the - * parameterised suite begins execution. - * - * @throws Exception when loading the suite metadata fails - */ - @BeforeClass - public static void beforeAll() throws Exception { - loadSuiteState(); - } - - /** - * Removes the staged gawk snapshot after the parameterised suite completes. - * - * @throws Exception when cleaning the staged resources fails - */ - @AfterClass - public static void afterAll() throws Exception { - if (suiteState == null) { - return; - } - AwkTestSupport.deleteRecursively(suiteState.stagedDirectory); - suiteState = null; - } - - /** - * Returns every gawk compatibility case discovered from the vendored - * generated metadata snapshot. - * - * @return parameter values for the suite - * @throws Exception when loading or validating the gawk metadata fails - */ - @Parameters(name = "GAWK {0}") - public static Iterable parameters() throws Exception { - return loadSuiteState().cases; - } - - /** Gawk compatibility case under test. */ - @Parameter - public GawkMaketestsParser.GawkCase gawkCase; - - /** - * Executes one gawk compatibility case unless the explicit skip manifest marks - * it unsupported by the in-process Jawk harness. - * - * @throws Exception when preparing or executing the case fails unexpectedly - */ - @Test - public void test() throws Exception { - SuiteState state = loadSuiteState(); - String skipReason = state.skipReasons.get(gawkCase.name()); - Assume.assumeTrue(skipReason, skipReason == null); - if (LOG_PROGRESS) { - System.out.println("GAWK " + gawkCase.name()); - } - - AwkTestSupport.CliTestBuilder builder = AwkTestSupport - .cliTest("GAWK " + gawkCase.name()) - .emulateCliMain() - .mergeStdoutAndStderr() - .maxOutputBytes(MAX_CAPTURED_OUTPUT_BYTES); - - if (gawkCase.localeTag() != null) { - builder.argument("--locale", gawkCase.localeTag()); - } - for (String flag : gawkCase.runnableFlags()) { - builder.argument(flag); - } - builder.argument("-f", state.stagedDirectory.resolve(gawkCase.scriptFileName()).toString()); - if (gawkCase.stdinFileName() != null) { - builder.stdin(Files.readAllBytes(state.stagedDirectory.resolve(gawkCase.stdinFileName()))); - } - AwkTestSupport.ExpectedCliTranscript expected = AwkTestSupport - .readExpectedCliTranscript(state.stagedDirectory.resolve(gawkCase.expectedFileName()), EXIT_CODE_PREFIX); - builder.postProcessWith(AwkTestSupport::normalizeNewlines).expect(expected.output()); - if (expected.exitCode() != null) { - builder.expectExit(expected.exitCode().intValue()); - } - - try { - builder.build().runAndAssert(); - } catch (AwkTestSupport.OutputLimitExceededException ex) { - fail( - "Captured output for GAWK " - + gawkCase.name() - + " exceeded " - + ex.maxBytes() - + " bytes. Enable -Djawk.gawk.progress=true to log case execution."); - } - } - - private static synchronized SuiteState loadSuiteState() throws Exception { - if (suiteState != null) { - return suiteState; - } - Path resourceDirectory = resolveResourceDirectory(); - List parsedCases = parseCases(resourceDirectory.resolve(MAKETESTS_FILE)); - Map skipReasons = loadSkipReasons(resourceDirectory.resolve(SKIP_MANIFEST_FILE)); - validateCoverage(parsedCases, skipReasons); - Path stagedDirectory = null; - try { - stagedDirectory = AwkTestSupport.stageDirectory(resourceDirectory, STAGED_DIRECTORY_PREFIX); - suiteState = new SuiteState(stagedDirectory, parsedCases, skipReasons); - return suiteState; - } catch (Exception ex) { - AwkTestSupport.deleteRecursively(stagedDirectory); - throw ex; - } - } - - private static Path resolveResourceDirectory() throws Exception { - URL resourceUrl = GawkCompatibilityIT.class.getResource(GAWK_RESOURCE_PATH); - if (resourceUrl == null) { - throw new IOException("Couldn't find resource " + GAWK_RESOURCE_PATH); - } - Path resourceDirectory = Paths.get(resourceUrl.toURI()); - if (!Files.isDirectory(resourceDirectory)) { - throw new IOException(GAWK_RESOURCE_PATH + " is not a directory"); - } - return resourceDirectory; - } - - private static List parseCases(Path maketestsPath) throws IOException { - try (Reader reader = Files.newBufferedReader(maketestsPath, StandardCharsets.UTF_8)) { - return new ArrayList<>(GawkMaketestsParser.parse(reader)); - } - } - - private static Map loadSkipReasons(Path manifestPath) throws IOException { - Properties properties = new Properties(); - try (Reader reader = Files.newBufferedReader(manifestPath, StandardCharsets.UTF_8)) { - properties.load(reader); - } - Map skipReasons = new LinkedHashMap<>(); - for (String name : properties.stringPropertyNames()) { - skipReasons.put(name, properties.getProperty(name)); - } - return Collections.unmodifiableMap(skipReasons); - } - - private static void validateCoverage( - List parsedCases, - Map skipReasons) { - TreeSet parsedNames = new TreeSet<>(); - TreeSet duplicateNames = new TreeSet<>(); - TreeSet missingSkipEntries = new TreeSet<>(); - for (GawkMaketestsParser.GawkCase parsedCase : parsedCases) { - if (!parsedNames.add(parsedCase.name())) { - duplicateNames.add(parsedCase.name()); - } - if (parsedCase.requiresExplicitSkip() && !skipReasons.containsKey(parsedCase.name())) { - missingSkipEntries.add(parsedCase.name()); - } - } - if (!duplicateNames.isEmpty()) { - throw new IllegalStateException("Duplicate gawk case names discovered: " + String.join(", ", duplicateNames)); - } - if (!missingSkipEntries.isEmpty()) { - throw new IllegalStateException("Missing gawk skip manifest entries: " + String.join(", ", missingSkipEntries)); - } - - TreeSet staleSkipEntries = new TreeSet<>(skipReasons.keySet()); - staleSkipEntries.removeAll(parsedNames); - if (!staleSkipEntries.isEmpty()) { - throw new IllegalStateException( - "Skip manifest contains unknown gawk cases: " + String.join(", ", staleSkipEntries)); - } - } - - private static final class SuiteState { - private final Path stagedDirectory; - private final List cases; - private final Map skipReasons; - - SuiteState( - Path stagedDirectory, - List cases, - Map skipReasons) { - this.stagedDirectory = stagedDirectory; - this.cases = Collections.unmodifiableList(new ArrayList<>(cases)); - this.skipReasons = skipReasons; - } - } -} diff --git a/src/it/java/io/jawk/GawkIT.java b/src/it/java/io/jawk/GawkIT.java new file mode 100644 index 00000000..205a9278 --- /dev/null +++ b/src/it/java/io/jawk/GawkIT.java @@ -0,0 +1,4515 @@ +package io.jawk; + +/*- + * ╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲ + * Jawk + * ჻჻჻჻჻჻ + * Copyright 2006 - 2026 MetricsHub + * ჻჻჻჻჻჻ + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * . + * ╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱ + */ + +import static org.junit.Assume.assumeTrue; + +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Path; +import org.junit.Test; + +/** + * Explicit gawk compatibility cases generated from the vendored Maketests + * snapshot. The checked-in Java source is the source of truth at runtime; the + * vendored metadata is only used when refreshing this file. + */ +public class GawkIT { + + private static final Path GAWK_DIRECTORY = CompatibilityTestResources.resourceDirectory(GawkIT.class, "gawk"); + private static final String NON_ZERO_TRANSCRIPT_REASON = "This case compares a non-zero gawk CLI transcript, which is intentionally skipped in the explicit AwkTestSupport.cliTest suite."; + private static final String NON_UTF8_STDIN_REASON = "This case redirects stdin that is not valid UTF-8, which is intentionally skipped in the explicit AwkTestSupport.cliTest suite."; + private static final String NON_UTF8_EXPECTED_REASON = "This case uses an expected .ok file that is not valid UTF-8, which is intentionally skipped in the explicit AwkTestSupport.cliTest suite."; + + private static Path gawkPath(String fileName) { + return GAWK_DIRECTORY.resolve(fileName); + } + + private static String gawkFile(String fileName) { + return gawkPath(fileName).toString(); + } + + private static String gawkText(String fileName) throws IOException { + return new String(Files.readAllBytes(gawkPath(fileName)), StandardCharsets.UTF_8); + } + + private static void skip(String reason) { + assumeTrue(reason, false); + } + + @Test + public void test_addcomma() throws Exception { + AwkTestSupport + .cliTest("GAWK addcomma") + .argument("-f", gawkFile("addcomma.awk")) + .stdin(gawkText("addcomma.in")) + .expectLines(gawkPath("addcomma.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_anchgsub() throws Exception { + AwkTestSupport + .cliTest("GAWK anchgsub") + .argument("-f", gawkFile("anchgsub.awk")) + .stdin(gawkText("anchgsub.in")) + .expectLines(gawkPath("anchgsub.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_anchor() throws Exception { + AwkTestSupport + .cliTest("GAWK anchor") + .argument("-f", gawkFile("anchor.awk")) + .stdin(gawkText("anchor.in")) + .expectLines(gawkPath("anchor.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_arrayind1() throws Exception { + AwkTestSupport + .cliTest("GAWK arrayind1") + .argument("-f", gawkFile("arrayind1.awk")) + .stdin(gawkText("arrayind1.in")) + .expectLines(gawkPath("arrayind1.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_arrayind2() throws Exception { + AwkTestSupport + .cliTest("GAWK arrayind2") + .argument("-f", gawkFile("arrayind2.awk")) + .expectLines(gawkPath("arrayind2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_arrayind3() throws Exception { + AwkTestSupport + .cliTest("GAWK arrayind3") + .argument("-f", gawkFile("arrayind3.awk")) + .expectLines(gawkPath("arrayind3.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_arrayparm() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_arrayprm2() throws Exception { + AwkTestSupport + .cliTest("GAWK arrayprm2") + .argument("-f", gawkFile("arrayprm2.awk")) + .expectLines(gawkPath("arrayprm2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_arrayprm3() throws Exception { + AwkTestSupport + .cliTest("GAWK arrayprm3") + .argument("-f", gawkFile("arrayprm3.awk")) + .expectLines(gawkPath("arrayprm3.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_arrayref() throws Exception { + AwkTestSupport + .cliTest("GAWK arrayref") + .argument("-f", gawkFile("arrayref.awk")) + .expectLines(gawkPath("arrayref.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_arrymem1() throws Exception { + AwkTestSupport + .cliTest("GAWK arrymem1") + .argument("-f", gawkFile("arrymem1.awk")) + .expectLines(gawkPath("arrymem1.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_arryref2() throws Exception { + AwkTestSupport + .cliTest("GAWK arryref2") + .argument("-f", gawkFile("arryref2.awk")) + .expectLines(gawkPath("arryref2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_arryref3() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_arryref4() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_arryref5() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_arynasty() throws Exception { + AwkTestSupport + .cliTest("GAWK arynasty") + .argument("-f", gawkFile("arynasty.awk")) + .expectLines(gawkPath("arynasty.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_aryprm1() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_aryprm2() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_aryprm3() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_aryprm4() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_aryprm5() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_aryprm6() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_aryprm7() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_aryprm8() throws Exception { + AwkTestSupport + .cliTest("GAWK aryprm8") + .argument("-f", gawkFile("aryprm8.awk")) + .expectLines(gawkPath("aryprm8.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_aryprm9() throws Exception { + AwkTestSupport + .cliTest("GAWK aryprm9") + .argument("-f", gawkFile("aryprm9.awk")) + .expectLines(gawkPath("aryprm9.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_arysubnm() throws Exception { + AwkTestSupport + .cliTest("GAWK arysubnm") + .argument("-f", gawkFile("arysubnm.awk")) + .expectLines(gawkPath("arysubnm.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_aryunasgn() throws Exception { + AwkTestSupport + .cliTest("GAWK aryunasgn") + .argument("-f", gawkFile("aryunasgn.awk")) + .expectLines(gawkPath("aryunasgn.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_asgext() throws Exception { + AwkTestSupport + .cliTest("GAWK asgext") + .argument("-f", gawkFile("asgext.awk")) + .stdin(gawkText("asgext.in")) + .expectLines(gawkPath("asgext.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_assignnumfield() throws Exception { + AwkTestSupport + .cliTest("GAWK assignnumfield") + .argument("-f", gawkFile("assignnumfield.awk")) + .stdin(gawkText("assignnumfield.in")) + .expectLines(gawkPath("assignnumfield.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_assignnumfield2() throws Exception { + AwkTestSupport + .cliTest("GAWK assignnumfield2") + .argument("-f", gawkFile("assignnumfield2.awk")) + .expectLines(gawkPath("assignnumfield2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_back89() throws Exception { + AwkTestSupport + .cliTest("GAWK back89") + .argument("-f", gawkFile("back89.awk")) + .stdin(gawkText("back89.in")) + .expectLines(gawkPath("back89.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_backgsub() throws Exception { + AwkTestSupport + .cliTest("GAWK backgsub") + .argument("-f", gawkFile("backgsub.awk")) + .stdin(gawkText("backgsub.in")) + .expectLines(gawkPath("backgsub.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_badassign1() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_badbuild() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_callparam() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_childin() throws Exception { + AwkTestSupport + .cliTest("GAWK childin") + .argument("-f", gawkFile("childin.awk")) + .stdin(gawkText("childin.in")) + .expectLines(gawkPath("childin.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_closebad() throws Exception { + AwkTestSupport + .cliTest("GAWK closebad") + .argument("-f", gawkFile("closebad.awk")) + .expectLines(gawkPath("closebad.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_close_status() throws Exception { + AwkTestSupport + .cliTest("GAWK close_status") + .argument("-f", gawkFile("close_status.awk")) + .expectLines(gawkPath("close_status.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_clsflnam() throws Exception { + AwkTestSupport + .cliTest("GAWK clsflnam") + .argument("-f", gawkFile("clsflnam.awk")) + .stdin(gawkText("clsflnam.in")) + .expectLines(gawkPath("clsflnam.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_compare2() throws Exception { + AwkTestSupport + .cliTest("GAWK compare2") + .argument("-f", gawkFile("compare2.awk")) + .expectLines(gawkPath("compare2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_concat1() throws Exception { + AwkTestSupport + .cliTest("GAWK concat1") + .argument("-f", gawkFile("concat1.awk")) + .stdin(gawkText("concat1.in")) + .expectLines(gawkPath("concat1.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_concat2() throws Exception { + AwkTestSupport + .cliTest("GAWK concat2") + .argument("-f", gawkFile("concat2.awk")) + .expectLines(gawkPath("concat2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_cmdlinefsbacknl() throws Exception { + skip( + "Shell-script target generated by Maketests; the in-process Jawk harness does not execute external shell scripts."); + } + + @Test + public void test_concat3() throws Exception { + AwkTestSupport + .cliTest("GAWK concat3") + .argument("-f", gawkFile("concat3.awk")) + .expectLines(gawkPath("concat3.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_concat4() throws Exception { + AwkTestSupport + .cliTest("GAWK concat4") + .argument("--locale", "en-US") + .argument("-f", gawkFile("concat4.awk")) + .stdin(gawkText("concat4.in")) + .expectLines(gawkPath("concat4.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_concat5() throws Exception { + AwkTestSupport + .cliTest("GAWK concat5") + .argument("-f", gawkFile("concat5.awk")) + .expectLines(gawkPath("concat5.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_convfmt() throws Exception { + AwkTestSupport + .cliTest("GAWK convfmt") + .argument("-f", gawkFile("convfmt.awk")) + .expectLines(gawkPath("convfmt.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_datanonl() throws Exception { + AwkTestSupport + .cliTest("GAWK datanonl") + .argument("-f", gawkFile("datanonl.awk")) + .stdin(gawkText("datanonl.in")) + .expectLines(gawkPath("datanonl.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_defref() throws Exception { + skip("gawk's --lint diagnostics are not implemented by Jawk."); + } + + @Test + public void test_delargv() throws Exception { + AwkTestSupport + .cliTest("GAWK delargv") + .argument("-f", gawkFile("delargv.awk")) + .expectLines(gawkPath("delargv.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_delarpm2() throws Exception { + AwkTestSupport + .cliTest("GAWK delarpm2") + .argument("-f", gawkFile("delarpm2.awk")) + .expectLines(gawkPath("delarpm2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_delarprm() throws Exception { + AwkTestSupport + .cliTest("GAWK delarprm") + .argument("-f", gawkFile("delarprm.awk")) + .expectLines(gawkPath("delarprm.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_delfunc() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_dfacheck2() throws Exception { + AwkTestSupport + .cliTest("GAWK dfacheck2") + .argument("-f", gawkFile("dfacheck2.awk")) + .stdin(gawkText("dfacheck2.in")) + .expectLines(gawkPath("dfacheck2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_dfamb1() throws Exception { + AwkTestSupport + .cliTest("GAWK dfamb1") + .argument("--locale", "en-US") + .argument("-f", gawkFile("dfamb1.awk")) + .stdin(gawkText("dfamb1.in")) + .expectLines(gawkPath("dfamb1.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_dfastress() throws Exception { + AwkTestSupport + .cliTest("GAWK dfastress") + .argument("-f", gawkFile("dfastress.awk")) + .expectLines(gawkPath("dfastress.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_divzero() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_divzero2() throws Exception { + AwkTestSupport + .cliTest("GAWK divzero2") + .argument("-f", gawkFile("divzero2.awk")) + .expectLines(gawkPath("divzero2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_dynlj() throws Exception { + AwkTestSupport + .cliTest("GAWK dynlj") + .argument("-f", gawkFile("dynlj.awk")) + .expectLines(gawkPath("dynlj.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_eofsplit() throws Exception { + AwkTestSupport + .cliTest("GAWK eofsplit") + .argument("-f", gawkFile("eofsplit.awk")) + .expectLines(gawkPath("eofsplit.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_escapebrace() throws Exception { + AwkTestSupport + .cliTest("GAWK escapebrace") + .argument("--posix") + .argument("-f", gawkFile("escapebrace.awk")) + .stdin(gawkText("escapebrace.in")) + .expectLines(gawkPath("escapebrace.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_exit2() throws Exception { + AwkTestSupport + .cliTest("GAWK exit2") + .argument("-f", gawkFile("exit2.awk")) + .expectLines(gawkPath("exit2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_exitval2() throws Exception { + AwkTestSupport + .cliTest("GAWK exitval2") + .argument("-f", gawkFile("exitval2.awk")) + .expectLines(gawkPath("exitval2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_exitval3() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_fcall_exit() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_fcall_exit2() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_fieldassign() throws Exception { + AwkTestSupport + .cliTest("GAWK fieldassign") + .argument("-f", gawkFile("fieldassign.awk")) + .stdin(gawkText("fieldassign.in")) + .expectLines(gawkPath("fieldassign.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_fldchg() throws Exception { + AwkTestSupport + .cliTest("GAWK fldchg") + .argument("-f", gawkFile("fldchg.awk")) + .stdin(gawkText("fldchg.in")) + .expectLines(gawkPath("fldchg.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_fldchgnf() throws Exception { + AwkTestSupport + .cliTest("GAWK fldchgnf") + .argument("-f", gawkFile("fldchgnf.awk")) + .stdin(gawkText("fldchgnf.in")) + .expectLines(gawkPath("fldchgnf.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_fldterm() throws Exception { + AwkTestSupport + .cliTest("GAWK fldterm") + .argument("-f", gawkFile("fldterm.awk")) + .stdin(gawkText("fldterm.in")) + .expectLines(gawkPath("fldterm.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_fnamedat() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_fnarray() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_fnarray2() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_fnaryscl() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_fnasgnm() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_fnmisc() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_fordel() throws Exception { + AwkTestSupport + .cliTest("GAWK fordel") + .argument("-f", gawkFile("fordel.awk")) + .expectLines(gawkPath("fordel.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_forref() throws Exception { + AwkTestSupport + .cliTest("GAWK forref") + .argument("-f", gawkFile("forref.awk")) + .expectLines(gawkPath("forref.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_forsimp() throws Exception { + AwkTestSupport + .cliTest("GAWK forsimp") + .argument("-f", gawkFile("forsimp.awk")) + .expectLines(gawkPath("forsimp.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_fsbs() throws Exception { + AwkTestSupport + .cliTest("GAWK fsbs") + .argument("-f", gawkFile("fsbs.awk")) + .stdin(gawkText("fsbs.in")) + .expectLines(gawkPath("fsbs.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_fscaret() throws Exception { + AwkTestSupport + .cliTest("GAWK fscaret") + .argument("-f", gawkFile("fscaret.awk")) + .stdin(gawkText("fscaret.in")) + .expectLines(gawkPath("fscaret.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_fsnul1() throws Exception { + AwkTestSupport + .cliTest("GAWK fsnul1") + .argument("-f", gawkFile("fsnul1.awk")) + .stdin(gawkText("fsnul1.in")) + .expectLines(gawkPath("fsnul1.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_fsrs() throws Exception { + AwkTestSupport + .cliTest("GAWK fsrs") + .argument("-f", gawkFile("fsrs.awk")) + .stdin(gawkText("fsrs.in")) + .expectLines(gawkPath("fsrs.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_fstabplus() throws Exception { + AwkTestSupport + .cliTest("GAWK fstabplus") + .argument("-f", gawkFile("fstabplus.awk")) + .stdin(gawkText("fstabplus.in")) + .expectLines(gawkPath("fstabplus.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_funsemnl() throws Exception { + AwkTestSupport + .cliTest("GAWK funsemnl") + .argument("-f", gawkFile("funsemnl.awk")) + .expectLines(gawkPath("funsemnl.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_funsmnam() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_funstack() throws Exception { + AwkTestSupport + .cliTest("GAWK funstack") + .argument("-f", gawkFile("funstack.awk")) + .stdin(gawkText("funstack.in")) + .expectLines(gawkPath("funstack.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_getline() throws Exception { + AwkTestSupport + .cliTest("GAWK getline") + .argument("-f", gawkFile("getline.awk")) + .stdin(gawkText("getline.in")) + .expectLines(gawkPath("getline.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_getline3() throws Exception { + AwkTestSupport + .cliTest("GAWK getline3") + .argument("-f", gawkFile("getline3.awk")) + .expectLines(gawkPath("getline3.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_getline4() throws Exception { + AwkTestSupport + .cliTest("GAWK getline4") + .argument("-f", gawkFile("getline4.awk")) + .stdin(gawkText("getline4.in")) + .expectLines(gawkPath("getline4.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_getline5() throws Exception { + AwkTestSupport + .cliTest("GAWK getline5") + .argument("-f", gawkFile("getline5.awk")) + .expectLines(gawkPath("getline5.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_getlnfa() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_getnr2tb() throws Exception { + AwkTestSupport + .cliTest("GAWK getnr2tb") + .argument("-f", gawkFile("getnr2tb.awk")) + .stdin(gawkText("getnr2tb.in")) + .expectLines(gawkPath("getnr2tb.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_getnr2tm() throws Exception { + AwkTestSupport + .cliTest("GAWK getnr2tm") + .argument("-f", gawkFile("getnr2tm.awk")) + .stdin(gawkText("getnr2tm.in")) + .expectLines(gawkPath("getnr2tm.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_gsubasgn() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_gsubtest() throws Exception { + AwkTestSupport + .cliTest("GAWK gsubtest") + .argument("-f", gawkFile("gsubtest.awk")) + .expectLines(gawkPath("gsubtest.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_gsubtst2() throws Exception { + AwkTestSupport + .cliTest("GAWK gsubtst2") + .argument("-f", gawkFile("gsubtst2.awk")) + .expectLines(gawkPath("gsubtst2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_gsubtst3() throws Exception { + AwkTestSupport + .cliTest("GAWK gsubtst3") + .argument("-f", gawkFile("gsubtst3.awk")) + .stdin(gawkText("gsubtst3.in")) + .expectLines(gawkPath("gsubtst3.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_gsubtst4() throws Exception { + AwkTestSupport + .cliTest("GAWK gsubtst4") + .argument("-f", gawkFile("gsubtst4.awk")) + .expectLines(gawkPath("gsubtst4.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_gsubtst5() throws Exception { + AwkTestSupport + .cliTest("GAWK gsubtst5") + .argument("-f", gawkFile("gsubtst5.awk")) + .stdin(gawkText("gsubtst5.in")) + .expectLines(gawkPath("gsubtst5.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_gsubtst6() throws Exception { + AwkTestSupport + .cliTest("GAWK gsubtst6") + .argument("-f", gawkFile("gsubtst6.awk")) + .expectLines(gawkPath("gsubtst6.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_gsubtst7() throws Exception { + AwkTestSupport + .cliTest("GAWK gsubtst7") + .argument("-f", gawkFile("gsubtst7.awk")) + .stdin(gawkText("gsubtst7.in")) + .expectLines(gawkPath("gsubtst7.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_gsubtst8() throws Exception { + AwkTestSupport + .cliTest("GAWK gsubtst8") + .argument("-f", gawkFile("gsubtst8.awk")) + .stdin(gawkText("gsubtst8.in")) + .expectLines(gawkPath("gsubtst8.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_hex() throws Exception { + AwkTestSupport + .cliTest("GAWK hex") + .argument("-f", gawkFile("hex.awk")) + .expectLines(gawkPath("hex.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_hex2() throws Exception { + AwkTestSupport + .cliTest("GAWK hex2") + .argument("-f", gawkFile("hex2.awk")) + .stdin(gawkText("hex2.in")) + .expectLines(gawkPath("hex2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_hsprint() throws Exception { + AwkTestSupport + .cliTest("GAWK hsprint") + .argument("-f", gawkFile("hsprint.awk")) + .expectLines(gawkPath("hsprint.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_inpref() throws Exception { + AwkTestSupport + .cliTest("GAWK inpref") + .argument("-f", gawkFile("inpref.awk")) + .stdin(gawkText("inpref.in")) + .expectLines(gawkPath("inpref.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_inputred() throws Exception { + AwkTestSupport + .cliTest("GAWK inputred") + .argument("-f", gawkFile("inputred.awk")) + .expectLines(gawkPath("inputred.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_intest() throws Exception { + AwkTestSupport + .cliTest("GAWK intest") + .argument("-f", gawkFile("intest.awk")) + .expectLines(gawkPath("intest.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_intprec() throws Exception { + AwkTestSupport + .cliTest("GAWK intprec") + .argument("-f", gawkFile("intprec.awk")) + .expectLines(gawkPath("intprec.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_iobug1() throws Exception { + AwkTestSupport + .cliTest("GAWK iobug1") + .argument("-f", gawkFile("iobug1.awk")) + .expectLines(gawkPath("iobug1.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_leaddig() throws Exception { + AwkTestSupport + .cliTest("GAWK leaddig") + .argument("-f", gawkFile("leaddig.awk")) + .expectLines(gawkPath("leaddig.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_leadnl() throws Exception { + AwkTestSupport + .cliTest("GAWK leadnl") + .argument("-f", gawkFile("leadnl.awk")) + .stdin(gawkText("leadnl.in")) + .expectLines(gawkPath("leadnl.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_litoct() throws Exception { + skip("gawk's --traditional mode is not implemented by Jawk."); + } + + @Test + public void test_longsub() throws Exception { + AwkTestSupport + .cliTest("GAWK longsub") + .argument("-f", gawkFile("longsub.awk")) + .stdin(gawkText("longsub.in")) + .expectLines(gawkPath("longsub.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_manglprm() throws Exception { + AwkTestSupport + .cliTest("GAWK manglprm") + .argument("-f", gawkFile("manglprm.awk")) + .stdin(gawkText("manglprm.in")) + .expectLines(gawkPath("manglprm.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_math() throws Exception { + AwkTestSupport + .cliTest("GAWK math") + .argument("-f", gawkFile("math.awk")) + .expectLines(gawkPath("math.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_membug1() throws Exception { + AwkTestSupport + .cliTest("GAWK membug1") + .argument("-f", gawkFile("membug1.awk")) + .stdin(gawkText("membug1.in")) + .expectLines(gawkPath("membug1.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_memleak() throws Exception { + AwkTestSupport + .cliTest("GAWK memleak") + .argument("-f", gawkFile("memleak.awk")) + .expectLines(gawkPath("memleak.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_minusstr() throws Exception { + AwkTestSupport + .cliTest("GAWK minusstr") + .argument("-f", gawkFile("minusstr.awk")) + .expectLines(gawkPath("minusstr.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_mmap8k() throws Exception { + AwkTestSupport + .cliTest("GAWK mmap8k") + .argument("-f", gawkFile("mmap8k.awk")) + .stdin(gawkText("mmap8k.in")) + .expectLines(gawkPath("mmap8k.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_nasty() throws Exception { + AwkTestSupport + .cliTest("GAWK nasty") + .argument("-f", gawkFile("nasty.awk")) + .expectLines(gawkPath("nasty.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_nasty2() throws Exception { + AwkTestSupport + .cliTest("GAWK nasty2") + .argument("-f", gawkFile("nasty2.awk")) + .expectLines(gawkPath("nasty2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_negexp() throws Exception { + AwkTestSupport + .cliTest("GAWK negexp") + .argument("-f", gawkFile("negexp.awk")) + .expectLines(gawkPath("negexp.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_negrange() throws Exception { + AwkTestSupport + .cliTest("GAWK negrange") + .argument("-f", gawkFile("negrange.awk")) + .expectLines(gawkPath("negrange.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_nested() throws Exception { + AwkTestSupport + .cliTest("GAWK nested") + .argument("-f", gawkFile("nested.awk")) + .stdin(gawkText("nested.in")) + .expectLines(gawkPath("nested.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_nfldstr() throws Exception { + AwkTestSupport + .cliTest("GAWK nfldstr") + .argument("-f", gawkFile("nfldstr.awk")) + .stdin(gawkText("nfldstr.in")) + .expectLines(gawkPath("nfldstr.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_nfloop() throws Exception { + AwkTestSupport + .cliTest("GAWK nfloop") + .argument("-f", gawkFile("nfloop.awk")) + .expectLines(gawkPath("nfloop.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_nfneg() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_nfset() throws Exception { + AwkTestSupport + .cliTest("GAWK nfset") + .argument("-f", gawkFile("nfset.awk")) + .stdin(gawkText("nfset.in")) + .expectLines(gawkPath("nfset.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_nlfldsep() throws Exception { + AwkTestSupport + .cliTest("GAWK nlfldsep") + .argument("-f", gawkFile("nlfldsep.awk")) + .stdin(gawkText("nlfldsep.in")) + .expectLines(gawkPath("nlfldsep.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_nlinstr() throws Exception { + AwkTestSupport + .cliTest("GAWK nlinstr") + .argument("-f", gawkFile("nlinstr.awk")) + .stdin(gawkText("nlinstr.in")) + .expectLines(gawkPath("nlinstr.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_nlstrina() throws Exception { + AwkTestSupport + .cliTest("GAWK nlstrina") + .argument("-f", gawkFile("nlstrina.awk")) + .expectLines(gawkPath("nlstrina.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_noeffect() throws Exception { + skip("gawk's --lint diagnostics are not implemented by Jawk."); + } + + @Test + public void test_nofmtch() throws Exception { + skip("gawk's --lint diagnostics are not implemented by Jawk."); + } + + @Test + public void test_noloop1() throws Exception { + AwkTestSupport + .cliTest("GAWK noloop1") + .argument("-f", gawkFile("noloop1.awk")) + .stdin(gawkText("noloop1.in")) + .expectLines(gawkPath("noloop1.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_noloop2() throws Exception { + AwkTestSupport + .cliTest("GAWK noloop2") + .argument("-f", gawkFile("noloop2.awk")) + .stdin(gawkText("noloop2.in")) + .expectLines(gawkPath("noloop2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_nonl() throws Exception { + skip("gawk's --lint diagnostics are not implemented by Jawk."); + } + + @Test + public void test_noparms() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_nulinsrc() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_nulrsend() throws Exception { + AwkTestSupport + .cliTest("GAWK nulrsend") + .argument("-f", gawkFile("nulrsend.awk")) + .stdin(gawkText("nulrsend.in")) + .expectLines(gawkPath("nulrsend.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_numindex() throws Exception { + AwkTestSupport + .cliTest("GAWK numindex") + .argument("-f", gawkFile("numindex.awk")) + .stdin(gawkText("numindex.in")) + .expectLines(gawkPath("numindex.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_numrange() throws Exception { + AwkTestSupport + .cliTest("GAWK numrange") + .argument("-f", gawkFile("numrange.awk")) + .expectLines(gawkPath("numrange.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_numstr1() throws Exception { + AwkTestSupport + .cliTest("GAWK numstr1") + .argument("-f", gawkFile("numstr1.awk")) + .expectLines(gawkPath("numstr1.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_numsubstr() throws Exception { + AwkTestSupport + .cliTest("GAWK numsubstr") + .argument("-f", gawkFile("numsubstr.awk")) + .stdin(gawkText("numsubstr.in")) + .expectLines(gawkPath("numsubstr.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_octsub() throws Exception { + AwkTestSupport + .cliTest("GAWK octsub") + .argument("-f", gawkFile("octsub.awk")) + .expectLines(gawkPath("octsub.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_ofmt() throws Exception { + AwkTestSupport + .cliTest("GAWK ofmt") + .argument("-f", gawkFile("ofmt.awk")) + .stdin(gawkText("ofmt.in")) + .expectLines(gawkPath("ofmt.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_ofmta() throws Exception { + AwkTestSupport + .cliTest("GAWK ofmta") + .argument("-f", gawkFile("ofmta.awk")) + .expectLines(gawkPath("ofmta.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_ofmtbig() throws Exception { + AwkTestSupport + .cliTest("GAWK ofmtbig") + .argument("-f", gawkFile("ofmtbig.awk")) + .stdin(gawkText("ofmtbig.in")) + .expectLines(gawkPath("ofmtbig.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_ofmtfidl() throws Exception { + AwkTestSupport + .cliTest("GAWK ofmtfidl") + .argument("-f", gawkFile("ofmtfidl.awk")) + .stdin(gawkText("ofmtfidl.in")) + .expectLines(gawkPath("ofmtfidl.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_ofmts() throws Exception { + AwkTestSupport + .cliTest("GAWK ofmts") + .argument("-f", gawkFile("ofmts.awk")) + .stdin(gawkText("ofmts.in")) + .expectLines(gawkPath("ofmts.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_ofmtstrnum() throws Exception { + AwkTestSupport + .cliTest("GAWK ofmtstrnum") + .argument("-f", gawkFile("ofmtstrnum.awk")) + .expectLines(gawkPath("ofmtstrnum.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_ofs1() throws Exception { + AwkTestSupport + .cliTest("GAWK ofs1") + .argument("-f", gawkFile("ofs1.awk")) + .stdin(gawkText("ofs1.in")) + .expectLines(gawkPath("ofs1.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_onlynl() throws Exception { + AwkTestSupport + .cliTest("GAWK onlynl") + .argument("-f", gawkFile("onlynl.awk")) + .stdin(gawkText("onlynl.in")) + .expectLines(gawkPath("onlynl.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_opasnidx() throws Exception { + AwkTestSupport + .cliTest("GAWK opasnidx") + .argument("-f", gawkFile("opasnidx.awk")) + .expectLines(gawkPath("opasnidx.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_opasnslf() throws Exception { + AwkTestSupport + .cliTest("GAWK opasnslf") + .argument("-f", gawkFile("opasnslf.awk")) + .expectLines(gawkPath("opasnslf.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_paramasfunc1() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_paramasfunc2() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_paramdup() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_paramres() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_paramtyp() throws Exception { + AwkTestSupport + .cliTest("GAWK paramtyp") + .argument("-f", gawkFile("paramtyp.awk")) + .expectLines(gawkPath("paramtyp.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_paramuninitglobal() throws Exception { + AwkTestSupport + .cliTest("GAWK paramuninitglobal") + .argument("-f", gawkFile("paramuninitglobal.awk")) + .expectLines(gawkPath("paramuninitglobal.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_parse1() throws Exception { + AwkTestSupport + .cliTest("GAWK parse1") + .argument("-f", gawkFile("parse1.awk")) + .stdin(gawkText("parse1.in")) + .expectLines(gawkPath("parse1.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_parsefld() throws Exception { + AwkTestSupport + .cliTest("GAWK parsefld") + .argument("-f", gawkFile("parsefld.awk")) + .stdin(gawkText("parsefld.in")) + .expectLines(gawkPath("parsefld.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_parseme() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_pcntplus() throws Exception { + AwkTestSupport + .cliTest("GAWK pcntplus") + .argument("-f", gawkFile("pcntplus.awk")) + .expectLines(gawkPath("pcntplus.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_posix2008sub() throws Exception { + AwkTestSupport + .cliTest("GAWK posix2008sub") + .argument("--posix") + .argument("-f", gawkFile("posix2008sub.awk")) + .expectLines(gawkPath("posix2008sub.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_posix_compare() throws Exception { + AwkTestSupport + .cliTest("GAWK posix_compare") + .argument("--locale", "en-US") + .argument("--posix") + .argument("-f", gawkFile("posix_compare.awk")) + .expectLines(gawkPath("posix_compare.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_prdupval() throws Exception { + AwkTestSupport + .cliTest("GAWK prdupval") + .argument("-f", gawkFile("prdupval.awk")) + .stdin(gawkText("prdupval.in")) + .expectLines(gawkPath("prdupval.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_prec() throws Exception { + AwkTestSupport + .cliTest("GAWK prec") + .argument("-f", gawkFile("prec.awk")) + .expectLines(gawkPath("prec.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_printf0() throws Exception { + AwkTestSupport + .cliTest("GAWK printf0") + .argument("--posix") + .argument("-f", gawkFile("printf0.awk")) + .expectLines(gawkPath("printf0.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_printf1() throws Exception { + AwkTestSupport + .cliTest("GAWK printf1") + .argument("-f", gawkFile("printf1.awk")) + .expectLines(gawkPath("printf1.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_printfchar() throws Exception { + AwkTestSupport + .cliTest("GAWK printfchar") + .argument("-f", gawkFile("printfchar.awk")) + .expectLines(gawkPath("printfchar.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_prmarscl() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_prmreuse() throws Exception { + AwkTestSupport + .cliTest("GAWK prmreuse") + .argument("-f", gawkFile("prmreuse.awk")) + .expectLines(gawkPath("prmreuse.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_prt1eval() throws Exception { + AwkTestSupport + .cliTest("GAWK prt1eval") + .argument("-f", gawkFile("prt1eval.awk")) + .expectLines(gawkPath("prt1eval.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_prtoeval() throws Exception { + AwkTestSupport + .cliTest("GAWK prtoeval") + .argument("-f", gawkFile("prtoeval.awk")) + .expectLines(gawkPath("prtoeval.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_rand() throws Exception { + AwkTestSupport + .cliTest("GAWK rand") + .argument("-f", gawkFile("rand.awk")) + .expectLines(gawkPath("rand.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_randtest() throws Exception { + skip( + "Shell-script target generated by Maketests; the in-process Jawk harness does not execute external shell scripts."); + } + + @Test + public void test_range1() throws Exception { + AwkTestSupport + .cliTest("GAWK range1") + .argument("-f", gawkFile("range1.awk")) + .stdin(gawkText("range1.in")) + .expectLines(gawkPath("range1.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_range2() throws Exception { + AwkTestSupport + .cliTest("GAWK range2") + .argument("-f", gawkFile("range2.awk")) + .expectLines(gawkPath("range2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_readbuf() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_rebrackloc() throws Exception { + AwkTestSupport + .cliTest("GAWK rebrackloc") + .argument("-f", gawkFile("rebrackloc.awk")) + .stdin(gawkText("rebrackloc.in")) + .expectLines(gawkPath("rebrackloc.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_rebt8b1() throws Exception { + skip(NON_UTF8_EXPECTED_REASON); + } + + @Test + public void test_rebuild() throws Exception { + AwkTestSupport + .cliTest("GAWK rebuild") + .argument("-f", gawkFile("rebuild.awk")) + .stdin(gawkText("rebuild.in")) + .expectLines(gawkPath("rebuild.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_regeq() throws Exception { + AwkTestSupport + .cliTest("GAWK regeq") + .argument("-f", gawkFile("regeq.awk")) + .stdin(gawkText("regeq.in")) + .expectLines(gawkPath("regeq.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_regex3minus() throws Exception { + AwkTestSupport + .cliTest("GAWK regex3minus") + .argument("-f", gawkFile("regex3minus.awk")) + .expectLines(gawkPath("regex3minus.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_regexpbad() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_regexpbrack() throws Exception { + AwkTestSupport + .cliTest("GAWK regexpbrack") + .argument("-f", gawkFile("regexpbrack.awk")) + .stdin(gawkText("regexpbrack.in")) + .expectLines(gawkPath("regexpbrack.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_regexpbrack2() throws Exception { + AwkTestSupport + .cliTest("GAWK regexpbrack2") + .argument("-f", gawkFile("regexpbrack2.awk")) + .stdin(gawkText("regexpbrack2.in")) + .expectLines(gawkPath("regexpbrack2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_regexprange() throws Exception { + AwkTestSupport + .cliTest("GAWK regexprange") + .argument("-f", gawkFile("regexprange.awk")) + .expectLines(gawkPath("regexprange.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_regrange() throws Exception { + AwkTestSupport + .cliTest("GAWK regrange") + .argument("-f", gawkFile("regrange.awk")) + .expectLines(gawkPath("regrange.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_reindops() throws Exception { + AwkTestSupport + .cliTest("GAWK reindops") + .argument("-f", gawkFile("reindops.awk")) + .stdin(gawkText("reindops.in")) + .expectLines(gawkPath("reindops.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_reparse() throws Exception { + AwkTestSupport + .cliTest("GAWK reparse") + .argument("-f", gawkFile("reparse.awk")) + .stdin(gawkText("reparse.in")) + .expectLines(gawkPath("reparse.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_resplit() throws Exception { + AwkTestSupport + .cliTest("GAWK resplit") + .argument("-f", gawkFile("resplit.awk")) + .stdin(gawkText("resplit.in")) + .expectLines(gawkPath("resplit.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_rri1() throws Exception { + skip(NON_UTF8_STDIN_REASON); + } + + @Test + public void test_rs() throws Exception { + AwkTestSupport + .cliTest("GAWK rs") + .argument("-f", gawkFile("rs.awk")) + .stdin(gawkText("rs.in")) + .expectLines(gawkPath("rs.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_rscompat() throws Exception { + skip("gawk's --traditional mode is not implemented by Jawk."); + } + + @Test + public void test_rsnul1nl() throws Exception { + AwkTestSupport + .cliTest("GAWK rsnul1nl") + .argument("-f", gawkFile("rsnul1nl.awk")) + .stdin(gawkText("rsnul1nl.in")) + .expectLines(gawkPath("rsnul1nl.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_rsnullre() throws Exception { + AwkTestSupport + .cliTest("GAWK rsnullre") + .argument("-f", gawkFile("rsnullre.awk")) + .stdin(gawkText("rsnullre.in")) + .expectLines(gawkPath("rsnullre.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_rsnulw() throws Exception { + AwkTestSupport + .cliTest("GAWK rsnulw") + .argument("-f", gawkFile("rsnulw.awk")) + .stdin(gawkText("rsnulw.in")) + .expectLines(gawkPath("rsnulw.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_rstest1() throws Exception { + AwkTestSupport + .cliTest("GAWK rstest1") + .argument("-f", gawkFile("rstest1.awk")) + .expectLines(gawkPath("rstest1.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_rstest2() throws Exception { + AwkTestSupport + .cliTest("GAWK rstest2") + .argument("-f", gawkFile("rstest2.awk")) + .expectLines(gawkPath("rstest2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_rstest3() throws Exception { + AwkTestSupport + .cliTest("GAWK rstest3") + .argument("-f", gawkFile("rstest3.awk")) + .expectLines(gawkPath("rstest3.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_rstest4() throws Exception { + AwkTestSupport + .cliTest("GAWK rstest4") + .argument("-f", gawkFile("rstest4.awk")) + .expectLines(gawkPath("rstest4.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_rstest5() throws Exception { + AwkTestSupport + .cliTest("GAWK rstest5") + .argument("-f", gawkFile("rstest5.awk")) + .expectLines(gawkPath("rstest5.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_rswhite() throws Exception { + AwkTestSupport + .cliTest("GAWK rswhite") + .argument("-f", gawkFile("rswhite.awk")) + .stdin(gawkText("rswhite.in")) + .expectLines(gawkPath("rswhite.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_scalar() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_sclforin() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_sclifin() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_setrec0() throws Exception { + AwkTestSupport + .cliTest("GAWK setrec0") + .argument("-f", gawkFile("setrec0.awk")) + .stdin(gawkText("setrec0.in")) + .expectLines(gawkPath("setrec0.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_setrec1() throws Exception { + AwkTestSupport + .cliTest("GAWK setrec1") + .argument("-f", gawkFile("setrec1.awk")) + .expectLines(gawkPath("setrec1.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_sigpipe1() throws Exception { + AwkTestSupport + .cliTest("GAWK sigpipe1") + .argument("-f", gawkFile("sigpipe1.awk")) + .expectLines(gawkPath("sigpipe1.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_sortempty() throws Exception { + AwkTestSupport + .cliTest("GAWK sortempty") + .argument("-f", gawkFile("sortempty.awk")) + .expectLines(gawkPath("sortempty.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_sortglos() throws Exception { + AwkTestSupport + .cliTest("GAWK sortglos") + .argument("-f", gawkFile("sortglos.awk")) + .stdin(gawkText("sortglos.in")) + .expectLines(gawkPath("sortglos.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_splitargv() throws Exception { + AwkTestSupport + .cliTest("GAWK splitargv") + .argument("-f", gawkFile("splitargv.awk")) + .stdin(gawkText("splitargv.in")) + .expectLines(gawkPath("splitargv.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_splitarr() throws Exception { + AwkTestSupport + .cliTest("GAWK splitarr") + .argument("-f", gawkFile("splitarr.awk")) + .expectLines(gawkPath("splitarr.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_splitdef() throws Exception { + AwkTestSupport + .cliTest("GAWK splitdef") + .argument("-f", gawkFile("splitdef.awk")) + .expectLines(gawkPath("splitdef.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_splitvar() throws Exception { + AwkTestSupport + .cliTest("GAWK splitvar") + .argument("-f", gawkFile("splitvar.awk")) + .stdin(gawkText("splitvar.in")) + .expectLines(gawkPath("splitvar.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_splitwht() throws Exception { + AwkTestSupport + .cliTest("GAWK splitwht") + .argument("-f", gawkFile("splitwht.awk")) + .expectLines(gawkPath("splitwht.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_status_close() throws Exception { + AwkTestSupport + .cliTest("GAWK status-close") + .argument("-f", gawkFile("status-close.awk")) + .expectLines(gawkPath("status-close.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_strcat1() throws Exception { + AwkTestSupport + .cliTest("GAWK strcat1") + .argument("-f", gawkFile("strcat1.awk")) + .expectLines(gawkPath("strcat1.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_strfieldnum() throws Exception { + AwkTestSupport + .cliTest("GAWK strfieldnum") + .argument("-f", gawkFile("strfieldnum.awk")) + .stdin(gawkText("strfieldnum.in")) + .expectLines(gawkPath("strfieldnum.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_strnum1() throws Exception { + AwkTestSupport + .cliTest("GAWK strnum1") + .argument("-f", gawkFile("strnum1.awk")) + .expectLines(gawkPath("strnum1.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_strnum2() throws Exception { + AwkTestSupport + .cliTest("GAWK strnum2") + .argument("-f", gawkFile("strnum2.awk")) + .expectLines(gawkPath("strnum2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_strtod() throws Exception { + AwkTestSupport + .cliTest("GAWK strtod") + .argument("-f", gawkFile("strtod.awk")) + .stdin(gawkText("strtod.in")) + .expectLines(gawkPath("strtod.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_subamp() throws Exception { + AwkTestSupport + .cliTest("GAWK subamp") + .argument("--locale", "en-US") + .argument("-f", gawkFile("subamp.awk")) + .stdin(gawkText("subamp.in")) + .expectLines(gawkPath("subamp.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_subback() throws Exception { + AwkTestSupport + .cliTest("GAWK subback") + .argument("-f", gawkFile("subback.awk")) + .stdin(gawkText("subback.in")) + .expectLines(gawkPath("subback.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_subi18n() throws Exception { + AwkTestSupport + .cliTest("GAWK subi18n") + .argument("--locale", "en-US") + .argument("-f", gawkFile("subi18n.awk")) + .expectLines(gawkPath("subi18n.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_subsepnm() throws Exception { + AwkTestSupport + .cliTest("GAWK subsepnm") + .argument("-f", gawkFile("subsepnm.awk")) + .expectLines(gawkPath("subsepnm.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_subslash() throws Exception { + AwkTestSupport + .cliTest("GAWK subslash") + .argument("-f", gawkFile("subslash.awk")) + .expectLines(gawkPath("subslash.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_substr() throws Exception { + AwkTestSupport + .cliTest("GAWK substr") + .argument("-f", gawkFile("substr.awk")) + .expectLines(gawkPath("substr.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_swaplns() throws Exception { + AwkTestSupport + .cliTest("GAWK swaplns") + .argument("-f", gawkFile("swaplns.awk")) + .stdin(gawkText("swaplns.in")) + .expectLines(gawkPath("swaplns.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_synerr1() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_synerr2() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_synerr3() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_tailrecurse() throws Exception { + AwkTestSupport + .cliTest("GAWK tailrecurse") + .argument("-f", gawkFile("tailrecurse.awk")) + .expectLines(gawkPath("tailrecurse.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_tradanch() throws Exception { + skip("gawk's --traditional mode is not implemented by Jawk."); + } + + @Test + public void test_trailbs() throws Exception { + skip(NON_UTF8_EXPECTED_REASON); + } + + @Test + public void test_uninit2() throws Exception { + skip("gawk's --lint diagnostics are not implemented by Jawk."); + } + + @Test + public void test_uninit3() throws Exception { + skip("gawk's --lint diagnostics are not implemented by Jawk."); + } + + @Test + public void test_uninit4() throws Exception { + skip("gawk's --lint diagnostics are not implemented by Jawk."); + } + + @Test + public void test_uninit5() throws Exception { + skip("gawk's --lint diagnostics are not implemented by Jawk."); + } + + @Test + public void test_uninitialized() throws Exception { + skip("gawk's --lint diagnostics are not implemented by Jawk."); + } + + @Test + public void test_unterm() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_uparrfs() throws Exception { + AwkTestSupport + .cliTest("GAWK uparrfs") + .argument("-f", gawkFile("uparrfs.awk")) + .stdin(gawkText("uparrfs.in")) + .expectLines(gawkPath("uparrfs.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_uplus() throws Exception { + AwkTestSupport + .cliTest("GAWK uplus") + .argument("-f", gawkFile("uplus.awk")) + .expectLines(gawkPath("uplus.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_wideidx() throws Exception { + AwkTestSupport + .cliTest("GAWK wideidx") + .argument("--locale", "en-US") + .argument("-f", gawkFile("wideidx.awk")) + .stdin(gawkText("wideidx.in")) + .expectLines(gawkPath("wideidx.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_wideidx2() throws Exception { + AwkTestSupport + .cliTest("GAWK wideidx2") + .argument("--locale", "en-US") + .argument("-f", gawkFile("wideidx2.awk")) + .expectLines(gawkPath("wideidx2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_widesub() throws Exception { + AwkTestSupport + .cliTest("GAWK widesub") + .argument("--locale", "en-US") + .argument("-f", gawkFile("widesub.awk")) + .expectLines(gawkPath("widesub.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_widesub2() throws Exception { + AwkTestSupport + .cliTest("GAWK widesub2") + .argument("--locale", "en-US") + .argument("-f", gawkFile("widesub2.awk")) + .expectLines(gawkPath("widesub2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_widesub3() throws Exception { + AwkTestSupport + .cliTest("GAWK widesub3") + .argument("--locale", "en-US") + .argument("-f", gawkFile("widesub3.awk")) + .stdin(gawkText("widesub3.in")) + .expectLines(gawkPath("widesub3.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_widesub4() throws Exception { + AwkTestSupport + .cliTest("GAWK widesub4") + .argument("--locale", "en-US") + .argument("-f", gawkFile("widesub4.awk")) + .expectLines(gawkPath("widesub4.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_wjposer1() throws Exception { + AwkTestSupport + .cliTest("GAWK wjposer1") + .argument("-f", gawkFile("wjposer1.awk")) + .stdin(gawkText("wjposer1.in")) + .expectLines(gawkPath("wjposer1.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_zero2() throws Exception { + AwkTestSupport + .cliTest("GAWK zero2") + .argument("-f", gawkFile("zero2.awk")) + .expectLines(gawkPath("zero2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_zeroe0() throws Exception { + AwkTestSupport + .cliTest("GAWK zeroe0") + .argument("-f", gawkFile("zeroe0.awk")) + .expectLines(gawkPath("zeroe0.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_zeroflag() throws Exception { + AwkTestSupport + .cliTest("GAWK zeroflag") + .argument("-f", gawkFile("zeroflag.awk")) + .expectLines(gawkPath("zeroflag.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_fflush() throws Exception { + skip( + "Shell-script target generated by Maketests; the in-process Jawk harness does not execute external shell scripts."); + } + + @Test + public void test_getlnhd() throws Exception { + AwkTestSupport + .cliTest("GAWK getlnhd") + .argument("-f", gawkFile("getlnhd.awk")) + .expectLines(gawkPath("getlnhd.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_localenl() throws Exception { + skip( + "Shell-script target generated by Maketests; the in-process Jawk harness does not execute external shell scripts."); + } + + @Test + public void test_rtlen() throws Exception { + skip( + "Shell-script target generated by Maketests; the in-process Jawk harness does not execute external shell scripts."); + } + + @Test + public void test_rtlen01() throws Exception { + skip( + "Shell-script target generated by Maketests; the in-process Jawk harness does not execute external shell scripts."); + } + + @Test + public void test_aadelete1() throws Exception { + AwkTestSupport + .cliTest("GAWK aadelete1") + .argument("-f", gawkFile("aadelete1.awk")) + .expectLines(gawkPath("aadelete1.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_aadelete2() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_aarray1() throws Exception { + AwkTestSupport + .cliTest("GAWK aarray1") + .argument("-f", gawkFile("aarray1.awk")) + .expectLines(gawkPath("aarray1.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_aasort() throws Exception { + AwkTestSupport + .cliTest("GAWK aasort") + .argument("-f", gawkFile("aasort.awk")) + .expectLines(gawkPath("aasort.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_aasorti() throws Exception { + AwkTestSupport + .cliTest("GAWK aasorti") + .argument("-f", gawkFile("aasorti.awk")) + .expectLines(gawkPath("aasorti.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_arraysort() throws Exception { + AwkTestSupport + .cliTest("GAWK arraysort") + .argument("-f", gawkFile("arraysort.awk")) + .expectLines(gawkPath("arraysort.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_arraysort2() throws Exception { + AwkTestSupport + .cliTest("GAWK arraysort2") + .argument("-f", gawkFile("arraysort2.awk")) + .expectLines(gawkPath("arraysort2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_arraytype() throws Exception { + AwkTestSupport + .cliTest("GAWK arraytype") + .argument("-f", gawkFile("arraytype.awk")) + .expectLines(gawkPath("arraytype.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_asortbool() throws Exception { + AwkTestSupport + .cliTest("GAWK asortbool") + .argument("-f", gawkFile("asortbool.awk")) + .expectLines(gawkPath("asortbool.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_backw() throws Exception { + AwkTestSupport + .cliTest("GAWK backw") + .argument("-f", gawkFile("backw.awk")) + .stdin(gawkText("backw.in")) + .expectLines(gawkPath("backw.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_asortsymtab() throws Exception { + AwkTestSupport + .cliTest("GAWK asortsymtab") + .argument("-f", gawkFile("asortsymtab.awk")) + .expectLines(gawkPath("asortsymtab.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_clos1way() throws Exception { + AwkTestSupport + .cliTest("GAWK clos1way") + .argument("-f", gawkFile("clos1way.awk")) + .expectLines(gawkPath("clos1way.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_clos1way2() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_clos1way3() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_clos1way4() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_clos1way5() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_clos1way6() throws Exception { + AwkTestSupport + .cliTest("GAWK clos1way6") + .argument("-f", gawkFile("clos1way6.awk")) + .expectLines(gawkPath("clos1way6.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_commas() throws Exception { + AwkTestSupport + .cliTest("GAWK commas") + .argument("--locale", "en-US") + .argument("-f", gawkFile("commas.awk")) + .expectLines(gawkPath("commas.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_crlf() throws Exception { + AwkTestSupport + .cliTest("GAWK crlf") + .argument("-f", gawkFile("crlf.awk")) + .expectLines(gawkPath("crlf.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_csv1() throws Exception { + skip("gawk's --csv mode is not implemented by Jawk."); + } + + @Test + public void test_csv2() throws Exception { + skip("gawk's --csv mode is not implemented by Jawk."); + } + + @Test + public void test_csv3() throws Exception { + skip("gawk's --csv mode is not implemented by Jawk."); + } + + @Test + public void test_csvodd() throws Exception { + skip("gawk's --csv mode is not implemented by Jawk."); + } + + @Test + public void test_dbugeval2() throws Exception { + skip("gawk's --debug mode is not implemented by Jawk."); + } + + @Test + public void test_dbugeval3() throws Exception { + skip("gawk's --debug mode is not implemented by Jawk."); + } + + @Test + public void test_dbugeval4() throws Exception { + skip("gawk's --debug mode is not implemented by Jawk."); + } + + @Test + public void test_dbugtypedre1() throws Exception { + skip("gawk's --debug mode is not implemented by Jawk."); + } + + @Test + public void test_dbugtypedre2() throws Exception { + skip("gawk's --debug mode is not implemented by Jawk."); + } + + @Test + public void test_delsub() throws Exception { + AwkTestSupport + .cliTest("GAWK delsub") + .argument("-f", gawkFile("delsub.awk")) + .expectLines(gawkPath("delsub.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_dfacheck1() throws Exception { + AwkTestSupport + .cliTest("GAWK dfacheck1") + .argument("-f", gawkFile("dfacheck1.awk")) + .stdin(gawkText("dfacheck1.in")) + .expectLines(gawkPath("dfacheck1.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_elemnew1() throws Exception { + AwkTestSupport + .cliTest("GAWK elemnew1") + .argument("-f", gawkFile("elemnew1.awk")) + .expectLines(gawkPath("elemnew1.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_elemnew2() throws Exception { + AwkTestSupport + .cliTest("GAWK elemnew2") + .argument("-f", gawkFile("elemnew2.awk")) + .expectLines(gawkPath("elemnew2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_elemnew3() throws Exception { + AwkTestSupport + .cliTest("GAWK elemnew3") + .argument("-f", gawkFile("elemnew3.awk")) + .expectLines(gawkPath("elemnew3.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_exit() throws Exception { + skip( + "Shell-script target generated by Maketests; the in-process Jawk harness does not execute external shell scripts."); + } + + @Test + public void test_fieldwdth() throws Exception { + AwkTestSupport + .cliTest("GAWK fieldwdth") + .argument("-f", gawkFile("fieldwdth.awk")) + .stdin(gawkText("fieldwdth.in")) + .expectLines(gawkPath("fieldwdth.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_forcenum() throws Exception { + AwkTestSupport + .cliTest("GAWK forcenum") + .argument("-f", gawkFile("forcenum.awk")) + .expectLines(gawkPath("forcenum.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_fpat1() throws Exception { + AwkTestSupport + .cliTest("GAWK fpat1") + .argument("-f", gawkFile("fpat1.awk")) + .stdin(gawkText("fpat1.in")) + .expectLines(gawkPath("fpat1.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_fpat2() throws Exception { + AwkTestSupport + .cliTest("GAWK fpat2") + .argument("-f", gawkFile("fpat2.awk")) + .expectLines(gawkPath("fpat2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_fpat3() throws Exception { + AwkTestSupport + .cliTest("GAWK fpat3") + .argument("-f", gawkFile("fpat3.awk")) + .stdin(gawkText("fpat3.in")) + .expectLines(gawkPath("fpat3.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_fpat4() throws Exception { + AwkTestSupport + .cliTest("GAWK fpat4") + .argument("-f", gawkFile("fpat4.awk")) + .expectLines(gawkPath("fpat4.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_fpat5() throws Exception { + AwkTestSupport + .cliTest("GAWK fpat5") + .argument("-f", gawkFile("fpat5.awk")) + .stdin(gawkText("fpat5.in")) + .expectLines(gawkPath("fpat5.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_fpat6() throws Exception { + AwkTestSupport + .cliTest("GAWK fpat6") + .argument("-f", gawkFile("fpat6.awk")) + .stdin(gawkText("fpat6.in")) + .expectLines(gawkPath("fpat6.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_fpat7() throws Exception { + AwkTestSupport + .cliTest("GAWK fpat7") + .argument("-f", gawkFile("fpat7.awk")) + .stdin(gawkText("fpat7.in")) + .expectLines(gawkPath("fpat7.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_fpat8() throws Exception { + AwkTestSupport + .cliTest("GAWK fpat8") + .argument("-f", gawkFile("fpat8.awk")) + .stdin(gawkText("fpat8.in")) + .expectLines(gawkPath("fpat8.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_fpat9() throws Exception { + AwkTestSupport + .cliTest("GAWK fpat9") + .argument("-f", gawkFile("fpat9.awk")) + .stdin(gawkText("fpat9.in")) + .expectLines(gawkPath("fpat9.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_fpatnull() throws Exception { + AwkTestSupport + .cliTest("GAWK fpatnull") + .argument("-f", gawkFile("fpatnull.awk")) + .stdin(gawkText("fpatnull.in")) + .expectLines(gawkPath("fpatnull.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_fsfwfs() throws Exception { + AwkTestSupport + .cliTest("GAWK fsfwfs") + .argument("-f", gawkFile("fsfwfs.awk")) + .stdin(gawkText("fsfwfs.in")) + .expectLines(gawkPath("fsfwfs.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_functab1() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_functab2() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_functab3() throws Exception { + AwkTestSupport + .cliTest("GAWK functab3") + .argument("-f", gawkFile("functab3.awk")) + .expectLines(gawkPath("functab3.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_functab6() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_funlen() throws Exception { + AwkTestSupport + .cliTest("GAWK funlen") + .argument("-f", gawkFile("funlen.awk")) + .stdin(gawkText("funlen.in")) + .expectLines(gawkPath("funlen.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_fwtest() throws Exception { + AwkTestSupport + .cliTest("GAWK fwtest") + .argument("-f", gawkFile("fwtest.awk")) + .stdin(gawkText("fwtest.in")) + .expectLines(gawkPath("fwtest.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_fwtest2() throws Exception { + AwkTestSupport + .cliTest("GAWK fwtest2") + .argument("-f", gawkFile("fwtest2.awk")) + .stdin(gawkText("fwtest2.in")) + .expectLines(gawkPath("fwtest2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_fwtest3() throws Exception { + AwkTestSupport + .cliTest("GAWK fwtest3") + .argument("-f", gawkFile("fwtest3.awk")) + .stdin(gawkText("fwtest3.in")) + .expectLines(gawkPath("fwtest3.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_fwtest4() throws Exception { + AwkTestSupport + .cliTest("GAWK fwtest4") + .argument("-f", gawkFile("fwtest4.awk")) + .stdin(gawkText("fwtest4.in")) + .expectLines(gawkPath("fwtest4.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_fwtest5() throws Exception { + AwkTestSupport + .cliTest("GAWK fwtest5") + .argument("-f", gawkFile("fwtest5.awk")) + .stdin(gawkText("fwtest5.in")) + .expectLines(gawkPath("fwtest5.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_fwtest6() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_fwtest7() throws Exception { + AwkTestSupport + .cliTest("GAWK fwtest7") + .argument("-f", gawkFile("fwtest7.awk")) + .stdin(gawkText("fwtest7.in")) + .expectLines(gawkPath("fwtest7.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_fwtest8() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_gensub() throws Exception { + AwkTestSupport + .cliTest("GAWK gensub") + .argument("-f", gawkFile("gensub.awk")) + .stdin(gawkText("gensub.in")) + .expectLines(gawkPath("gensub.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_gensub2() throws Exception { + AwkTestSupport + .cliTest("GAWK gensub2") + .argument("-f", gawkFile("gensub2.awk")) + .expectLines(gawkPath("gensub2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_gensub3() throws Exception { + AwkTestSupport + .cliTest("GAWK gensub3") + .argument("-f", gawkFile("gensub3.awk")) + .stdin(gawkText("gensub3.in")) + .expectLines(gawkPath("gensub3.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_gensub4() throws Exception { + AwkTestSupport + .cliTest("GAWK gensub4") + .argument("-f", gawkFile("gensub4.awk")) + .expectLines(gawkPath("gensub4.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_getlndir() throws Exception { + AwkTestSupport + .cliTest("GAWK getlndir") + .argument("-f", gawkFile("getlndir.awk")) + .expectLines(gawkPath("getlndir.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_gnuops2() throws Exception { + AwkTestSupport + .cliTest("GAWK gnuops2") + .argument("-f", gawkFile("gnuops2.awk")) + .expectLines(gawkPath("gnuops2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_gnuops3() throws Exception { + AwkTestSupport + .cliTest("GAWK gnuops3") + .argument("-f", gawkFile("gnuops3.awk")) + .expectLines(gawkPath("gnuops3.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_gnureops() throws Exception { + AwkTestSupport + .cliTest("GAWK gnureops") + .argument("-f", gawkFile("gnureops.awk")) + .expectLines(gawkPath("gnureops.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_gsubind() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_icasefs() throws Exception { + AwkTestSupport + .cliTest("GAWK icasefs") + .argument("-f", gawkFile("icasefs.awk")) + .expectLines(gawkPath("icasefs.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_icasers() throws Exception { + AwkTestSupport + .cliTest("GAWK icasers") + .argument("-f", gawkFile("icasers.awk")) + .stdin(gawkText("icasers.in")) + .expectLines(gawkPath("icasers.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_id() throws Exception { + AwkTestSupport + .cliTest("GAWK id") + .argument("-f", gawkFile("id.awk")) + .expectLines(gawkPath("id.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_igncdym() throws Exception { + AwkTestSupport + .cliTest("GAWK igncdym") + .argument("-f", gawkFile("igncdym.awk")) + .stdin(gawkText("igncdym.in")) + .expectLines(gawkPath("igncdym.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_igncfs() throws Exception { + AwkTestSupport + .cliTest("GAWK igncfs") + .argument("-f", gawkFile("igncfs.awk")) + .stdin(gawkText("igncfs.in")) + .expectLines(gawkPath("igncfs.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_ignrcas2() throws Exception { + AwkTestSupport + .cliTest("GAWK ignrcas2") + .argument("--locale", "en-US") + .argument("-f", gawkFile("ignrcas2.awk")) + .expectLines(gawkPath("ignrcas2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_ignrcas4() throws Exception { + AwkTestSupport + .cliTest("GAWK ignrcas4") + .argument("-f", gawkFile("ignrcas4.awk")) + .expectLines(gawkPath("ignrcas4.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_ignrcase() throws Exception { + AwkTestSupport + .cliTest("GAWK ignrcase") + .argument("-f", gawkFile("ignrcase.awk")) + .stdin(gawkText("ignrcase.in")) + .expectLines(gawkPath("ignrcase.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_include() throws Exception { + AwkTestSupport + .cliTest("GAWK include") + .argument("-f", gawkFile("include.awk")) + .expectLines(gawkPath("include.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_indirectbuiltin() throws Exception { + AwkTestSupport + .cliTest("GAWK indirectbuiltin") + .argument("-f", gawkFile("indirectbuiltin.awk")) + .expectLines(gawkPath("indirectbuiltin.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_indirectcall() throws Exception { + AwkTestSupport + .cliTest("GAWK indirectcall") + .argument("-f", gawkFile("indirectcall.awk")) + .stdin(gawkText("indirectcall.in")) + .expectLines(gawkPath("indirectcall.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_indirectcall2() throws Exception { + AwkTestSupport + .cliTest("GAWK indirectcall2") + .argument("-f", gawkFile("indirectcall2.awk")) + .expectLines(gawkPath("indirectcall2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_indirectcall3() throws Exception { + AwkTestSupport + .cliTest("GAWK indirectcall3") + .argument("-f", gawkFile("indirectcall3.awk")) + .expectLines(gawkPath("indirectcall3.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_intarray() throws Exception { + AwkTestSupport + .cliTest("GAWK intarray") + .argument("-f", gawkFile("intarray.awk")) + .expectLines(gawkPath("intarray.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_isarrayunset() throws Exception { + AwkTestSupport + .cliTest("GAWK isarrayunset") + .argument("-f", gawkFile("isarrayunset.awk")) + .expectLines(gawkPath("isarrayunset.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_lint() throws Exception { + AwkTestSupport + .cliTest("GAWK lint") + .argument("-f", gawkFile("lint.awk")) + .expectLines(gawkPath("lint.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_lintexp() throws Exception { + skip("gawk's --lint diagnostics are not implemented by Jawk."); + } + + @Test + public void test_lintindex() throws Exception { + skip("gawk's --lint diagnostics are not implemented by Jawk."); + } + + @Test + public void test_lintint() throws Exception { + skip("gawk's --lint diagnostics are not implemented by Jawk."); + } + + @Test + public void test_lintlength() throws Exception { + skip("gawk's --lint diagnostics are not implemented by Jawk."); + } + + @Test + public void test_lintold() throws Exception { + skip("gawk's --lint-old diagnostics are not implemented by Jawk."); + } + + @Test + public void test_lintplus() throws Exception { + skip("gawk's --lint diagnostics are not implemented by Jawk."); + } + + @Test + public void test_lintset() throws Exception { + AwkTestSupport + .cliTest("GAWK lintset") + .argument("-f", gawkFile("lintset.awk")) + .expectLines(gawkPath("lintset.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_lintwarn() throws Exception { + skip("gawk's --lint diagnostics are not implemented by Jawk."); + } + + @Test + public void test_match1() throws Exception { + AwkTestSupport + .cliTest("GAWK match1") + .argument("-f", gawkFile("match1.awk")) + .expectLines(gawkPath("match1.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_match2() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_match3() throws Exception { + AwkTestSupport + .cliTest("GAWK match3") + .argument("-f", gawkFile("match3.awk")) + .stdin(gawkText("match3.in")) + .expectLines(gawkPath("match3.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_mbstr1() throws Exception { + AwkTestSupport + .cliTest("GAWK mbstr1") + .argument("--locale", "en-US") + .argument("-f", gawkFile("mbstr1.awk")) + .expectLines(gawkPath("mbstr1.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_mbstr2() throws Exception { + skip(NON_UTF8_STDIN_REASON); + } + + @Test + public void test_mdim1() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_mdim2() throws Exception { + AwkTestSupport + .cliTest("GAWK mdim2") + .argument("-f", gawkFile("mdim2.awk")) + .expectLines(gawkPath("mdim2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_mdim3() throws Exception { + AwkTestSupport + .cliTest("GAWK mdim3") + .argument("-f", gawkFile("mdim3.awk")) + .expectLines(gawkPath("mdim3.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_mdim4() throws Exception { + AwkTestSupport + .cliTest("GAWK mdim4") + .argument("-f", gawkFile("mdim4.awk")) + .stdin(gawkText("mdim4.in")) + .expectLines(gawkPath("mdim4.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_mdim5() throws Exception { + AwkTestSupport + .cliTest("GAWK mdim5") + .argument("-f", gawkFile("mdim5.awk")) + .expectLines(gawkPath("mdim5.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_mdim6() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_mdim7() throws Exception { + AwkTestSupport + .cliTest("GAWK mdim7") + .argument("-f", gawkFile("mdim7.awk")) + .expectLines(gawkPath("mdim7.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_mdim8() throws Exception { + AwkTestSupport + .cliTest("GAWK mdim8") + .argument("-f", gawkFile("mdim8.awk")) + .stdin(gawkText("mdim8.in")) + .expectLines(gawkPath("mdim8.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_mktime() throws Exception { + AwkTestSupport + .cliTest("GAWK mktime") + .argument("-f", gawkFile("mktime.awk")) + .stdin(gawkText("mktime.in")) + .expectLines(gawkPath("mktime.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_modifiers() throws Exception { + skip( + "Shell-script target generated by Maketests; the in-process Jawk harness does not execute external shell scripts."); + } + + @Test + public void test_muldimposix() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_nastyparm() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_next() throws Exception { + skip( + "Shell-script target generated by Maketests; the in-process Jawk harness does not execute external shell scripts."); + } + + @Test + public void test_nondec() throws Exception { + AwkTestSupport + .cliTest("GAWK nondec") + .argument("-f", gawkFile("nondec.awk")) + .expectLines(gawkPath("nondec.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_nondec2() throws Exception { + AwkTestSupport + .cliTest("GAWK nondec2") + .argument("-f", gawkFile("nondec2.awk")) + .expectLines(gawkPath("nondec2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_nonfatal2() throws Exception { + AwkTestSupport + .cliTest("GAWK nonfatal2") + .argument("-f", gawkFile("nonfatal2.awk")) + .expectLines(gawkPath("nonfatal2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_nonfatal3() throws Exception { + AwkTestSupport + .cliTest("GAWK nonfatal3") + .argument("-f", gawkFile("nonfatal3.awk")) + .expectLines(gawkPath("nonfatal3.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_nsbad() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_nsbad2() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_nsbad3() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_nsforloop() throws Exception { + AwkTestSupport + .cliTest("GAWK nsforloop") + .argument("-f", gawkFile("nsforloop.awk")) + .expectLines(gawkPath("nsforloop.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_nsfuncrecurse() throws Exception { + AwkTestSupport + .cliTest("GAWK nsfuncrecurse") + .argument("-f", gawkFile("nsfuncrecurse.awk")) + .expectLines(gawkPath("nsfuncrecurse.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_nsindirect1() throws Exception { + AwkTestSupport + .cliTest("GAWK nsindirect1") + .argument("-f", gawkFile("nsindirect1.awk")) + .expectLines(gawkPath("nsindirect1.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_nsindirect2() throws Exception { + AwkTestSupport + .cliTest("GAWK nsindirect2") + .argument("-f", gawkFile("nsindirect2.awk")) + .expectLines(gawkPath("nsindirect2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_nsprof1() throws Exception { + skip("gawk's --pretty-print mode is not implemented by Jawk."); + } + + @Test + public void test_nsprof2() throws Exception { + skip("gawk's --pretty-print mode is not implemented by Jawk."); + } + + @Test + public void test_octdec() throws Exception { + AwkTestSupport + .cliTest("GAWK octdec") + .argument("-f", gawkFile("octdec.awk")) + .expectLines(gawkPath("octdec.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_patsplit() throws Exception { + AwkTestSupport + .cliTest("GAWK patsplit") + .argument("-f", gawkFile("patsplit.awk")) + .expectLines(gawkPath("patsplit.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_posix() throws Exception { + AwkTestSupport + .cliTest("GAWK posix") + .argument("-f", gawkFile("posix.awk")) + .stdin(gawkText("posix.in")) + .expectLines(gawkPath("posix.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_printfbad1() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_printfbad3() throws Exception { + AwkTestSupport + .cliTest("GAWK printfbad3") + .argument("-f", gawkFile("printfbad3.awk")) + .expectLines(gawkPath("printfbad3.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_printfbad4() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_printhuge() throws Exception { + skip(NON_UTF8_EXPECTED_REASON); + } + + @Test + public void test_procinfs() throws Exception { + AwkTestSupport + .cliTest("GAWK procinfs") + .argument("-f", gawkFile("procinfs.awk")) + .expectLines(gawkPath("procinfs.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_profile4() throws Exception { + skip("gawk's --pretty-print mode is not implemented by Jawk."); + } + + @Test + public void test_profile8() throws Exception { + skip("gawk's --pretty-print mode is not implemented by Jawk."); + } + + @Test + public void test_profile9() throws Exception { + skip("gawk's --pretty-print mode is not implemented by Jawk."); + } + + @Test + public void test_profile10() throws Exception { + skip("gawk's --pretty-print mode is not implemented by Jawk."); + } + + @Test + public void test_profile11() throws Exception { + skip("gawk's --pretty-print mode is not implemented by Jawk."); + } + + @Test + public void test_profile13() throws Exception { + skip("gawk's --pretty-print mode is not implemented by Jawk."); + } + + @Test + public void test_profile14() throws Exception { + skip("gawk's --pretty-print mode is not implemented by Jawk."); + } + + @Test + public void test_profile15() throws Exception { + skip("gawk's --pretty-print mode is not implemented by Jawk."); + } + + @Test + public void test_profile16() throws Exception { + skip("gawk's --pretty-print mode is not implemented by Jawk."); + } + + @Test + public void test_profile17() throws Exception { + skip("gawk's --pretty-print mode is not implemented by Jawk."); + } + + @Test + public void test_regexsub() throws Exception { + AwkTestSupport + .cliTest("GAWK regexsub") + .argument("-f", gawkFile("regexsub.awk")) + .expectLines(gawkPath("regexsub.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_regnul1() throws Exception { + AwkTestSupport + .cliTest("GAWK regnul1") + .argument("-f", gawkFile("regnul1.awk")) + .expectLines(gawkPath("regnul1.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_regnul2() throws Exception { + AwkTestSupport + .cliTest("GAWK regnul2") + .argument("-f", gawkFile("regnul2.awk")) + .expectLines(gawkPath("regnul2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_regx8bit() throws Exception { + skip(NON_UTF8_EXPECTED_REASON); + } + + @Test + public void test_reint() throws Exception { + AwkTestSupport + .cliTest("GAWK reint") + .argument("-f", gawkFile("reint.awk")) + .stdin(gawkText("reint.in")) + .expectLines(gawkPath("reint.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_reint2() throws Exception { + AwkTestSupport + .cliTest("GAWK reint2") + .argument("--locale", "en-US") + .argument("-f", gawkFile("reint2.awk")) + .stdin(gawkText("reint2.in")) + .expectLines(gawkPath("reint2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_rsgetline() throws Exception { + AwkTestSupport + .cliTest("GAWK rsgetline") + .argument("-f", gawkFile("rsgetline.awk")) + .stdin(gawkText("rsgetline.in")) + .expectLines(gawkPath("rsgetline.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_rsstart1() throws Exception { + AwkTestSupport + .cliTest("GAWK rsstart1") + .argument("-f", gawkFile("rsstart1.awk")) + .stdin(gawkText("rsstart1.in")) + .expectLines(gawkPath("rsstart1.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_rsstart2() throws Exception { + AwkTestSupport + .cliTest("GAWK rsstart2") + .argument("-f", gawkFile("rsstart2.awk")) + .stdin(gawkText("rsstart2.in")) + .expectLines(gawkPath("rsstart2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_rstest6() throws Exception { + AwkTestSupport + .cliTest("GAWK rstest6") + .argument("-f", gawkFile("rstest6.awk")) + .stdin(gawkText("rstest6.in")) + .expectLines(gawkPath("rstest6.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_sandbox1() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_shadow() throws Exception { + skip("gawk's --lint diagnostics are not implemented by Jawk."); + } + + @Test + public void test_shadowbuiltin() throws Exception { + AwkTestSupport + .cliTest("GAWK shadowbuiltin") + .argument("-f", gawkFile("shadowbuiltin.awk")) + .expectLines(gawkPath("shadowbuiltin.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_sortfor() throws Exception { + AwkTestSupport + .cliTest("GAWK sortfor") + .argument("-f", gawkFile("sortfor.awk")) + .stdin(gawkText("sortfor.in")) + .expectLines(gawkPath("sortfor.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_sortfor2() throws Exception { + AwkTestSupport + .cliTest("GAWK sortfor2") + .argument("-f", gawkFile("sortfor2.awk")) + .stdin(gawkText("sortfor2.in")) + .expectLines(gawkPath("sortfor2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_sortu() throws Exception { + AwkTestSupport + .cliTest("GAWK sortu") + .argument("-f", gawkFile("sortu.awk")) + .expectLines(gawkPath("sortu.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_split_after_fpat() throws Exception { + AwkTestSupport + .cliTest("GAWK split_after_fpat") + .argument("-f", gawkFile("split_after_fpat.awk")) + .stdin(gawkText("split_after_fpat.in")) + .expectLines(gawkPath("split_after_fpat.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_splitarg4() throws Exception { + AwkTestSupport + .cliTest("GAWK splitarg4") + .argument("-f", gawkFile("splitarg4.awk")) + .stdin(gawkText("splitarg4.in")) + .expectLines(gawkPath("splitarg4.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_strftfld() throws Exception { + AwkTestSupport + .cliTest("GAWK strftfld") + .argument("-f", gawkFile("strftfld.awk")) + .stdin(gawkText("strftfld.in")) + .expectLines(gawkPath("strftfld.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_strtonum() throws Exception { + AwkTestSupport + .cliTest("GAWK strtonum") + .argument("-f", gawkFile("strtonum.awk")) + .expectLines(gawkPath("strtonum.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_strtonum1() throws Exception { + AwkTestSupport + .cliTest("GAWK strtonum1") + .argument("-f", gawkFile("strtonum1.awk")) + .expectLines(gawkPath("strtonum1.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_stupid1() throws Exception { + AwkTestSupport + .cliTest("GAWK stupid1") + .argument("-f", gawkFile("stupid1.awk")) + .expectLines(gawkPath("stupid1.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_stupid2() throws Exception { + AwkTestSupport + .cliTest("GAWK stupid2") + .argument("-f", gawkFile("stupid2.awk")) + .expectLines(gawkPath("stupid2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_stupid3() throws Exception { + AwkTestSupport + .cliTest("GAWK stupid3") + .argument("-f", gawkFile("stupid3.awk")) + .expectLines(gawkPath("stupid3.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_stupid4() throws Exception { + AwkTestSupport + .cliTest("GAWK stupid4") + .argument("-f", gawkFile("stupid4.awk")) + .expectLines(gawkPath("stupid4.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_stupid5() throws Exception { + AwkTestSupport + .cliTest("GAWK stupid5") + .argument("-f", gawkFile("stupid5.awk")) + .expectLines(gawkPath("stupid5.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_switch2() throws Exception { + AwkTestSupport + .cliTest("GAWK switch2") + .argument("-f", gawkFile("switch2.awk")) + .expectLines(gawkPath("switch2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_symtab1() throws Exception { + AwkTestSupport + .cliTest("GAWK symtab1") + .argument("-f", gawkFile("symtab1.awk")) + .expectLines(gawkPath("symtab1.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_symtab2() throws Exception { + AwkTestSupport + .cliTest("GAWK symtab2") + .argument("-f", gawkFile("symtab2.awk")) + .expectLines(gawkPath("symtab2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_symtab3() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_symtab4() throws Exception { + AwkTestSupport + .cliTest("GAWK symtab4") + .argument("-f", gawkFile("symtab4.awk")) + .stdin(gawkText("symtab4.in")) + .expectLines(gawkPath("symtab4.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_symtab5() throws Exception { + AwkTestSupport + .cliTest("GAWK symtab5") + .argument("-f", gawkFile("symtab5.awk")) + .stdin(gawkText("symtab5.in")) + .expectLines(gawkPath("symtab5.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_symtab7() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_symtab10() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_symtab11() throws Exception { + AwkTestSupport + .cliTest("GAWK symtab11") + .argument("-f", gawkFile("symtab11.awk")) + .expectLines(gawkPath("symtab11.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_symtab12() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_timeout() throws Exception { + AwkTestSupport + .cliTest("GAWK timeout") + .argument("-f", gawkFile("timeout.awk")) + .expectLines(gawkPath("timeout.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_typedregex1() throws Exception { + AwkTestSupport + .cliTest("GAWK typedregex1") + .argument("-f", gawkFile("typedregex1.awk")) + .expectLines(gawkPath("typedregex1.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_typedregex2() throws Exception { + AwkTestSupport + .cliTest("GAWK typedregex2") + .argument("-f", gawkFile("typedregex2.awk")) + .expectLines(gawkPath("typedregex2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_typedregex3() throws Exception { + AwkTestSupport + .cliTest("GAWK typedregex3") + .argument("-f", gawkFile("typedregex3.awk")) + .expectLines(gawkPath("typedregex3.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_typedregex5() throws Exception { + AwkTestSupport + .cliTest("GAWK typedregex5") + .argument("-f", gawkFile("typedregex5.awk")) + .stdin(gawkText("typedregex5.in")) + .expectLines(gawkPath("typedregex5.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_typedregex6() throws Exception { + AwkTestSupport + .cliTest("GAWK typedregex6") + .argument("-f", gawkFile("typedregex6.awk")) + .stdin(gawkText("typedregex6.in")) + .expectLines(gawkPath("typedregex6.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_typeof1() throws Exception { + AwkTestSupport + .cliTest("GAWK typeof1") + .argument("-f", gawkFile("typeof1.awk")) + .expectLines(gawkPath("typeof1.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_typeof2() throws Exception { + AwkTestSupport + .cliTest("GAWK typeof2") + .argument("-f", gawkFile("typeof2.awk")) + .expectLines(gawkPath("typeof2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_typeof3() throws Exception { + AwkTestSupport + .cliTest("GAWK typeof3") + .argument("-f", gawkFile("typeof3.awk")) + .expectLines(gawkPath("typeof3.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_typeof4() throws Exception { + AwkTestSupport + .cliTest("GAWK typeof4") + .argument("-f", gawkFile("typeof4.awk")) + .expectLines(gawkPath("typeof4.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_typeof5() throws Exception { + AwkTestSupport + .cliTest("GAWK typeof5") + .argument("-f", gawkFile("typeof5.awk")) + .stdin(gawkText("typeof5.in")) + .expectLines(gawkPath("typeof5.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_typeof6() throws Exception { + AwkTestSupport + .cliTest("GAWK typeof6") + .argument("-f", gawkFile("typeof6.awk")) + .expectLines(gawkPath("typeof6.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_unicode1() throws Exception { + AwkTestSupport + .cliTest("GAWK unicode1") + .argument("--locale", "en-US") + .argument("-f", gawkFile("unicode1.awk")) + .expectLines(gawkPath("unicode1.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_double1() throws Exception { + AwkTestSupport + .cliTest("GAWK double1") + .argument("-f", gawkFile("double1.awk")) + .expectLines(gawkPath("double1.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_double2() throws Exception { + AwkTestSupport + .cliTest("GAWK double2") + .argument("-f", gawkFile("double2.awk")) + .expectLines(gawkPath("double2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_inf_nan_torture() throws Exception { + AwkTestSupport + .cliTest("GAWK inf-nan-torture") + .argument("-f", gawkFile("inf-nan-torture.awk")) + .stdin(gawkText("inf-nan-torture.in")) + .expectLines(gawkPath("inf-nan-torture.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_intformat() throws Exception { + AwkTestSupport + .cliTest("GAWK intformat") + .argument("-f", gawkFile("intformat.awk")) + .expectLines(gawkPath("intformat.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_asort() throws Exception { + AwkTestSupport + .cliTest("GAWK asort") + .argument("-f", gawkFile("asort.awk")) + .expectLines(gawkPath("asort.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_asorti() throws Exception { + AwkTestSupport + .cliTest("GAWK asorti") + .argument("-f", gawkFile("asorti.awk")) + .expectLines(gawkPath("asorti.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_backbigs1() throws Exception { + skip(NON_UTF8_STDIN_REASON); + } + + @Test + public void test_backsmalls1() throws Exception { + AwkTestSupport + .cliTest("GAWK backsmalls1") + .argument("--locale", "en-US") + .argument("-f", gawkFile("backsmalls1.awk")) + .stdin(gawkText("backsmalls1.in")) + .expectLines(gawkPath("backsmalls1.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_backsmalls2() throws Exception { + AwkTestSupport + .cliTest("GAWK backsmalls2") + .argument("--locale", "en-US") + .argument("-f", gawkFile("backsmalls2.awk")) + .expectLines(gawkPath("backsmalls2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_fmttest() throws Exception { + AwkTestSupport + .cliTest("GAWK fmttest") + .argument("-f", gawkFile("fmttest.awk")) + .expectLines(gawkPath("fmttest.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_fnarydel() throws Exception { + AwkTestSupport + .cliTest("GAWK fnarydel") + .argument("-f", gawkFile("fnarydel.awk")) + .expectLines(gawkPath("fnarydel.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_fnparydl() throws Exception { + AwkTestSupport + .cliTest("GAWK fnparydl") + .argument("-f", gawkFile("fnparydl.awk")) + .expectLines(gawkPath("fnparydl.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_lc_num1() throws Exception { + AwkTestSupport + .cliTest("GAWK lc_num1") + .argument("--locale", "en-US") + .argument("-f", gawkFile("lc_num1.awk")) + .expectLines(gawkPath("lc_num1.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_mbfw1() throws Exception { + AwkTestSupport + .cliTest("GAWK mbfw1") + .argument("--locale", "en-US") + .argument("-f", gawkFile("mbfw1.awk")) + .stdin(gawkText("mbfw1.in")) + .expectLines(gawkPath("mbfw1.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_mbprintf1() throws Exception { + AwkTestSupport + .cliTest("GAWK mbprintf1") + .argument("--locale", "en-US") + .argument("-f", gawkFile("mbprintf1.awk")) + .stdin(gawkText("mbprintf1.in")) + .expectLines(gawkPath("mbprintf1.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_mbprintf2() throws Exception { + AwkTestSupport + .cliTest("GAWK mbprintf2") + .argument("--locale", "ja-JP") + .argument("-f", gawkFile("mbprintf2.awk")) + .expectLines(gawkPath("mbprintf2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_mbprintf3() throws Exception { + skip(NON_UTF8_EXPECTED_REASON); + } + + @Test + public void test_mbprintf4() throws Exception { + AwkTestSupport + .cliTest("GAWK mbprintf4") + .argument("--locale", "en-US") + .argument("-f", gawkFile("mbprintf4.awk")) + .stdin(gawkText("mbprintf4.in")) + .expectLines(gawkPath("mbprintf4.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_mtchi18n() throws Exception { + AwkTestSupport + .cliTest("GAWK mtchi18n") + .argument("--locale", "ru-RU") + .argument("-f", gawkFile("mtchi18n.awk")) + .stdin(gawkText("mtchi18n.in")) + .expectLines(gawkPath("mtchi18n.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_rebt8b2() throws Exception { + AwkTestSupport + .cliTest("GAWK rebt8b2") + .argument("-f", gawkFile("rebt8b2.awk")) + .expectLines(gawkPath("rebt8b2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_sort1() throws Exception { + AwkTestSupport + .cliTest("GAWK sort1") + .argument("-f", gawkFile("sort1.awk")) + .expectLines(gawkPath("sort1.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_sprintfc() throws Exception { + AwkTestSupport + .cliTest("GAWK sprintfc") + .argument("-f", gawkFile("sprintfc.awk")) + .stdin(gawkText("sprintfc.in")) + .expectLines(gawkPath("sprintfc.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_apiterm() throws Exception { + AwkTestSupport + .cliTest("GAWK apiterm") + .argument("-f", gawkFile("apiterm.awk")) + .stdin(gawkText("apiterm.in")) + .expectLines(gawkPath("apiterm.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_fnmatch() throws Exception { + AwkTestSupport + .cliTest("GAWK fnmatch") + .argument("-f", gawkFile("fnmatch.awk")) + .expectLines(gawkPath("fnmatch.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_fork() throws Exception { + AwkTestSupport + .cliTest("GAWK fork") + .argument("-f", gawkFile("fork.awk")) + .expectLines(gawkPath("fork.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_fork2() throws Exception { + AwkTestSupport + .cliTest("GAWK fork2") + .argument("-f", gawkFile("fork2.awk")) + .expectLines(gawkPath("fork2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_functab4() throws Exception { + AwkTestSupport + .cliTest("GAWK functab4") + .argument("-f", gawkFile("functab4.awk")) + .expectLines(gawkPath("functab4.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_functab5() throws Exception { + AwkTestSupport + .cliTest("GAWK functab5") + .argument("-f", gawkFile("functab5.awk")) + .expectLines(gawkPath("functab5.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_ordchr() throws Exception { + AwkTestSupport + .cliTest("GAWK ordchr") + .argument("-f", gawkFile("ordchr.awk")) + .expectLines(gawkPath("ordchr.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_revout() throws Exception { + AwkTestSupport + .cliTest("GAWK revout") + .argument("-f", gawkFile("revout.awk")) + .expectLines(gawkPath("revout.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_revtwoway() throws Exception { + AwkTestSupport + .cliTest("GAWK revtwoway") + .argument("-f", gawkFile("revtwoway.awk")) + .expectLines(gawkPath("revtwoway.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_rwarray() throws Exception { + AwkTestSupport + .cliTest("GAWK rwarray") + .argument("-f", gawkFile("rwarray.awk")) + .stdin(gawkText("rwarray.in")) + .expectLines(gawkPath("rwarray.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_time() throws Exception { + AwkTestSupport + .cliTest("GAWK time") + .argument("-f", gawkFile("time.awk")) + .expectLines(gawkPath("time.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_mpfrbigint() throws Exception { + skip("gawk's -M bignum mode is not implemented by Jawk."); + } + + @Test + public void test_mpfrbigint2() throws Exception { + skip("gawk's -M bignum mode is not implemented by Jawk."); + } + + @Test + public void test_mpfrcase() throws Exception { + skip("gawk's -M bignum mode is not implemented by Jawk."); + } + + @Test + public void test_mpfrcase2() throws Exception { + skip("gawk's -M bignum mode is not implemented by Jawk."); + } + + @Test + public void test_mpfrfield() throws Exception { + skip("gawk's -M bignum mode is not implemented by Jawk."); + } + + @Test + public void test_mpfrnegzero() throws Exception { + skip("gawk's -M bignum mode is not implemented by Jawk."); + } + + @Test + public void test_mpfrnegzero2() throws Exception { + skip("gawk's -M bignum mode is not implemented by Jawk."); + } + + @Test + public void test_mpfrnonum() throws Exception { + skip("gawk's -M bignum mode is not implemented by Jawk."); + } + + @Test + public void test_mpfrnr() throws Exception { + skip("gawk's -M bignum mode is not implemented by Jawk."); + } + + @Test + public void test_mpfrrem() throws Exception { + skip("gawk's -M bignum mode is not implemented by Jawk."); + } + + @Test + public void test_mpfrrndeval() throws Exception { + skip("gawk's -M bignum mode is not implemented by Jawk."); + } + + @Test + public void test_mpfrstrtonum() throws Exception { + skip("gawk's -M bignum mode is not implemented by Jawk."); + } + + @Test + public void test_mpgforcenum() throws Exception { + skip("gawk's -M bignum mode is not implemented by Jawk."); + } +} diff --git a/src/it/java/io/jawk/GawkMaketestsParser.java b/src/it/java/io/jawk/GawkMaketestsParser.java deleted file mode 100644 index af9c57a7..00000000 --- a/src/it/java/io/jawk/GawkMaketestsParser.java +++ /dev/null @@ -1,308 +0,0 @@ -package io.jawk; - -/*- - * ╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲ - * Jawk - * ჻჻჻჻჻჻ - * Copyright (C) 2006 - 2026 MetricsHub - * ჻჻჻჻჻჻ - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . - * ╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱ - */ - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.Reader; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Locale; -import java.util.Set; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -final class GawkMaketestsParser { - - private static final String DUMMY_TARGET = "Gt-dummy"; - private static final String AWK_COMMAND_TOKEN = "$(AWK)"; - private static final Pattern TARGET_PATTERN = Pattern.compile("^([A-Za-z0-9_.+-]+):\\s*$"); - private static final Pattern LOCALE_PATTERN = Pattern.compile("GAWKLOCALE=([^;\\s]+)"); - private static final Set SHORT_OPTIONS_WITH_ARGUMENT = new LinkedHashSet<>( - Arrays.asList("-E", "-F", "-f", "-i", "-e", "-v")); - private static final Set DIRECT_CLI_FLAGS = new LinkedHashSet<>(Arrays.asList("--posix", "--sandbox")); - private static final Set NOOP_FLAGS = new LinkedHashSet<>( - Arrays.asList("--non-decimal-data", "--re-interval")); - private static final Set UNSUPPORTED_FLAGS = new LinkedHashSet<>( - Arrays.asList("--csv", "--debug", "--lint", "--lint-old", "--pretty-print", "--traditional", "-M")); - - private GawkMaketestsParser() {} - - static List parse(Reader reader) throws IOException { - BufferedReader bufferedReader = new BufferedReader(reader); - List cases = new ArrayList<>(); - String currentTarget = null; - List currentBlock = new ArrayList<>(); - String line; - while ((line = bufferedReader.readLine()) != null) { - Matcher matcher = TARGET_PATTERN.matcher(line); - if (matcher.matches()) { - addCase(cases, currentTarget, currentBlock); - currentTarget = matcher.group(1); - currentBlock = new ArrayList<>(); - } else if (currentTarget != null) { - currentBlock.add(line); - } - } - addCase(cases, currentTarget, currentBlock); - return Collections.unmodifiableList(cases); - } - - private static void addCase(List cases, String target, List blockLines) { - if (target == null || DUMMY_TARGET.equals(target)) { - return; - } - String blockText = String.join("\n", blockLines); - boolean shellScript = blockText.contains("$@.sh"); - List flags = parseFlags(target, blockLines, shellScript); - List runnableFlags = new ArrayList<>(); - List unsupportedFlags = new ArrayList<>(); - for (String flag : flags) { - if ("-f".equals(flag)) { - continue; - } else if (DIRECT_CLI_FLAGS.contains(flag)) { - runnableFlags.add(flag); - } else if (NOOP_FLAGS.contains(flag)) { - continue; - } else if (UNSUPPORTED_FLAGS.contains(flag)) { - unsupportedFlags.add(flag); - } else { - unsupportedFlags.add(flag); - } - } - String localeTag = parseLocaleTag(blockText); - boolean readsStandardInput = blockText.contains("< \"$(srcdir)\"/$@.in"); - boolean hasMpfrExpectedVariant = blockText.contains("$@-mpfr.ok"); - cases - .add( - new GawkCase( - target, - shellScript, - flags, - runnableFlags, - unsupportedFlags, - readsStandardInput, - hasMpfrExpectedVariant, - localeTag)); - } - - private static List parseFlags(String target, List blockLines, boolean shellScript) { - LinkedHashSet flags = new LinkedHashSet<>(); - boolean awkCommandFound = false; - for (String line : blockLines) { - if (line.contains(AWK_COMMAND_TOKEN)) { - awkCommandFound = true; - flags.addAll(parseFlags(line)); - } - } - if (!awkCommandFound && !shellScript) { - throw new IllegalArgumentException("Unable to find AWK command line for Maketests target " + target); - } - return Collections.unmodifiableList(new ArrayList<>(flags)); - } - - private static List parseFlags(String commandLine) { - LinkedHashSet flags = new LinkedHashSet<>(); - boolean awkCommandSeen = false; - List tokens = tokenizeCommandLine(commandLine); - for (int index = 0; index < tokens.size(); index++) { - String token = tokens.get(index); - if (!awkCommandSeen) { - if (AWK_COMMAND_TOKEN.equals(token)) { - awkCommandSeen = true; - } - continue; - } - if (token.isEmpty() || "--".equals(token) || !token.startsWith("-") || "-".equals(token)) { - continue; - } - if (token.startsWith("--")) { - int equalsIndex = token.indexOf('='); - flags.add(equalsIndex >= 0 ? token.substring(0, equalsIndex) : token); - continue; - } - for (int flagIndex = 1; flagIndex < token.length(); flagIndex++) { - String shortFlag = "-" + token.charAt(flagIndex); - flags.add(shortFlag); - if (SHORT_OPTIONS_WITH_ARGUMENT.contains(shortFlag)) { - if (flagIndex + 1 == token.length()) { - index++; - } - break; - } - } - } - return Collections.unmodifiableList(new ArrayList<>(flags)); - } - - private static List tokenizeCommandLine(String commandLine) { - List tokens = new ArrayList<>(); - StringBuilder current = new StringBuilder(); - boolean inSingleQuotes = false; - boolean inDoubleQuotes = false; - boolean escaped = false; - for (int index = 0; index < commandLine.length(); index++) { - char currentChar = commandLine.charAt(index); - if (escaped) { - current.append(currentChar); - escaped = false; - continue; - } - if (currentChar == '\\' && !inSingleQuotes) { - escaped = true; - continue; - } - if (currentChar == '\'' && !inDoubleQuotes) { - inSingleQuotes = !inSingleQuotes; - continue; - } - if (currentChar == '"' && !inSingleQuotes) { - inDoubleQuotes = !inDoubleQuotes; - continue; - } - if (Character.isWhitespace(currentChar) && !inSingleQuotes && !inDoubleQuotes) { - addCurrentToken(tokens, current); - continue; - } - current.append(currentChar); - } - if (escaped) { - current.append('\\'); - } - addCurrentToken(tokens, current); - return Collections.unmodifiableList(tokens); - } - - private static void addCurrentToken(List tokens, StringBuilder current) { - if (current.length() > 0) { - tokens.add(current.toString()); - current.setLength(0); - } - } - - private static String parseLocaleTag(String blockText) { - Matcher matcher = LOCALE_PATTERN.matcher(blockText); - if (!matcher.find()) { - return null; - } - String gawkLocale = matcher.group(1); - if ("C".equals(gawkLocale)) { - return null; - } - int modifierIndex = gawkLocale.indexOf('@'); - String localeWithoutModifier = modifierIndex >= 0 ? gawkLocale.substring(0, modifierIndex) : gawkLocale; - String[] languageAndCountry = localeWithoutModifier.split("[_.]", 3); - if (languageAndCountry.length < 2) { - return localeWithoutModifier; - } - return languageAndCountry[0].toLowerCase(Locale.ROOT) - + "-" - + languageAndCountry[1].toUpperCase(Locale.ROOT); - } - - static final class GawkCase { - private final String name; - private final boolean shellScript; - private final List flags; - private final List runnableFlags; - private final List unsupportedFlags; - private final boolean readsStandardInput; - private final boolean hasMpfrExpectedVariant; - private final String localeTag; - - GawkCase( - String name, - boolean shellScript, - List flags, - List runnableFlags, - List unsupportedFlags, - boolean readsStandardInput, - boolean hasMpfrExpectedVariant, - String localeTag) { - this.name = name; - this.shellScript = shellScript; - this.flags = Collections.unmodifiableList(new ArrayList<>(flags)); - this.runnableFlags = Collections.unmodifiableList(new ArrayList<>(runnableFlags)); - this.unsupportedFlags = Collections.unmodifiableList(new ArrayList<>(unsupportedFlags)); - this.readsStandardInput = readsStandardInput; - this.hasMpfrExpectedVariant = hasMpfrExpectedVariant; - this.localeTag = localeTag; - } - - public String name() { - return name; - } - - String scriptMode() { - return shellScript ? "sh" : "awk"; - } - - String scriptFileName() { - return name + "." + scriptMode(); - } - - List flags() { - return flags; - } - - List runnableFlags() { - return runnableFlags; - } - - List unsupportedFlags() { - return unsupportedFlags; - } - - boolean readsStandardInput() { - return readsStandardInput; - } - - public String stdinFileName() { - return readsStandardInput ? name + ".in" : null; - } - - boolean hasMpfrExpectedVariant() { - return hasMpfrExpectedVariant; - } - - public String expectedFileName() { - return name + ".ok"; - } - - String localeTag() { - return localeTag; - } - - public boolean requiresExplicitSkip() { - return shellScript || !unsupportedFlags.isEmpty(); - } - - @Override - public String toString() { - return name; - } - } -} diff --git a/src/it/java/io/jawk/GawkManualIT.java b/src/it/java/io/jawk/GawkManualIT.java index ff5a34b6..9511c6a5 100644 --- a/src/it/java/io/jawk/GawkManualIT.java +++ b/src/it/java/io/jawk/GawkManualIT.java @@ -1,7 +1,7 @@ package io.jawk; /*- - * ╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲ + * ╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲ * Jawk * ჻჻჻჻჻჻ * Copyright (C) 2006 - 2026 MetricsHub @@ -19,249 +19,716 @@ * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * . - * ╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲ + * ╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱ */ -import static org.junit.Assert.fail; +import static org.junit.Assume.assumeTrue; import java.io.IOException; -import java.net.URL; +import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Path; -import java.nio.file.Paths; -import org.junit.AfterClass; -import org.junit.BeforeClass; import org.junit.Test; /** - * Curated handwritten gawk compatibility cases expressed directly with - * {@link AwkTestSupport}. These cover simple {@code Makefile.am} rules that do - * not justify another metadata parser. + * Explicit handwritten gawk compatibility cases transcribed from vendored + * Makefile.am rules. The Java source is the runtime source of truth; many + * shell-heavy cases are kept as explicit skipped placeholders until they are + * worth expressing as AwkTestSupport.cliTest cases. */ public class GawkManualIT { - private static final String GAWK_RESOURCE_PATH = "/gawk"; - private static final String EXIT_CODE_PREFIX = "EXIT CODE: "; - private static final String STAGED_DIRECTORY_PREFIX = "gawk-manual-"; - private static final int MAX_CAPTURED_OUTPUT_BYTES = 1024 * 1024; - private static final boolean LOG_PROGRESS = Boolean.getBoolean("jawk.gawk.progress"); + private static final Path GAWK_DIRECTORY = CompatibilityTestResources.resourceDirectory(GawkManualIT.class, "gawk"); + private static final String MANUAL_SKIP_REASON = "Handwritten gawk case from Makefile.am not yet expressed as an AwkTestSupport.cliTest case."; - private static SuiteState suiteState; + private static Path gawkPath(String fileName) { + return GAWK_DIRECTORY.resolve(fileName); + } + + private static String gawkFile(String fileName) { + return gawkPath(fileName).toString(); + } + + private static String gawkText(String fileName) throws IOException { + return new String(Files.readAllBytes(gawkPath(fileName)), StandardCharsets.UTF_8); + } + + private static void skip(String reason) { + assumeTrue(reason, false); + } + + @Test + public void test_pma() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_poundbang() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_messages() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_argarray() throws Exception { + AwkTestSupport + .cliTest("GAWK argarray") + .argument("-f", gawkFile("argarray.awk")) + .stdin("just a test\n") + .operand(gawkFile("argarray.in"), "-") + .postProcessWith(output -> output.replace(gawkFile("argarray.in"), "./argarray.input")) + .expectLines(gawkPath("argarray.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_regtest() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_manyfiles() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_compare() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_inftest() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_getline2() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_awkpath() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_argtest() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_badargs() throws Exception { + skip(MANUAL_SKIP_REASON); + } - @BeforeClass - public static void beforeAll() throws Exception { - loadSuiteState(); + @Test + public void test_strftime() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_devfd() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_errno() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_tweakfld() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_pid() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_strftlng() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_nors() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_rebuf() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_rsglstdin() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_pipeio1() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_pipeio2() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_clobber() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_arynocls() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_getlnbuf() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_inetmesg() throws Exception { + skip(MANUAL_SKIP_REASON); } - @AfterClass - public static void afterAll() throws Exception { - if (suiteState == null) { - return; - } - AwkTestSupport.deleteRecursively(suiteState.stagedDirectory); - suiteState = null; + @Test + public void test_inetechu() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_inetecht() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_inetdayu() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_inetdayt() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_redfilnm() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_space() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_rsnulbig() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_rsnulbig2() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_exitval1() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_fsspcoln() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_rsstart3() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_rtlenmb() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_nofile() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_binmode1() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_devfd1() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_devfd2() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_mixed1() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_mbprintf5() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_beginfile1() throws Exception { + skip("BEGINFILE and ENDFILE are not implemented by Jawk yet."); + } + + @Test + public void test_beginfile2() throws Exception { + skip("BEGINFILE and ENDFILE are not implemented by Jawk yet."); + } + + @Test + public void test_dumpvars() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_profile0() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_profile1() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_profile2() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_profile3() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_profile5() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_profile6() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_profile7() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_profile12() throws Exception { + skip(MANUAL_SKIP_REASON); } @Test - public void argcasfile() throws Exception { - assertManualCase( - "argcasfile", - (builder, state) -> { - builder.argument("-f", state.stagedDirectory.resolve("argcasfile.awk").toString()); - builder.operand("ARGC=1", " /no/such/file"); - builder.stdin(Files.readAllBytes(state.stagedDirectory.resolve("argcasfile.in"))); - }); + public void test_mpfrieee() throws Exception { + skip(MANUAL_SKIP_REASON); } @Test - public void eofsrc1() throws Exception { - assertManualCase( - "eofsrc1", - (builder, state) -> builder - .argument( - "-f", - state.stagedDirectory.resolve("eofsrc1a.awk").toString(), - "-f", - state.stagedDirectory.resolve("eofsrc1b.awk").toString())); + public void test_mpfrexprange() throws Exception { + skip(MANUAL_SKIP_REASON); } @Test - public void longwrds() throws Exception { - assertManualCase( - "longwrds", - (builder, state) -> { - builder.argument("-v", "SORT=sort", "-f", state.stagedDirectory.resolve("longwrds.awk").toString()); - builder.stdin(Files.readAllBytes(state.stagedDirectory.resolve("longwrds.in"))); - }); + public void test_mpfrrnd() throws Exception { + skip(MANUAL_SKIP_REASON); } @Test - public void nsawk1a() throws Exception { - assertManualCase( - "nsawk1a", - (builder, state) -> builder.argument("-f", state.stagedDirectory.resolve("nsawk1.awk").toString())); + public void test_mpfrsort() throws Exception { + skip(MANUAL_SKIP_REASON); } @Test - public void nsawk1b() throws Exception { - assertManualCase( - "nsawk1b", - (builder, state) -> builder - .argument( - "-v", - "I=fine", - "-f", - state.stagedDirectory.resolve("nsawk1.awk").toString())); + public void test_mpfruplus() throws Exception { + skip(MANUAL_SKIP_REASON); } @Test - public void nsawk1c() throws Exception { - assertManualCase( - "nsawk1c", - (builder, state) -> builder - .argument( - "-v", - "awk::I=fine", - "-f", - state.stagedDirectory.resolve("nsawk1.awk").toString())); + public void test_mpfranswer42() throws Exception { + skip(MANUAL_SKIP_REASON); } @Test - public void nsawk2a() throws Exception { - assertManualCase( - "nsawk2a", - (builder, state) -> builder - .argument( - "-v", - "I=fine", - "-f", - state.stagedDirectory.resolve("nsawk2.awk").toString())); - } - - @Test - public void nsawk2b() throws Exception { - assertManualCase( - "nsawk2b", - (builder, state) -> builder - .argument( - "-v", - "awk::I=fine", - "-f", - state.stagedDirectory.resolve("nsawk2.awk").toString())); - } - - @Test - public void nsidentifier() throws Exception { - assertManualCase( - "nsidentifier", - (builder, state) -> builder - .argument( - "-v", - "SORT=sort", - "-f", - state.stagedDirectory.resolve("nsidentifier.awk").toString())); + public void test_mpfrmemok1() throws Exception { + skip(MANUAL_SKIP_REASON); } - - @Test - public void readfile2() throws Exception { - assertManualCase( - "readfile2", - (builder, state) -> { - builder.argument("-f", state.stagedDirectory.resolve("readfile2.awk").toString()); - builder - .operand( - state.stagedDirectory.resolve("readfile2.awk").toString(), - state.stagedDirectory.resolve("readdir.awk").toString()); - }); - } - - @Test - public void spacere() throws Exception { - assertManualCase( - "spacere", - (builder, state) -> builder.argument("-f", state.stagedDirectory.resolve("spacere.awk").toString())); - } - - @Test - public void symtab6() throws Exception { - assertManualCase( - "symtab6", - (builder, state) -> builder.argument("-f", state.stagedDirectory.resolve("symtab6.awk").toString())); - } - - @Test - public void symtab9() throws Exception { - assertManualCase( - "symtab9", - (builder, state) -> builder.argument("-f", state.stagedDirectory.resolve("symtab9.awk").toString())); - } - - private void assertManualCase(String caseName, ManualCaseConfigurer configurer) throws Exception { - SuiteState state = loadSuiteState(); - if (LOG_PROGRESS) { - System.out.println("GAWK manual " + caseName); - } - AwkTestSupport.CliTestBuilder builder = AwkTestSupport - .cliTest("GAWK " + caseName) - .emulateCliMain() - .mergeStdoutAndStderr() - .maxOutputBytes(MAX_CAPTURED_OUTPUT_BYTES); - configurer.configure(builder, state); - AwkTestSupport.ExpectedCliTranscript expected = AwkTestSupport - .readExpectedCliTranscript(state.stagedDirectory.resolve(caseName + ".ok"), EXIT_CODE_PREFIX); - builder.postProcessWith(AwkTestSupport::normalizeNewlines).expect(expected.output()); - if (expected.exitCode() != null) { - builder.expectExit(expected.exitCode().intValue()); - } - try { - builder.build().runAndAssert(); - } catch (AwkTestSupport.OutputLimitExceededException ex) { - fail( - "Captured output for GAWK " - + caseName - + " exceeded " - + ex.maxBytes() - + " bytes. Enable -Djawk.gawk.progress=true to log case execution."); - } - } - - private static synchronized SuiteState loadSuiteState() throws Exception { - if (suiteState != null) { - return suiteState; - } - Path resourceDirectory = resolveResourceDirectory(); - Path stagedDirectory = null; - try { - stagedDirectory = AwkTestSupport.stageDirectory(resourceDirectory, STAGED_DIRECTORY_PREFIX); - suiteState = new SuiteState(stagedDirectory); - return suiteState; - } catch (Exception ex) { - AwkTestSupport.deleteRecursively(stagedDirectory); - throw ex; - } - } - - private static Path resolveResourceDirectory() throws Exception { - URL resourceUrl = GawkManualIT.class.getResource(GAWK_RESOURCE_PATH); - if (resourceUrl == null) { - throw new IOException("Couldn't find resource " + GAWK_RESOURCE_PATH); - } - Path resourceDirectory = Paths.get(resourceUrl.toURI()); - if (!Files.isDirectory(resourceDirectory)) { - throw new IOException(GAWK_RESOURCE_PATH + " is not a directory"); - } - return resourceDirectory; - } - - private interface ManualCaseConfigurer { - void configure(AwkTestSupport.CliTestBuilder builder, SuiteState state) throws Exception; - } - - private static final class SuiteState { - private final Path stagedDirectory; - - SuiteState(Path stagedDirectory) { - this.stagedDirectory = stagedDirectory; - } + + @Test + public void test_mpfrsqrt() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_jarebug() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_ordchr2() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_readfile() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_readfile2() throws Exception { + AwkTestSupport + .cliTest("GAWK readfile2") + .argument("-f", gawkFile("readfile2.awk")) + .operand(gawkFile("readfile2.awk"), gawkFile("readdir.awk")) + .expectLines(gawkPath("readfile2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_nsawk1a() throws Exception { + AwkTestSupport + .cliTest("GAWK nsawk1a") + .argument("-f", gawkFile("nsawk1.awk")) + .expectLines(gawkPath("nsawk1a.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_nsawk1b() throws Exception { + AwkTestSupport + .cliTest("GAWK nsawk1b") + .argument("-v", "I=fine") + .argument("-f", gawkFile("nsawk1.awk")) + .expectLines(gawkPath("nsawk1b.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_nsawk1c() throws Exception { + AwkTestSupport + .cliTest("GAWK nsawk1c") + .argument("-v", "awk::I=fine") + .argument("-f", gawkFile("nsawk1.awk")) + .expectLines(gawkPath("nsawk1c.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_nsawk2a() throws Exception { + AwkTestSupport + .cliTest("GAWK nsawk2a") + .argument("-v", "I=fine") + .argument("-f", gawkFile("nsawk2.awk")) + .expectLines(gawkPath("nsawk2a.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_nsawk2b() throws Exception { + AwkTestSupport + .cliTest("GAWK nsawk2b") + .argument("-v", "awk::I=fine") + .argument("-f", gawkFile("nsawk2.awk")) + .expectLines(gawkPath("nsawk2b.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_include2() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_incdupe() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_incdupe2() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_incdupe3() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_incdupe4() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_incdupe5() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_incdupe6() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_incdupe7() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_inplace1() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_inplace2() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_inplace2bcomp() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_inplace3() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_inplace3bcomp() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_testext() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_getfile() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_readdir() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_readdir_test() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_readdir_retest() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_readall() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_fts() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_charasbytes() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_symtab6() throws Exception { + skip( + "This handwritten case compares a fatal gawk SYMTAB diagnostic on stderr and is intentionally skipped in the explicit AwkTestSupport.cliTest suite."); + } + + @Test + public void test_symtab8() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_symtab9() throws Exception { + AwkTestSupport + .cliTest("GAWK symtab9") + .argument("-f", gawkFile("symtab9.awk")) + .expectLines(gawkPath("symtab9.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_reginttrad() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_colonwarn() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_dbugeval() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_filefuncs() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_genpot() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_negtime() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_watchpoint1() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_pty1() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_pty2() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_ignrcas3() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_arrdbg() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_sourcesplit() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_eofsrc1() throws Exception { + skip( + "This handwritten case compares gawk parser diagnostics on stderr and is intentionally skipped in the explicit AwkTestSupport.cliTest suite."); + } + + @Test + public void test_nsbad_cmd() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_nonfatal1() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_nlstringtest() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_longwrds() throws Exception { + AwkTestSupport + .cliTest("GAWK longwrds") + .argument("-v", "SORT=sort") + .argument("-f", gawkFile("longwrds.awk")) + .stdin(gawkText("longwrds.in")) + .expectLines(gawkPath("longwrds.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_nsidentifier() throws Exception { + AwkTestSupport + .cliTest("GAWK nsidentifier") + .argument("-v", "SORT=sort") + .argument("-f", gawkFile("nsidentifier.awk")) + .expectLines(gawkPath("nsidentifier.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_spacere() throws Exception { + AwkTestSupport + .cliTest("GAWK spacere") + .argument("-f", gawkFile("spacere.awk")) + .expectLines(gawkPath("spacere.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_typedregex4() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_iolint() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_argcasfile() throws Exception { + AwkTestSupport + .cliTest("GAWK argcasfile") + .argument("-f", gawkFile("argcasfile.awk")) + .stdin(gawkText("argcasfile.in")) + .operand("ARGC=1", " /no/such/file") + .expectLines(gawkPath("argcasfile.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_indirectbuiltin2() throws Exception { + skip(MANUAL_SKIP_REASON); } } diff --git a/src/it/resources/gawk/skips.properties b/src/it/resources/gawk/skips.properties deleted file mode 100644 index 1663007c..00000000 --- a/src/it/resources/gawk/skips.properties +++ /dev/null @@ -1,71 +0,0 @@ -# Generated GAWK targets that the metadata-driven Jawk harness intentionally skips. -# The suite validates that every unsupported Maketests rule is listed here. - -# Shell-script targets require external shell execution. -cmdlinefsbacknl = Shell-script target generated by Maketests; the in-process Jawk harness does not execute external shell scripts. -exit = Shell-script target generated by Maketests; the in-process Jawk harness does not execute external shell scripts. -fflush = Shell-script target generated by Maketests; the in-process Jawk harness does not execute external shell scripts. -localenl = Shell-script target generated by Maketests; the in-process Jawk harness does not execute external shell scripts. -modifiers = Shell-script target generated by Maketests; the in-process Jawk harness does not execute external shell scripts. -next = Shell-script target generated by Maketests; the in-process Jawk harness does not execute external shell scripts. -randtest = Shell-script target generated by Maketests; the in-process Jawk harness does not execute external shell scripts. -rtlen = Shell-script target generated by Maketests; the in-process Jawk harness does not execute external shell scripts. -rtlen01 = Shell-script target generated by Maketests; the in-process Jawk harness does not execute external shell scripts. - -# Jawk does not expose gawk's lint or traditional-mode diagnostics. -defref = gawk's --lint diagnostics are not implemented by Jawk. -lintexp = gawk's --lint diagnostics are not implemented by Jawk. -lintindex = gawk's --lint diagnostics are not implemented by Jawk. -lintint = gawk's --lint diagnostics are not implemented by Jawk. -lintlength = gawk's --lint diagnostics are not implemented by Jawk. -lintold = gawk's --lint-old diagnostics are not implemented by Jawk. -lintplus = gawk's --lint diagnostics are not implemented by Jawk. -lintwarn = gawk's --lint diagnostics are not implemented by Jawk. -litoct = gawk's --traditional mode is not implemented by Jawk. -noeffect = gawk's --lint diagnostics are not implemented by Jawk. -nofmtch = gawk's --lint diagnostics are not implemented by Jawk. -nonl = gawk's --lint diagnostics are not implemented by Jawk. -rscompat = gawk's --traditional mode is not implemented by Jawk. -shadow = gawk's --lint diagnostics are not implemented by Jawk. -tradanch = gawk's --traditional mode is not implemented by Jawk. -uninit2 = gawk's --lint diagnostics are not implemented by Jawk. -uninit3 = gawk's --lint diagnostics are not implemented by Jawk. -uninit4 = gawk's --lint diagnostics are not implemented by Jawk. -uninit5 = gawk's --lint diagnostics are not implemented by Jawk. -uninitialized = gawk's --lint diagnostics are not implemented by Jawk. - -# Jawk does not implement gawk's CSV, debugger, pretty-print, or bignum CLI modes. -csv1 = gawk's --csv mode is not implemented by Jawk. -csv2 = gawk's --csv mode is not implemented by Jawk. -csv3 = gawk's --csv mode is not implemented by Jawk. -csvodd = gawk's --csv mode is not implemented by Jawk. -dbugeval2 = gawk's --debug mode is not implemented by Jawk. -dbugeval3 = gawk's --debug mode is not implemented by Jawk. -dbugeval4 = gawk's --debug mode is not implemented by Jawk. -dbugtypedre1 = gawk's --debug mode is not implemented by Jawk. -dbugtypedre2 = gawk's --debug mode is not implemented by Jawk. -mpfrbigint = gawk's -M bignum mode is not implemented by Jawk. -mpfrbigint2 = gawk's -M bignum mode is not implemented by Jawk. -mpfrcase = gawk's -M bignum mode is not implemented by Jawk. -mpfrcase2 = gawk's -M bignum mode is not implemented by Jawk. -mpfrfield = gawk's -M bignum mode is not implemented by Jawk. -mpfrnegzero = gawk's -M bignum mode is not implemented by Jawk. -mpfrnegzero2 = gawk's -M bignum mode is not implemented by Jawk. -mpfrnonum = gawk's -M bignum mode is not implemented by Jawk. -mpfrnr = gawk's -M bignum mode is not implemented by Jawk. -mpfrrem = gawk's -M bignum mode is not implemented by Jawk. -mpfrrndeval = gawk's -M bignum mode is not implemented by Jawk. -mpfrstrtonum = gawk's -M bignum mode is not implemented by Jawk. -mpgforcenum = gawk's -M bignum mode is not implemented by Jawk. -nsprof1 = gawk's --pretty-print mode is not implemented by Jawk. -nsprof2 = gawk's --pretty-print mode is not implemented by Jawk. -profile10 = gawk's --pretty-print mode is not implemented by Jawk. -profile11 = gawk's --pretty-print mode is not implemented by Jawk. -profile13 = gawk's --pretty-print mode is not implemented by Jawk. -profile14 = gawk's --pretty-print mode is not implemented by Jawk. -profile15 = gawk's --pretty-print mode is not implemented by Jawk. -profile16 = gawk's --pretty-print mode is not implemented by Jawk. -profile17 = gawk's --pretty-print mode is not implemented by Jawk. -profile4 = gawk's --pretty-print mode is not implemented by Jawk. -profile8 = gawk's --pretty-print mode is not implemented by Jawk. -profile9 = gawk's --pretty-print mode is not implemented by Jawk. diff --git a/src/site/markdown/compatibility.md b/src/site/markdown/compatibility.md index 8b3dc5b6..4ddf29dc 100644 --- a/src/site/markdown/compatibility.md +++ b/src/site/markdown/compatibility.md @@ -77,16 +77,17 @@ Jawk tuples are reusable, but they should be treated as internal artifacts tied Jawk maintains compatibility tests derived from the BWK (One True AWK) and gawk test suites. These run automatically as integration tests during `mvn verify`. Compatibility suites now live under `src/it/java`, with their vendored inputs under `src/it/resources`. -The gawk coverage is split in two parts: Jawk vendors gawk's `Makefile.am`, `Gentests`, and generated `Maketests` snapshot, parses the portable generated `Maketests` rules in JUnit 4, and keeps a separate handwritten `AwkTestSupport` suite for a curated subset of manual `Makefile.am` rules. +The compatibility suites read those vendored files directly from the repository checkout instead of relying on the Maven test classpath layout. +The gawk coverage is also split in two parts, but both are now explicit Java integration suites built on `AwkTestSupport`. `GawkIT` mirrors the portable cases from gawk's vendored `Maketests` snapshot as checked-in Java tests, and `GawkManualIT` mirrors handwritten `Makefile.am` rules the same way. The vendored gawk files remain in the repository to make future refreshes and diffs straightforward, but the runtime source of truth is the Java test code. | Suite | Coverage | | --- | --- | | **BwkPIT** | Pattern matching and basic AWK operations from the BWK test collection | | **BwkTIT** | Text processing, field splitting, built-in functions, and output formatting | | **BwkMiscIT** | Miscellaneous BWK compatibility edge cases | -| **GawkCompatibilityIT** | Portable gawk compatibility derived from the vendored `Maketests` snapshot, with unsupported shell, debugger, CSV, pretty-print, lint, traditional, and bignum modes skipped explicitly | -| **GawkManualIT** | Curated handwritten `Makefile.am` rules expressed directly as `AwkTestSupport` integration tests | +| **GawkIT** | Portable gawk compatibility mirrored from the vendored `Maketests` snapshot as explicit `AwkTestSupport` CLI tests, with unsupported shell, debugger, CSV, pretty-print, lint, traditional, and bignum modes skipped explicitly | +| **GawkManualIT** | Handwritten `Makefile.am` rules mirrored as explicit `AwkTestSupport` integration tests or explicit skipped placeholders | -Not all gawk compatibility cases pass, primarily because Jawk uses Java regular expressions and `java.util.Formatter` rather than their C equivalents. Linux CI is the authoritative environment for the full compatibility pass rate. Windows can still run the portable metadata-driven subset without requiring Unix tooling. +Not all gawk compatibility cases pass, primarily because Jawk uses Java regular expressions and `java.util.Formatter` rather than their C equivalents. Linux CI is the authoritative environment for the full compatibility pass rate. Windows can still run the explicit Java gawk suites without requiring Unix tooling. Results are stored in `target/failsafe-reports/` and summarized on the [Failsafe Report](failsafe-report.html) page of the generated site. diff --git a/src/test/java/io/jawk/AwkTest.java b/src/test/java/io/jawk/AwkTest.java index 55d85c8c..1ea8339d 100644 --- a/src/test/java/io/jawk/AwkTest.java +++ b/src/test/java/io/jawk/AwkTest.java @@ -40,6 +40,7 @@ import java.net.URL; import java.nio.charset.StandardCharsets; import java.nio.file.Files; +import java.nio.file.Path; import java.nio.file.Paths; import java.util.ArrayList; import java.util.Arrays; @@ -1239,6 +1240,26 @@ public void compileFromReader() throws Exception { assertEquals("one\n", result); } + /** + * Verifies that {@link AwkTestSupport} can execute a script loaded directly + * from a file path without first materializing it as a {@link String}. + */ + @Test + public void awkTestSupportCanExecuteScriptFromPath() throws Exception { + Path scriptPath = Files.createTempFile("jawk-script", ".awk"); + try { + Files.write(scriptPath, "{ print toupper($0) }\n".getBytes(StandardCharsets.UTF_8)); + AwkTestSupport + .awkTest("script from path") + .script(scriptPath) + .stdin("alpha\n") + .expectLines("ALPHA") + .runAndAssert(); + } finally { + Files.deleteIfExists(scriptPath); + } + } + /** * Ensures that providing explicit extensions to the {@link Awk} constructor * does not interfere with tuple execution. diff --git a/src/test/java/io/jawk/AwkTestSupport.java b/src/test/java/io/jawk/AwkTestSupport.java index 6db03944..2707c69e 100644 --- a/src/test/java/io/jawk/AwkTestSupport.java +++ b/src/test/java/io/jawk/AwkTestSupport.java @@ -33,7 +33,9 @@ import java.io.File; import java.io.IOException; import java.io.InputStream; +import java.io.InputStreamReader; import java.io.PrintStream; +import java.io.Reader; import java.io.StringReader; import java.io.UncheckedIOException; import java.nio.charset.StandardCharsets; @@ -51,7 +53,6 @@ import java.util.stream.Collectors; import java.util.stream.Stream; import io.jawk.ext.JawkExtension; -import io.jawk.jrt.AwkRuntimeException; import io.jawk.jrt.InputSource; /** @@ -118,85 +119,6 @@ public static Path sharedTempDirectory() { return SHARED_TEMP_DIR; } - static Path stageDirectory(Path sourceDirectory, String prefix) throws IOException { - Path stagedDirectory = Files.createTempDirectory(prefix); - try { - copyDirectoryRecursively(sourceDirectory, stagedDirectory); - return stagedDirectory; - } catch (IOException | RuntimeException ex) { - deleteRecursively(stagedDirectory); - throw ex; - } - } - - static void copyDirectoryRecursively(Path sourceDirectory, Path destinationDirectory) throws IOException { - try (Stream paths = Files.walk(sourceDirectory)) { - paths.forEach(path -> copyToDirectory(sourceDirectory, destinationDirectory, path)); - } - } - - static String readUtf8(Path path) throws IOException { - return new String(Files.readAllBytes(path), StandardCharsets.UTF_8); - } - - static String readUtf8Normalized(Path path) throws IOException { - return normalizeNewlines(readUtf8(path)); - } - - static String normalizeNewlines(String text) { - return text.replace("\r\n", "\n").replace("\r", "\n"); - } - - static ExpectedCliTranscript readExpectedCliTranscript(Path path, String exitCodePrefix) throws IOException { - String transcript = readUtf8Normalized(path); - int trailerLineStart = transcript.length(); - while (trailerLineStart > 0 && transcript.charAt(trailerLineStart - 1) == '\n') { - trailerLineStart--; - } - while (trailerLineStart > 0 && transcript.charAt(trailerLineStart - 1) != '\n') { - trailerLineStart--; - } - String lastLine = transcript.substring(trailerLineStart).trim(); - if (!lastLine.startsWith(exitCodePrefix)) { - return new ExpectedCliTranscript(transcript, null); - } - Integer exitCode = Integer.valueOf(lastLine.substring(exitCodePrefix.length()).trim()); - return new ExpectedCliTranscript(transcript.substring(0, trailerLineStart), exitCode); - } - - static final class OutputLimitExceededException extends RuntimeException { - private static final long serialVersionUID = 1L; - - private final int maxBytes; - - OutputLimitExceededException(int maxBytes) { - super("Captured output exceeded " + maxBytes + " bytes"); - this.maxBytes = maxBytes; - } - - int maxBytes() { - return maxBytes; - } - } - - static final class ExpectedCliTranscript { - private final String output; - private final Integer exitCode; - - ExpectedCliTranscript(String output, Integer exitCode) { - this.output = output; - this.exitCode = exitCode; - } - - String output() { - return output; - } - - Integer exitCode() { - return exitCode; - } - } - /** * Represents a fully configured test case produced by one of the builders. * Implementations know how to prepare the execution environment, run the @@ -414,11 +336,79 @@ public static final class AwkTestBuilder extends BaseTestBuilder private Awk customAwk; private final List extensions = new ArrayList<>(); private InputSource inputSource; + private Reader scriptReader; + private Path scriptPath; private AwkTestBuilder(String description) { super(description); } + /** + * Sets the AWK script to execute using a raw {@link String}. Any + * placeholder tokens in the script are resolved before execution. + * + * @param script the script contents + * @return this builder for method chaining + */ + @Override + public AwkTestBuilder script(String script) { + scriptReader = null; + scriptPath = null; + return super.script(script); + } + + /** + * Sets the AWK script to execute using a {@link Reader}. The reader is + * consumed directly by the compiler when the test runs. + * + * @param reader the script reader + * @return this builder for method chaining + * @throws IllegalArgumentException when {@code reader} is {@code null} + */ + public AwkTestBuilder script(Reader reader) { + if (reader == null) { + throw new IllegalArgumentException("reader must not be null"); + } + script = null; + scriptReader = reader; + scriptPath = null; + return this; + } + + /** + * Sets the AWK script to execute using a UTF-8 input stream. The stream is + * wrapped in a reader and consumed directly by the compiler when the test + * runs. + * + * @param scriptStream the stream supplying the script contents + * @return this builder for method chaining + * @throws IllegalArgumentException when {@code scriptStream} is + * {@code null} + */ + public AwkTestBuilder script(InputStream scriptStream) { + if (scriptStream == null) { + throw new IllegalArgumentException("scriptStream must not be null"); + } + return script(new InputStreamReader(scriptStream, StandardCharsets.UTF_8)); + } + + /** + * Sets the AWK script to execute from a UTF-8 file. + * + * @param path path to the script file + * @return this builder for method chaining + * @throws IllegalArgumentException when {@code path} is {@code null} + */ + public AwkTestBuilder script(Path path) { + if (path == null) { + throw new IllegalArgumentException("path must not be null"); + } + script = null; + scriptReader = null; + scriptPath = path; + return this; + } + /** * Registers a value to pre-assign to a variable before the script is * executed. @@ -512,7 +502,9 @@ protected AwkTestCase buildTestCase( preAssignments, customAwk, extensions, - inputSource); + inputSource, + scriptReader, + scriptPath); } } @@ -524,10 +516,6 @@ protected AwkTestCase buildTestCase( public static final class CliTestBuilder extends BaseTestBuilder { private final List argumentSpecs = new ArrayList<>(); private final Map assignments = new LinkedHashMap<>(); - private boolean emulateCliMain; - private boolean mergeStdoutAndStderr; - private Integer maxOutputBytes; - private byte[] stdinBytes; private CliTestBuilder(String description) { super(description); @@ -558,82 +546,6 @@ public CliTestBuilder preassign(String name, Object value) { return this; } - /** - * Provides text data that will be delivered on standard input when the - * script runs. Calling this method clears any previously configured raw - * byte stdin for the same builder. - * - * @param stdin the content to stream into standard input - * @return this builder for method chaining - */ - @Override - public CliTestBuilder stdin(String stdin) { - stdinBytes = null; - return super.stdin(stdin); - } - - /** - * Provides raw bytes that will be delivered on standard input when the - * script runs. This preserves fixture bytes exactly as supplied, which is - * useful for compatibility cases whose redirected input is not valid - * UTF-8. Calling this method clears any previously configured text stdin - * for the same builder. - * - * @param stdinParam raw bytes to stream into standard input - * @return this builder for method chaining - * @throws IllegalArgumentException when {@code stdinParam} is {@code null} - */ - public CliTestBuilder stdin(byte[] stdinParam) { - if (stdinParam == null) { - throw new IllegalArgumentException("stdinParam must not be null"); - } - stdin = null; - stdinBytes = Arrays.copyOf(stdinParam, stdinParam.length); - return this; - } - - /** - * Captures CLI standard output and standard error through the same - * stream. This mirrors shell invocations that redirect {@code 2>&1}, - * allowing tests to compare diagnostics and regular output as a single - * combined result. - * - * @return this builder for method chaining - */ - public CliTestBuilder mergeStdoutAndStderr() { - mergeStdoutAndStderr = true; - return this; - } - - /** - * Executes the CLI through the same exception handling flow used by - * {@link Cli#main(String[])} so that diagnostics are rendered to the error - * stream and failures become exit codes instead of propagating as Java - * exceptions. - * - * @return this builder for method chaining - */ - public CliTestBuilder emulateCliMain() { - emulateCliMain = true; - return this; - } - - /** - * Caps the combined captured CLI output. This prevents compatibility - * suites from exhausting heap space when a script emits unbounded output. - * - * @param maxBytes maximum number of UTF-8 bytes to capture - * @return this builder for method chaining - * @throws IllegalArgumentException when {@code maxBytes} is not positive - */ - public CliTestBuilder maxOutputBytes(int maxBytes) { - if (maxBytes <= 0) { - throw new IllegalArgumentException("maxBytes must be positive"); - } - maxOutputBytes = maxBytes; - return this; - } - @Override protected CliTestCase buildTestCase( TestLayout layout, @@ -643,18 +555,7 @@ protected CliTestCase buildTestCase( if (useTempDir && !assignments.containsKey("TEMPDIR")) { assignments.put("TEMPDIR", SHARED_TEMP_DIR.toString()); } - return new CliTestCase( - layout, - files, - operands, - placeholders, - requiresPosix, - argumentSpecs, - assignments, - emulateCliMain, - mergeStdoutAndStderr, - maxOutputBytes, - stdinBytes); + return new CliTestCase(layout, files, operands, placeholders, requiresPosix, argumentSpecs, assignments); } } @@ -697,32 +598,6 @@ public B script(String script) { return (B) this; } - /** - * Sets the AWK script to execute using a stream. The contents are read as - * UTF-8 and treated equivalently to {@link #script(String)}. - * - * @param scriptStream the stream supplying the script contents - * @return this builder for method chaining - * @throws IllegalArgumentException when {@code scriptStream} is - * {@code null} - * @throws UncheckedIOException when the stream cannot be read - */ - public B script(InputStream scriptStream) { - if (scriptStream == null) { - throw new IllegalArgumentException("scriptStream must not be null"); - } - try (InputStream in = scriptStream; ByteArrayOutputStream out = new ByteArrayOutputStream()) { - byte[] buffer = new byte[8192]; - int read; - while ((read = in.read(buffer)) != -1) { - out.write(buffer, 0, read); - } - return script(new String(out.toByteArray(), StandardCharsets.UTF_8)); - } catch (IOException ex) { - throw new UncheckedIOException("Failed to read script stream", ex); - } - } - /** * Provides data that will be delivered on standard input when the script * runs. @@ -1030,10 +905,6 @@ private TestResult executeAndCapture(ExecutionEnvironment env) throws Exception layout.expectedException, null); } catch (Throwable ex) { - OutputLimitExceededException outputLimitException = findOutputLimitExceeded(ex); - if (outputLimitException != null) { - throw outputLimitException; - } if (layout.expectedException != null && layout.expectedException.isInstance(ex)) { return new TestResult( layout.description, @@ -1103,6 +974,8 @@ private static final class AwkTestCase extends BaseTestCase { private final Awk customAwk; private final List extensions; private final InputSource inputSource; + private final Reader scriptReader; + private final Path scriptPath; AwkTestCase( TestLayout layout, @@ -1113,19 +986,34 @@ private static final class AwkTestCase extends BaseTestCase { Map preAssignments, Awk customAwk, List extensions, - InputSource inputSource) { + InputSource inputSource, + Reader scriptReader, + Path scriptPath) { super(layout, fileContents, operandSpecs, pathPlaceholders, requiresPosix); this.preAssignments = new LinkedHashMap<>(preAssignments); this.customAwk = customAwk; this.extensions = new ArrayList<>(extensions); this.inputSource = inputSource; + this.scriptReader = scriptReader; + this.scriptPath = scriptPath; } @Override protected ActualResult execute(ExecutionEnvironment env) throws Exception { Awk awk = customAwk != null ? customAwk : new Awk(extensions); StringBuilder out = new StringBuilder(); - AwkProgram program = awk.compile(resolvedScript(env)); + AwkProgram program; + if (scriptPath != null) { + try (BufferedReader reader = Files.newBufferedReader(scriptPath, StandardCharsets.UTF_8)) { + program = awk.compile(reader); + } + } else if (scriptReader != null) { + try (Reader reader = scriptReader) { + program = awk.compile(reader); + } + } else { + program = awk.compile(resolvedScript(env)); + } Awk.AwkRunBuilder builder = awk .script(program) .arguments(resolvedOperands(env)) @@ -1151,10 +1039,6 @@ protected ActualResult execute(ExecutionEnvironment env) throws Exception { private static final class CliTestCase extends BaseTestCase { private final List argumentSpecs; private final Map assignments; - private final boolean emulateCliMain; - private final boolean mergeStdoutAndStderr; - private final Integer maxOutputBytes; - private final byte[] stdinBytes; CliTestCase( TestLayout layout, @@ -1163,36 +1047,24 @@ private static final class CliTestCase extends BaseTestCase { List pathPlaceholders, boolean requiresPosix, List argumentSpecs, - Map assignments, - boolean emulateCliMain, - boolean mergeStdoutAndStderr, - Integer maxOutputBytes, - byte[] stdinBytes) { + Map assignments) { super(layout, fileContents, operandSpecs, pathPlaceholders, requiresPosix); this.argumentSpecs = new ArrayList<>(argumentSpecs); this.assignments = new LinkedHashMap<>(assignments); - this.emulateCliMain = emulateCliMain; - this.mergeStdoutAndStderr = mergeStdoutAndStderr; - this.maxOutputBytes = maxOutputBytes; - this.stdinBytes = stdinBytes != null ? Arrays.copyOf(stdinBytes, stdinBytes.length) : null; } @Override protected ActualResult execute(ExecutionEnvironment env) throws Exception { String stdin = resolvedStdin(env); - InputStream in = stdinBytes != null ? - new ByteArrayInputStream(Arrays.copyOf(stdinBytes, stdinBytes.length)) : - stdin != null ? - new ByteArrayInputStream(stdin.getBytes(StandardCharsets.UTF_8)) : - new ByteArrayInputStream(new byte[0]); - ByteArrayOutputStream outBytes = maxOutputBytes != null ? - new LimitedByteArrayOutputStream(maxOutputBytes.intValue()) : - new ByteArrayOutputStream(); - PrintStream stdout = new PrintStream(outBytes, true, StandardCharsets.UTF_8.name()); - PrintStream stderr = mergeStdoutAndStderr ? - stdout : - new PrintStream(new ByteArrayOutputStream(), true, StandardCharsets.UTF_8.name()); - Cli cli = new Cli(in, stdout, stderr); + InputStream in = stdin != null ? + new ByteArrayInputStream(stdin.getBytes(StandardCharsets.UTF_8)) : + new ByteArrayInputStream(new byte[0]); + ByteArrayOutputStream outBytes = new ByteArrayOutputStream(); + ByteArrayOutputStream errBytes = new ByteArrayOutputStream(); + Cli cli = new Cli( + in, + new PrintStream(outBytes, true, StandardCharsets.UTF_8.name()), + new PrintStream(errBytes, true, StandardCharsets.UTF_8.name())); List args = new ArrayList<>(); for (Map.Entry entry : assignments.entrySet()) { @@ -1210,12 +1082,8 @@ protected ActualResult execute(ExecutionEnvironment env) throws Exception { int exitCode = 0; try { - if (emulateCliMain) { - exitCode = executeLikeCliMain(cli, stderr, args); - } else { - cli.parse(args.toArray(new String[0])); - cli.run(); - } + cli.parse(args.toArray(new String[0])); + cli.run(); } catch (ExitException ex) { exitCode = ex.getCode(); } @@ -1223,60 +1091,6 @@ protected ActualResult execute(ExecutionEnvironment env) throws Exception { outBytes.toString(StandardCharsets.UTF_8.name()), exitCode); } - - private static int executeLikeCliMain(Cli cli, PrintStream err, List args) throws Exception { - try { - cli.parse(args.toArray(new String[0])); - cli.run(); - return 0; - } catch (ExitException ex) { - return ex.getCode(); - } catch (AwkRuntimeException ex) { - OutputLimitExceededException outputLimitException = findOutputLimitExceeded(ex); - if (outputLimitException != null) { - throw outputLimitException; - } - if (ex.getLineNumber() > 0) { - err.printf("%s (line %d): %s%n", ex.getClass().getSimpleName(), ex.getLineNumber(), ex.getMessage()); - } else { - err.printf("%s: %s%n", ex.getClass().getSimpleName(), ex.getMessage()); - } - return 1; - } catch (IllegalArgumentException ex) { - err.println("Failed to parse arguments. Please see the help/usage output (cmd line switch '-h')."); - ex.printStackTrace(err); - return 1; - } catch (Exception ex) { - err.printf("%s: %s%n", ex.getClass().getSimpleName(), ex.getMessage()); - return 1; - } - } - } - - private static final class LimitedByteArrayOutputStream extends ByteArrayOutputStream { - private final int maxBytes; - - LimitedByteArrayOutputStream(int maxBytes) { - this.maxBytes = maxBytes; - } - - @Override - public synchronized void write(int b) { - ensureCapacityFor(1); - super.write(b); - } - - @Override - public synchronized void write(byte[] b, int off, int len) { - ensureCapacityFor(len); - super.write(b, off, len); - } - - private void ensureCapacityFor(int additionalBytes) { - if (additionalBytes > 0 && count > maxBytes - additionalBytes) { - throw new OutputLimitExceededException(maxBytes); - } - } } private static final class ExecutionEnvironment { @@ -1356,7 +1170,7 @@ private static final class TestLayout { } } - static void deleteRecursively(Path root) throws IOException { + private static void deleteRecursively(Path root) throws IOException { if (root == null || !Files.exists(root)) { return; } @@ -1371,38 +1185,6 @@ static void deleteRecursively(Path root) throws IOException { } } - private static OutputLimitExceededException findOutputLimitExceeded(Throwable throwable) { - Throwable current = throwable; - while (current != null) { - if (current instanceof OutputLimitExceededException) { - return (OutputLimitExceededException) current; - } - current = current.getCause(); - } - return null; - } - - private static void copyToDirectory(Path sourceDirectory, Path destinationDirectory, Path sourcePath) { - try { - Path relativePath = sourceDirectory.relativize(sourcePath); - if (relativePath.toString().isEmpty()) { - return; - } - Path destination = destinationDirectory.resolve(relativePath); - if (Files.isDirectory(sourcePath)) { - Files.createDirectories(destination); - } else { - Path parent = destination.getParent(); - if (parent != null) { - Files.createDirectories(parent); - } - Files.copy(sourcePath, destination); - } - } catch (IOException ex) { - throw new IllegalStateException("Failed to stage test resource " + sourcePath, ex); - } - } - private static String escapeForAwkString(String value) { StringBuilder builder = new StringBuilder(value.length() * 2); for (int i = 0; i < value.length(); i++) { diff --git a/src/test/java/io/jawk/AwkTestSupportTest.java b/src/test/java/io/jawk/AwkTestSupportTest.java deleted file mode 100644 index 746b213d..00000000 --- a/src/test/java/io/jawk/AwkTestSupportTest.java +++ /dev/null @@ -1,113 +0,0 @@ -package io.jawk; - -/*- - * ╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲ - * Jawk - * ჻჻჻჻჻჻ - * Copyright (C) 2006 - 2026 MetricsHub - * ჻჻჻჻჻჻ - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . - * ╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱ - */ - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; - -import java.nio.charset.StandardCharsets; -import java.nio.file.Files; -import java.nio.file.Path; -import org.junit.Test; - -/** - * Unit tests for generic helpers in {@link AwkTestSupport}. - */ -public class AwkTestSupportTest { - - /** - * Verifies that newline normalization collapses both CRLF and lone CR - * sequences to LF. - */ - @Test - public void normalizeNewlines() { - assertEquals("a\nb\nc\n", AwkTestSupport.normalizeNewlines("a\r\nb\rc\r\n")); - } - - /** - * Verifies that CLI transcript parsing splits the synthetic exit-code trailer - * from the expected output content. - */ - @Test - public void readExpectedCliTranscriptWithExitCode() throws Exception { - Path transcript = Files.createTempFile("jawk-support-transcript", ".ok"); - try { - Files.write(transcript, "fail\r\nEXIT CODE: 2\r\n".getBytes(StandardCharsets.UTF_8)); - AwkTestSupport.ExpectedCliTranscript expected = AwkTestSupport - .readExpectedCliTranscript(transcript, "EXIT CODE: "); - assertEquals("fail\n", expected.output()); - assertEquals(Integer.valueOf(2), expected.exitCode()); - } finally { - AwkTestSupport.deleteRecursively(transcript); - } - } - - /** - * Verifies that CLI transcript parsing leaves the exit code unset when the - * expected file contains only output. - * - * @throws Exception when preparing or cleaning the temporary transcript path - * fails - */ - @Test - public void readExpectedCliTranscriptWithoutExitCode() throws Exception { - Path transcript = Files.createTempFile("jawk-support-transcript", ".ok"); - try { - Files.write(transcript, "ok\r\n".getBytes(StandardCharsets.UTF_8)); - AwkTestSupport.ExpectedCliTranscript expected = AwkTestSupport - .readExpectedCliTranscript(transcript, "EXIT CODE: "); - assertEquals("ok\n", expected.output()); - assertNull(expected.exitCode()); - } finally { - AwkTestSupport.deleteRecursively(transcript); - } - } - - /** - * Verifies that resource staging copies nested fixture trees into a fresh - * temporary directory. - * - * @throws Exception when preparing or cleaning the temporary directories - * fails - */ - @Test - public void stageDirectoryCopiesNestedFixtures() throws Exception { - Path sourceDirectory = Files.createTempDirectory("jawk-support-source"); - Path nestedFile = sourceDirectory.resolve("nested").resolve("fixture.txt"); - Files.createDirectories(nestedFile.getParent()); - Files.write(nestedFile, "hello".getBytes(StandardCharsets.UTF_8)); - - Path stagedDirectory = null; - try { - stagedDirectory = AwkTestSupport.stageDirectory(sourceDirectory, "jawk-support-stage-"); - assertEquals( - "hello", - new String( - Files.readAllBytes(stagedDirectory.resolve("nested").resolve("fixture.txt")), - StandardCharsets.UTF_8)); - } finally { - AwkTestSupport.deleteRecursively(stagedDirectory); - AwkTestSupport.deleteRecursively(sourceDirectory); - } - } -} diff --git a/src/test/java/io/jawk/CliOptionTest.java b/src/test/java/io/jawk/CliOptionTest.java index 8e94f1e2..9c2e7503 100644 --- a/src/test/java/io/jawk/CliOptionTest.java +++ b/src/test/java/io/jawk/CliOptionTest.java @@ -128,26 +128,6 @@ public void helpOutputDoesNotAdvertiseUnsupportedOutputOption() throws Exception assertFalse(result.output().contains(" -o = ")); } - @Test(expected = AwkTestSupport.OutputLimitExceededException.class) - public void cliTestBuilderRejectsRunawayOutput() throws Exception { - AwkTestSupport - .cliTest("CLI output limit") - .script("BEGIN { for (i = 0; i < 1000; i++) print \"0123456789\" }") - .maxOutputBytes(64) - .run(); - } - - @Test - public void cliTestBuilderAcceptsRawStdinBytes() throws Exception { - AwkTestSupport - .cliTest("CLI raw stdin bytes") - .script("{ print length($0) }") - .stdin(new byte[] - { (byte) 0xED, (byte) 0xA0, (byte) 0x80, '\n' }) - .expectLines("1") - .runAndAssert(); - } - @Test public void loadOptionWithWrongSerializedTypeThrowsFriendlyError() throws Exception { File bad = tempFolder.newFile("wrong-type.ser"); diff --git a/src/test/java/io/jawk/GawkMaketestsParserTest.java b/src/test/java/io/jawk/GawkMaketestsParserTest.java deleted file mode 100644 index 4c988ffa..00000000 --- a/src/test/java/io/jawk/GawkMaketestsParserTest.java +++ /dev/null @@ -1,283 +0,0 @@ -package io.jawk; - -/*- - * ╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲ - * Jawk - * ჻჻჻჻჻჻ - * Copyright (C) 2006 - 2026 MetricsHub - * ჻჻჻჻჻჻ - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . - * ╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱ - */ - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; - -import java.io.StringReader; -import java.util.List; -import org.junit.Test; - -/** - * Unit tests for the metadata parser that converts gawk's generated - * {@code Maketests} rules into Jawk compatibility cases. - */ -public class GawkMaketestsParserTest { - - /** - * Verifies that a standard generated AWK rule preserves stdin redirection and - * the default expected output file. - * - * @throws Exception when parsing the sample metadata fails - */ - @Test - public void parseStandardRuleWithStdin() throws Exception { - GawkMaketestsParser.GawkCase gawkCase = parseSingleCase( - "Gt-dummy:\n" - + "# file Maketests\n\n" - + "addcomma:\n" - + "\t@echo $@\n" - + "\t@-AWKPATH=\"$(srcdir)\" $(AWK) -f $@.awk < \"$(srcdir)\"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@\n" - + "\t@-$(CMP) \"$(srcdir)\"/$@.ok _$@ && rm -f _$@\n"); - - assertEquals("addcomma", gawkCase.name()); - assertEquals("awk", gawkCase.scriptMode()); - assertEquals("addcomma.awk", gawkCase.scriptFileName()); - assertEquals("addcomma.in", gawkCase.stdinFileName()); - assertEquals("addcomma.ok", gawkCase.expectedFileName()); - assertFalse(gawkCase.requiresExplicitSkip()); - } - - /** - * Verifies that locale directives and supported CLI flags are preserved for - * later execution by the Jawk harness. - * - * @throws Exception when parsing the sample metadata fails - */ - @Test - public void parseLocaleAndSupportedFlags() throws Exception { - GawkMaketestsParser.GawkCase gawkCase = parseSingleCase( - "concat4:\n" - + "\t@echo $@\n" - + "\t@-[ -z \"$$GAWKLOCALE\" ] && GAWKLOCALE=en_US.UTF-8; export GAWKLOCALE; \\\n" - + "\tAWKPATH=\"$(srcdir)\" $(AWK) -f $@.awk --posix >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@\n" - + "\t@-$(CMP) \"$(srcdir)\"/$@.ok _$@ && rm -f _$@\n"); - - assertEquals("en-US", gawkCase.localeTag()); - assertEquals(1, gawkCase.runnableFlags().size()); - assertEquals("--posix", gawkCase.runnableFlags().get(0)); - assertFalse(gawkCase.requiresExplicitSkip()); - } - - /** - * Verifies that the POSIX {@code C} locale does not force a JVM locale - * override in the Jawk harness. - * - * @throws Exception when parsing the sample metadata fails - */ - @Test - public void parseCLocaleAsNoOverride() throws Exception { - GawkMaketestsParser.GawkCase gawkCase = parseSingleCase( - "localecase:\n" - + "\t@echo $@\n" - + "\t@-[ -z \"$$GAWKLOCALE\" ] && GAWKLOCALE=C; export GAWKLOCALE; \\\n" - + "\tAWKPATH=\"$(srcdir)\" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@\n" - + "\t@-$(CMP) \"$(srcdir)\"/$@.ok _$@ && rm -f _$@\n"); - - assertNull(gawkCase.localeTag()); - } - - /** - * Verifies that gawk locale modifiers such as {@code @euro} are ignored when - * mapping the locale to a BCP-47 language tag. - * - * @throws Exception when parsing the sample metadata fails - */ - @Test - public void parseLocaleWithModifier() throws Exception { - GawkMaketestsParser.GawkCase gawkCase = parseSingleCase( - "localemod:\n" - + "\t@echo $@\n" - + "\t@-[ -z \"$$GAWKLOCALE\" ] && GAWKLOCALE=de_DE@euro; export GAWKLOCALE; \\\n" - + "\tAWKPATH=\"$(srcdir)\" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@\n" - + "\t@-$(CMP) \"$(srcdir)\"/$@.ok _$@ && rm -f _$@\n"); - - assertEquals("de-DE", gawkCase.localeTag()); - } - - /** - * Verifies that shell-script rules are identified as explicit skips because - * the Jawk harness does not execute external shell scripts in-process. - * - * @throws Exception when parsing the sample metadata fails - */ - @Test - public void parseShellRuleAsUnsupported() throws Exception { - GawkMaketestsParser.GawkCase gawkCase = parseSingleCase( - "randtest:\n" - + "\t@echo $@\n" - + "\t@-$(LOCALES) AWK=\"$(AWKPROG)\" \"$(srcdir)\"/$@.sh > _$@ 2>&1 || echo EXIT CODE: $$? >>_$@\n" - + "\t@-$(CMP) \"$(srcdir)\"/$@.ok _$@ && rm -f _$@\n"); - - assertEquals("sh", gawkCase.scriptMode()); - assertTrue(gawkCase.requiresExplicitSkip()); - assertTrue(gawkCase.unsupportedFlags().isEmpty()); - } - - /** - * Verifies that shell-script rules remain classified as shell-driven even when - * another recipe line mentions {@code $(AWK)} for logging or environment setup. - * - * @throws Exception when parsing the sample metadata fails - */ - @Test - public void parseShellRuleWhenAnotherLineMentionsAwk() throws Exception { - GawkMaketestsParser.GawkCase gawkCase = parseSingleCase( - "shellmeta:\n" - + "\t@echo using $(AWK)\n" - + "\t@-$(LOCALES) AWK=\"$(AWKPROG)\" \"$(srcdir)\"/$@.sh > _$@ 2>&1 || echo EXIT CODE: $$? >>_$@\n" - + "\t@-$(CMP) \"$(srcdir)\"/$@.ok _$@ && rm -f _$@\n"); - - assertEquals("sh", gawkCase.scriptMode()); - assertTrue(gawkCase.requiresExplicitSkip()); - } - - /** - * Verifies that unsupported gawk-only CLI flags are surfaced for explicit - * skip coverage. - * - * @throws Exception when parsing the sample metadata fails - */ - @Test - public void parseUnsupportedFlags() throws Exception { - GawkMaketestsParser.GawkCase gawkCase = parseSingleCase( - "csv1:\n" - + "\t@echo $@\n" - + "\t@-AWKPATH=\"$(srcdir)\" $(AWK) -f $@.awk --csv < \"$(srcdir)\"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@\n" - + "\t@-$(CMP) \"$(srcdir)\"/$@.ok _$@ && rm -f _$@\n"); - - assertEquals(1, gawkCase.unsupportedFlags().size()); - assertEquals("--csv", gawkCase.unsupportedFlags().get(0)); - assertTrue(gawkCase.requiresExplicitSkip()); - } - - /** - * Verifies that MPFR-specific expected-output switching is retained in the - * parsed metadata even when Jawk does not execute the test in bignum mode. - * - * @throws Exception when parsing the sample metadata fails - */ - @Test - public void parseMpfrExpectedVariant() throws Exception { - GawkMaketestsParser.GawkCase gawkCase = parseSingleCase( - "arraytype:\n" - + "\t@echo $@\n" - + "\t@-AWKPATH=\"$(srcdir)\" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@\n" - + "\t@-if echo \"$$GAWK_TEST_ARGS\" | egrep -q -e '-M|--bignum' > /dev/null ; \\\n" - + "\tthen $(CMP) \"$(srcdir)\"/$@-mpfr.ok _$@ && rm -f _$@ ; \\\n" - + "\telse $(CMP) \"$(srcdir)\"/$@.ok _$@ && rm -f _$@ ; fi\n"); - - assertTrue(gawkCase.hasMpfrExpectedVariant()); - assertEquals("arraytype.ok", gawkCase.expectedFileName()); - } - - /** - * Verifies that gawk CLI flags that Jawk implements implicitly can be parsed - * without forcing an explicit skip entry. - * - * @throws Exception when parsing the sample metadata fails - */ - @Test - public void parseNoOpCompatibilityFlags() throws Exception { - GawkMaketestsParser.GawkCase gawkCase = parseSingleCase( - "reint:\n" - + "\t@echo $@\n" - + "\t@-AWKPATH=\"$(srcdir)\" $(AWK) -f $@.awk --re-interval < \"$(srcdir)\"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@\n" - + "\t@-$(CMP) \"$(srcdir)\"/$@.ok _$@ && rm -f _$@\n"); - - assertTrue(gawkCase.flags().contains("--re-interval")); - assertTrue(gawkCase.unsupportedFlags().isEmpty()); - assertFalse(gawkCase.requiresExplicitSkip()); - } - - /** - * Verifies that unclassified flags are treated as unsupported so the harness - * does not silently run altered semantics. - * - * @throws Exception when parsing the sample metadata fails - */ - @Test - public void parseUnknownFlagsAsUnsupported() throws Exception { - GawkMaketestsParser.GawkCase gawkCase = parseSingleCase( - "mystery:\n" - + "\t@echo $@\n" - + "\t@-AWKPATH=\"$(srcdir)\" $(AWK) -f $@.awk --mystery < \"$(srcdir)\"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@\n" - + "\t@-$(CMP) \"$(srcdir)\"/$@.ok _$@ && rm -f _$@\n"); - - assertTrue(gawkCase.flags().contains("--mystery")); - assertEquals(1, gawkCase.unsupportedFlags().size()); - assertEquals("--mystery", gawkCase.unsupportedFlags().get(0)); - assertTrue(gawkCase.requiresExplicitSkip()); - } - - /** - * Verifies that short gawk options are detected instead of being silently - * ignored when generated metadata grows beyond the current snapshot. - * - * @throws Exception when parsing the sample metadata fails - */ - @Test - public void parseShortFlagsAsUnsupported() throws Exception { - GawkMaketestsParser.GawkCase gawkCase = parseSingleCase( - "shortopt:\n" - + "\t@echo $@\n" - + "\t@-AWKPATH=\"$(srcdir)\" $(AWK) -v name=value -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@\n" - + "\t@-$(CMP) \"$(srcdir)\"/$@.ok _$@ && rm -f _$@\n"); - - assertTrue(gawkCase.flags().contains("-v")); - assertTrue(gawkCase.flags().contains("-f")); - assertEquals(1, gawkCase.unsupportedFlags().size()); - assertEquals("-v", gawkCase.unsupportedFlags().get(0)); - assertTrue(gawkCase.requiresExplicitSkip()); - } - - /** - * Verifies that flags are collected from every AWK invocation line in the - * recipe block instead of depending on a single matching line. - * - * @throws Exception when parsing the sample metadata fails - */ - @Test - public void parseFlagsAcrossMultipleAwkCommandLines() throws Exception { - GawkMaketestsParser.GawkCase gawkCase = parseSingleCase( - "multiawk:\n" - + "\t@echo $@\n" - + "\t@-if test -n \"$$GAWK_TEST_ARGS\"; then AWKPATH=\"$(srcdir)\" $(AWK) --posix -f $@.awk >_$@ 2>&1; fi\n" - + "\t@-AWKPATH=\"$(srcdir)\" $(AWK) --sandbox -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@\n" - + "\t@-$(CMP) \"$(srcdir)\"/$@.ok _$@ && rm -f _$@\n"); - - assertTrue(gawkCase.flags().contains("--posix")); - assertTrue(gawkCase.flags().contains("--sandbox")); - assertEquals(2, gawkCase.runnableFlags().size()); - assertFalse(gawkCase.requiresExplicitSkip()); - } - - private static GawkMaketestsParser.GawkCase parseSingleCase(String maketestsSnippet) throws Exception { - List cases = GawkMaketestsParser.parse(new StringReader(maketestsSnippet)); - assertEquals(1, cases.size()); - return cases.get(0); - } -} From ab6ea81fac3555f4ddd58b349dfb090ba7a34139 Mon Sep 17 00:00:00 2001 From: Bertrand Martin Date: Thu, 23 Apr 2026 20:01:27 +0200 Subject: [PATCH 12/15] Handle zero-length regex record separators --- .../java/io/jawk/jrt/PartitioningReader.java | 35 ++++++++++++++----- src/test/java/io/jawk/AwkTest.java | 15 ++++++++ 2 files changed, 41 insertions(+), 9 deletions(-) diff --git a/src/main/java/io/jawk/jrt/PartitioningReader.java b/src/main/java/io/jawk/jrt/PartitioningReader.java index bf3c86c4..76b09cc7 100644 --- a/src/main/java/io/jawk/jrt/PartitioningReader.java +++ b/src/main/java/io/jawk/jrt/PartitioningReader.java @@ -159,13 +159,7 @@ public int read(char[] b, int start, int len) throws IOException { * @throws java.io.IOException upon an IO error */ public String readRecord() throws IOException { - if (matcher == null) { - matcher = rs.matcher(remaining); - } else { - matcher.reset(remaining); - } - - while (consumeAll || eof || remaining.length() == 0 || !matcher.find()) { + while (consumeAll || eof || remaining.length() == 0 || !findRecordSeparator()) { int len = read(readBuffer, 0, readBuffer.length); if (eof || (len < 0)) { eof = true; @@ -179,7 +173,6 @@ public String readRecord() throws IOException { } else if (len == 0) { throw new RuntimeException("len == 0 ?!"); } - matcher = rs.matcher(remaining); } // if force greedy regex consumption: @@ -191,7 +184,9 @@ public String readRecord() throws IOException { // (one char at a time!) while (matcher.find() && matcher.end() == remaining.length() && matcher.requireEnd()) { if (read(readBuffer, 0, 1) >= 0) { - matcher = rs.matcher(remaining); + if (!findRecordSeparator()) { + break; + } } else { break; } @@ -204,4 +199,26 @@ public String readRecord() throws IOException { remaining.delete(0, matcher.end()); return retVal; } + + /** + * Finds the next record separator match that consumes at least one + * character. Zero-length regular-expression matches are ignored because + * using them as separators would not advance the reader and would loop + * forever on nullable regexes such as {@code ()}. + * + * @return {@code true} when a non-empty record separator match was found + */ + private boolean findRecordSeparator() { + if (matcher == null) { + matcher = rs.matcher(remaining); + } else { + matcher.reset(remaining); + } + while (matcher.find()) { + if (matcher.start() != matcher.end()) { + return true; + } + } + return false; + } } diff --git a/src/test/java/io/jawk/AwkTest.java b/src/test/java/io/jawk/AwkTest.java index 1ea8339d..79047407 100644 --- a/src/test/java/io/jawk/AwkTest.java +++ b/src/test/java/io/jawk/AwkTest.java @@ -1260,6 +1260,21 @@ public void awkTestSupportCanExecuteScriptFromPath() throws Exception { } } + /** + * Ensures that a nullable regular-expression record separator does not loop + * forever and instead falls back to consuming the remaining input as a + * single record. + */ + @Test + public void zeroLengthRegexRecordSeparatorConsumesWholeInput() throws Exception { + AwkTestSupport + .awkTest("zero-length regex RS") + .script("BEGIN { RS = \"()\" }\n{ printf(\"<<%s>>\\n<%s>\\n\", $0, RT) }") + .stdin("foo\n") + .expect("<>\n<>\n") + .runAndAssert(); + } + /** * Ensures that providing explicit extensions to the {@link Awk} constructor * does not interfere with tuple execution. From 088169340dacba3b4d0747918dcd05f19049201c Mon Sep 17 00:00:00 2001 From: Bertrand Martin Date: Thu, 23 Apr 2026 20:01:40 +0200 Subject: [PATCH 13/15] Split gawk compatibility suites by test family --- src/it/java/io/jawk/AbstractGawkSuite.java | 59 + src/it/java/io/jawk/GawkExtensionIT.java | 1800 ++++++++++++++ src/it/java/io/jawk/GawkIT.java | 2204 +---------------- src/it/java/io/jawk/GawkLocaleIT.java | 246 ++ src/it/java/io/jawk/GawkManualIT.java | 734 ------ .../java/io/jawk/GawkOptionalFeatureIT.java | 741 ++++++ src/site/markdown/compatibility.md | 8 +- 7 files changed, 2931 insertions(+), 2861 deletions(-) create mode 100644 src/it/java/io/jawk/AbstractGawkSuite.java create mode 100644 src/it/java/io/jawk/GawkExtensionIT.java create mode 100644 src/it/java/io/jawk/GawkLocaleIT.java delete mode 100644 src/it/java/io/jawk/GawkManualIT.java create mode 100644 src/it/java/io/jawk/GawkOptionalFeatureIT.java diff --git a/src/it/java/io/jawk/AbstractGawkSuite.java b/src/it/java/io/jawk/AbstractGawkSuite.java new file mode 100644 index 00000000..634c3910 --- /dev/null +++ b/src/it/java/io/jawk/AbstractGawkSuite.java @@ -0,0 +1,59 @@ +package io.jawk; + +/*- + * ╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲ + * Jawk + * ჻჻჻჻჻჻ + * Copyright 2006 - 2026 MetricsHub + * ჻჻჻჻჻჻ + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * . + * ╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱ + */ + +import static org.junit.Assume.assumeTrue; + +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Path; + +/** + * Shared helpers for the explicit gawk compatibility integration suites. + */ +abstract class AbstractGawkSuite { + + protected static final Path GAWK_DIRECTORY = CompatibilityTestResources + .resourceDirectory(AbstractGawkSuite.class, "gawk"); + protected static final String NON_ZERO_TRANSCRIPT_REASON = "This case compares a non-zero gawk CLI transcript, which is intentionally skipped in the explicit AwkTestSupport.cliTest suite."; + protected static final String NON_UTF8_STDIN_REASON = "This case redirects stdin that is not valid UTF-8, which is intentionally skipped in the explicit AwkTestSupport.cliTest suite."; + protected static final String NON_UTF8_EXPECTED_REASON = "This case uses an expected .ok file that is not valid UTF-8, which is intentionally skipped in the explicit AwkTestSupport.cliTest suite."; + protected static final String MANUAL_SKIP_REASON = "Handwritten gawk case from Makefile.am not yet expressed as an AwkTestSupport.cliTest case."; + + protected static Path gawkPath(String fileName) { + return GAWK_DIRECTORY.resolve(fileName); + } + + protected static String gawkFile(String fileName) { + return gawkPath(fileName).toString(); + } + + protected static String gawkText(String fileName) throws IOException { + return new String(Files.readAllBytes(gawkPath(fileName)), StandardCharsets.UTF_8); + } + + protected static void skip(String reason) { + assumeTrue(reason, false); + } +} diff --git a/src/it/java/io/jawk/GawkExtensionIT.java b/src/it/java/io/jawk/GawkExtensionIT.java new file mode 100644 index 00000000..cf0436b4 --- /dev/null +++ b/src/it/java/io/jawk/GawkExtensionIT.java @@ -0,0 +1,1800 @@ +package io.jawk; + +/*- + * ╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲ + * Jawk + * ჻჻჻჻჻჻ + * Copyright (C) 2006 - 2026 MetricsHub + * ჻჻჻჻჻჻ + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * . + * ╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱ + */ + +import org.junit.Test; + +/** + * Extension-oriented gawk compatibility cases mirrored from the vendored extension-style gawk groups. + */ +public class GawkExtensionIT extends AbstractGawkSuite { + + @Test + public void test_aadelete1() throws Exception { + AwkTestSupport + .cliTest("GAWK aadelete1") + .argument("-f", gawkFile("aadelete1.awk")) + .expectLines(gawkPath("aadelete1.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_aadelete2() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_aarray1() throws Exception { + AwkTestSupport + .cliTest("GAWK aarray1") + .argument("-f", gawkFile("aarray1.awk")) + .expectLines(gawkPath("aarray1.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_aasort() throws Exception { + AwkTestSupport + .cliTest("GAWK aasort") + .argument("-f", gawkFile("aasort.awk")) + .expectLines(gawkPath("aasort.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_aasorti() throws Exception { + AwkTestSupport + .cliTest("GAWK aasorti") + .argument("-f", gawkFile("aasorti.awk")) + .expectLines(gawkPath("aasorti.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_arraysort() throws Exception { + AwkTestSupport + .cliTest("GAWK arraysort") + .argument("-f", gawkFile("arraysort.awk")) + .expectLines(gawkPath("arraysort.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_arraysort2() throws Exception { + AwkTestSupport + .cliTest("GAWK arraysort2") + .argument("-f", gawkFile("arraysort2.awk")) + .expectLines(gawkPath("arraysort2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_arraytype() throws Exception { + AwkTestSupport + .cliTest("GAWK arraytype") + .argument("-f", gawkFile("arraytype.awk")) + .expectLines(gawkPath("arraytype.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_asortbool() throws Exception { + AwkTestSupport + .cliTest("GAWK asortbool") + .argument("-f", gawkFile("asortbool.awk")) + .expectLines(gawkPath("asortbool.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_backw() throws Exception { + AwkTestSupport + .cliTest("GAWK backw") + .argument("-f", gawkFile("backw.awk")) + .stdin(gawkText("backw.in")) + .expectLines(gawkPath("backw.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_asortsymtab() throws Exception { + AwkTestSupport + .cliTest("GAWK asortsymtab") + .argument("-f", gawkFile("asortsymtab.awk")) + .expectLines(gawkPath("asortsymtab.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_clos1way() throws Exception { + AwkTestSupport + .cliTest("GAWK clos1way") + .argument("-f", gawkFile("clos1way.awk")) + .expectLines(gawkPath("clos1way.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_clos1way2() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_clos1way3() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_clos1way4() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_clos1way5() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_clos1way6() throws Exception { + AwkTestSupport + .cliTest("GAWK clos1way6") + .argument("-f", gawkFile("clos1way6.awk")) + .expectLines(gawkPath("clos1way6.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_commas() throws Exception { + AwkTestSupport + .cliTest("GAWK commas") + .argument("--locale", "en-US") + .argument("-f", gawkFile("commas.awk")) + .expectLines(gawkPath("commas.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_crlf() throws Exception { + AwkTestSupport + .cliTest("GAWK crlf") + .argument("-f", gawkFile("crlf.awk")) + .expectLines(gawkPath("crlf.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_delsub() throws Exception { + AwkTestSupport + .cliTest("GAWK delsub") + .argument("-f", gawkFile("delsub.awk")) + .expectLines(gawkPath("delsub.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_dfacheck1() throws Exception { + AwkTestSupport + .cliTest("GAWK dfacheck1") + .argument("-f", gawkFile("dfacheck1.awk")) + .stdin(gawkText("dfacheck1.in")) + .expectLines(gawkPath("dfacheck1.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_elemnew1() throws Exception { + AwkTestSupport + .cliTest("GAWK elemnew1") + .argument("-f", gawkFile("elemnew1.awk")) + .expectLines(gawkPath("elemnew1.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_elemnew2() throws Exception { + AwkTestSupport + .cliTest("GAWK elemnew2") + .argument("-f", gawkFile("elemnew2.awk")) + .expectLines(gawkPath("elemnew2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_elemnew3() throws Exception { + AwkTestSupport + .cliTest("GAWK elemnew3") + .argument("-f", gawkFile("elemnew3.awk")) + .expectLines(gawkPath("elemnew3.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_exit() throws Exception { + skip( + "Shell-script target generated by Maketests; the in-process Jawk harness does not execute external shell scripts."); + } + + @Test + public void test_fieldwdth() throws Exception { + AwkTestSupport + .cliTest("GAWK fieldwdth") + .argument("-f", gawkFile("fieldwdth.awk")) + .stdin(gawkText("fieldwdth.in")) + .expectLines(gawkPath("fieldwdth.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_fpat1() throws Exception { + AwkTestSupport + .cliTest("GAWK fpat1") + .argument("-f", gawkFile("fpat1.awk")) + .stdin(gawkText("fpat1.in")) + .expectLines(gawkPath("fpat1.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_fpat2() throws Exception { + AwkTestSupport + .cliTest("GAWK fpat2") + .argument("-f", gawkFile("fpat2.awk")) + .expectLines(gawkPath("fpat2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_fpat3() throws Exception { + AwkTestSupport + .cliTest("GAWK fpat3") + .argument("-f", gawkFile("fpat3.awk")) + .stdin(gawkText("fpat3.in")) + .expectLines(gawkPath("fpat3.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_fpat4() throws Exception { + AwkTestSupport + .cliTest("GAWK fpat4") + .argument("-f", gawkFile("fpat4.awk")) + .expectLines(gawkPath("fpat4.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_fpat5() throws Exception { + AwkTestSupport + .cliTest("GAWK fpat5") + .argument("-f", gawkFile("fpat5.awk")) + .stdin(gawkText("fpat5.in")) + .expectLines(gawkPath("fpat5.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_fpat6() throws Exception { + AwkTestSupport + .cliTest("GAWK fpat6") + .argument("-f", gawkFile("fpat6.awk")) + .stdin(gawkText("fpat6.in")) + .expectLines(gawkPath("fpat6.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_fpat7() throws Exception { + AwkTestSupport + .cliTest("GAWK fpat7") + .argument("-f", gawkFile("fpat7.awk")) + .stdin(gawkText("fpat7.in")) + .expectLines(gawkPath("fpat7.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_fpat8() throws Exception { + AwkTestSupport + .cliTest("GAWK fpat8") + .argument("-f", gawkFile("fpat8.awk")) + .stdin(gawkText("fpat8.in")) + .expectLines(gawkPath("fpat8.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_fpat9() throws Exception { + AwkTestSupport + .cliTest("GAWK fpat9") + .argument("-f", gawkFile("fpat9.awk")) + .stdin(gawkText("fpat9.in")) + .expectLines(gawkPath("fpat9.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_fpatnull() throws Exception { + AwkTestSupport + .cliTest("GAWK fpatnull") + .argument("-f", gawkFile("fpatnull.awk")) + .stdin(gawkText("fpatnull.in")) + .expectLines(gawkPath("fpatnull.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_fsfwfs() throws Exception { + AwkTestSupport + .cliTest("GAWK fsfwfs") + .argument("-f", gawkFile("fsfwfs.awk")) + .stdin(gawkText("fsfwfs.in")) + .expectLines(gawkPath("fsfwfs.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_functab1() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_functab2() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_functab3() throws Exception { + AwkTestSupport + .cliTest("GAWK functab3") + .argument("-f", gawkFile("functab3.awk")) + .expectLines(gawkPath("functab3.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_functab6() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_funlen() throws Exception { + AwkTestSupport + .cliTest("GAWK funlen") + .argument("-f", gawkFile("funlen.awk")) + .stdin(gawkText("funlen.in")) + .expectLines(gawkPath("funlen.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_fwtest() throws Exception { + AwkTestSupport + .cliTest("GAWK fwtest") + .argument("-f", gawkFile("fwtest.awk")) + .stdin(gawkText("fwtest.in")) + .expectLines(gawkPath("fwtest.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_fwtest2() throws Exception { + AwkTestSupport + .cliTest("GAWK fwtest2") + .argument("-f", gawkFile("fwtest2.awk")) + .stdin(gawkText("fwtest2.in")) + .expectLines(gawkPath("fwtest2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_fwtest3() throws Exception { + AwkTestSupport + .cliTest("GAWK fwtest3") + .argument("-f", gawkFile("fwtest3.awk")) + .stdin(gawkText("fwtest3.in")) + .expectLines(gawkPath("fwtest3.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_fwtest4() throws Exception { + AwkTestSupport + .cliTest("GAWK fwtest4") + .argument("-f", gawkFile("fwtest4.awk")) + .stdin(gawkText("fwtest4.in")) + .expectLines(gawkPath("fwtest4.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_fwtest5() throws Exception { + AwkTestSupport + .cliTest("GAWK fwtest5") + .argument("-f", gawkFile("fwtest5.awk")) + .stdin(gawkText("fwtest5.in")) + .expectLines(gawkPath("fwtest5.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_fwtest6() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_fwtest7() throws Exception { + AwkTestSupport + .cliTest("GAWK fwtest7") + .argument("-f", gawkFile("fwtest7.awk")) + .stdin(gawkText("fwtest7.in")) + .expectLines(gawkPath("fwtest7.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_fwtest8() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_gensub() throws Exception { + AwkTestSupport + .cliTest("GAWK gensub") + .argument("-f", gawkFile("gensub.awk")) + .stdin(gawkText("gensub.in")) + .expectLines(gawkPath("gensub.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_gensub2() throws Exception { + AwkTestSupport + .cliTest("GAWK gensub2") + .argument("-f", gawkFile("gensub2.awk")) + .expectLines(gawkPath("gensub2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_gensub3() throws Exception { + AwkTestSupport + .cliTest("GAWK gensub3") + .argument("-f", gawkFile("gensub3.awk")) + .stdin(gawkText("gensub3.in")) + .expectLines(gawkPath("gensub3.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_gensub4() throws Exception { + AwkTestSupport + .cliTest("GAWK gensub4") + .argument("-f", gawkFile("gensub4.awk")) + .expectLines(gawkPath("gensub4.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_getlndir() throws Exception { + AwkTestSupport + .cliTest("GAWK getlndir") + .argument("-f", gawkFile("getlndir.awk")) + .expectLines(gawkPath("getlndir.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_gnuops2() throws Exception { + AwkTestSupport + .cliTest("GAWK gnuops2") + .argument("-f", gawkFile("gnuops2.awk")) + .expectLines(gawkPath("gnuops2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_gnuops3() throws Exception { + AwkTestSupport + .cliTest("GAWK gnuops3") + .argument("-f", gawkFile("gnuops3.awk")) + .expectLines(gawkPath("gnuops3.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_gnureops() throws Exception { + AwkTestSupport + .cliTest("GAWK gnureops") + .argument("-f", gawkFile("gnureops.awk")) + .expectLines(gawkPath("gnureops.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_gsubind() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_icasefs() throws Exception { + AwkTestSupport + .cliTest("GAWK icasefs") + .argument("-f", gawkFile("icasefs.awk")) + .expectLines(gawkPath("icasefs.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_icasers() throws Exception { + AwkTestSupport + .cliTest("GAWK icasers") + .argument("-f", gawkFile("icasers.awk")) + .stdin(gawkText("icasers.in")) + .expectLines(gawkPath("icasers.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_id() throws Exception { + AwkTestSupport + .cliTest("GAWK id") + .argument("-f", gawkFile("id.awk")) + .expectLines(gawkPath("id.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_igncdym() throws Exception { + AwkTestSupport + .cliTest("GAWK igncdym") + .argument("-f", gawkFile("igncdym.awk")) + .stdin(gawkText("igncdym.in")) + .expectLines(gawkPath("igncdym.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_igncfs() throws Exception { + AwkTestSupport + .cliTest("GAWK igncfs") + .argument("-f", gawkFile("igncfs.awk")) + .stdin(gawkText("igncfs.in")) + .expectLines(gawkPath("igncfs.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_ignrcas2() throws Exception { + AwkTestSupport + .cliTest("GAWK ignrcas2") + .argument("--locale", "en-US") + .argument("-f", gawkFile("ignrcas2.awk")) + .expectLines(gawkPath("ignrcas2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_ignrcas4() throws Exception { + AwkTestSupport + .cliTest("GAWK ignrcas4") + .argument("-f", gawkFile("ignrcas4.awk")) + .expectLines(gawkPath("ignrcas4.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_ignrcase() throws Exception { + AwkTestSupport + .cliTest("GAWK ignrcase") + .argument("-f", gawkFile("ignrcase.awk")) + .stdin(gawkText("ignrcase.in")) + .expectLines(gawkPath("ignrcase.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_include() throws Exception { + AwkTestSupport + .cliTest("GAWK include") + .argument("-f", gawkFile("include.awk")) + .expectLines(gawkPath("include.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_indirectbuiltin() throws Exception { + AwkTestSupport + .cliTest("GAWK indirectbuiltin") + .argument("-f", gawkFile("indirectbuiltin.awk")) + .expectLines(gawkPath("indirectbuiltin.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_indirectcall() throws Exception { + AwkTestSupport + .cliTest("GAWK indirectcall") + .argument("-f", gawkFile("indirectcall.awk")) + .stdin(gawkText("indirectcall.in")) + .expectLines(gawkPath("indirectcall.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_indirectcall2() throws Exception { + AwkTestSupport + .cliTest("GAWK indirectcall2") + .argument("-f", gawkFile("indirectcall2.awk")) + .expectLines(gawkPath("indirectcall2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_indirectcall3() throws Exception { + AwkTestSupport + .cliTest("GAWK indirectcall3") + .argument("-f", gawkFile("indirectcall3.awk")) + .expectLines(gawkPath("indirectcall3.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_isarrayunset() throws Exception { + AwkTestSupport + .cliTest("GAWK isarrayunset") + .argument("-f", gawkFile("isarrayunset.awk")) + .expectLines(gawkPath("isarrayunset.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_lint() throws Exception { + AwkTestSupport + .cliTest("GAWK lint") + .argument("-f", gawkFile("lint.awk")) + .expectLines(gawkPath("lint.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_lintset() throws Exception { + AwkTestSupport + .cliTest("GAWK lintset") + .argument("-f", gawkFile("lintset.awk")) + .expectLines(gawkPath("lintset.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_match1() throws Exception { + AwkTestSupport + .cliTest("GAWK match1") + .argument("-f", gawkFile("match1.awk")) + .expectLines(gawkPath("match1.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_match2() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_match3() throws Exception { + AwkTestSupport + .cliTest("GAWK match3") + .argument("-f", gawkFile("match3.awk")) + .stdin(gawkText("match3.in")) + .expectLines(gawkPath("match3.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_mbstr1() throws Exception { + AwkTestSupport + .cliTest("GAWK mbstr1") + .argument("--locale", "en-US") + .argument("-f", gawkFile("mbstr1.awk")) + .expectLines(gawkPath("mbstr1.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_mbstr2() throws Exception { + skip(NON_UTF8_STDIN_REASON); + } + + @Test + public void test_mdim1() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_mdim2() throws Exception { + AwkTestSupport + .cliTest("GAWK mdim2") + .argument("-f", gawkFile("mdim2.awk")) + .expectLines(gawkPath("mdim2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_mdim3() throws Exception { + AwkTestSupport + .cliTest("GAWK mdim3") + .argument("-f", gawkFile("mdim3.awk")) + .expectLines(gawkPath("mdim3.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_mdim4() throws Exception { + AwkTestSupport + .cliTest("GAWK mdim4") + .argument("-f", gawkFile("mdim4.awk")) + .stdin(gawkText("mdim4.in")) + .expectLines(gawkPath("mdim4.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_mdim5() throws Exception { + AwkTestSupport + .cliTest("GAWK mdim5") + .argument("-f", gawkFile("mdim5.awk")) + .expectLines(gawkPath("mdim5.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_mdim6() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_mdim7() throws Exception { + AwkTestSupport + .cliTest("GAWK mdim7") + .argument("-f", gawkFile("mdim7.awk")) + .expectLines(gawkPath("mdim7.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_mdim8() throws Exception { + AwkTestSupport + .cliTest("GAWK mdim8") + .argument("-f", gawkFile("mdim8.awk")) + .stdin(gawkText("mdim8.in")) + .expectLines(gawkPath("mdim8.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_mktime() throws Exception { + AwkTestSupport + .cliTest("GAWK mktime") + .argument("-f", gawkFile("mktime.awk")) + .stdin(gawkText("mktime.in")) + .expectLines(gawkPath("mktime.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_modifiers() throws Exception { + skip( + "Shell-script target generated by Maketests; the in-process Jawk harness does not execute external shell scripts."); + } + + @Test + public void test_nastyparm() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_next() throws Exception { + skip( + "Shell-script target generated by Maketests; the in-process Jawk harness does not execute external shell scripts."); + } + + @Test + public void test_nondec() throws Exception { + AwkTestSupport + .cliTest("GAWK nondec") + .argument("-f", gawkFile("nondec.awk")) + .expectLines(gawkPath("nondec.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_nonfatal2() throws Exception { + AwkTestSupport + .cliTest("GAWK nonfatal2") + .argument("-f", gawkFile("nonfatal2.awk")) + .expectLines(gawkPath("nonfatal2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_nonfatal3() throws Exception { + AwkTestSupport + .cliTest("GAWK nonfatal3") + .argument("-f", gawkFile("nonfatal3.awk")) + .expectLines(gawkPath("nonfatal3.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_nsbad() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_nsbad2() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_nsbad3() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_nsforloop() throws Exception { + AwkTestSupport + .cliTest("GAWK nsforloop") + .argument("-f", gawkFile("nsforloop.awk")) + .expectLines(gawkPath("nsforloop.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_nsfuncrecurse() throws Exception { + AwkTestSupport + .cliTest("GAWK nsfuncrecurse") + .argument("-f", gawkFile("nsfuncrecurse.awk")) + .expectLines(gawkPath("nsfuncrecurse.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_nsindirect1() throws Exception { + AwkTestSupport + .cliTest("GAWK nsindirect1") + .argument("-f", gawkFile("nsindirect1.awk")) + .expectLines(gawkPath("nsindirect1.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_nsindirect2() throws Exception { + AwkTestSupport + .cliTest("GAWK nsindirect2") + .argument("-f", gawkFile("nsindirect2.awk")) + .expectLines(gawkPath("nsindirect2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_octdec() throws Exception { + AwkTestSupport + .cliTest("GAWK octdec") + .argument("-f", gawkFile("octdec.awk")) + .expectLines(gawkPath("octdec.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_patsplit() throws Exception { + AwkTestSupport + .cliTest("GAWK patsplit") + .argument("-f", gawkFile("patsplit.awk")) + .expectLines(gawkPath("patsplit.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_posix() throws Exception { + AwkTestSupport + .cliTest("GAWK posix") + .argument("-f", gawkFile("posix.awk")) + .stdin(gawkText("posix.in")) + .expectLines(gawkPath("posix.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_printfbad1() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_printfbad3() throws Exception { + AwkTestSupport + .cliTest("GAWK printfbad3") + .argument("-f", gawkFile("printfbad3.awk")) + .expectLines(gawkPath("printfbad3.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_printfbad4() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_printhuge() throws Exception { + skip(NON_UTF8_EXPECTED_REASON); + } + + @Test + public void test_procinfs() throws Exception { + AwkTestSupport + .cliTest("GAWK procinfs") + .argument("-f", gawkFile("procinfs.awk")) + .expectLines(gawkPath("procinfs.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_regexsub() throws Exception { + AwkTestSupport + .cliTest("GAWK regexsub") + .argument("-f", gawkFile("regexsub.awk")) + .expectLines(gawkPath("regexsub.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_regnul1() throws Exception { + AwkTestSupport + .cliTest("GAWK regnul1") + .argument("-f", gawkFile("regnul1.awk")) + .expectLines(gawkPath("regnul1.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_regnul2() throws Exception { + AwkTestSupport + .cliTest("GAWK regnul2") + .argument("-f", gawkFile("regnul2.awk")) + .expectLines(gawkPath("regnul2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_regx8bit() throws Exception { + skip(NON_UTF8_EXPECTED_REASON); + } + + @Test + public void test_rsgetline() throws Exception { + AwkTestSupport + .cliTest("GAWK rsgetline") + .argument("-f", gawkFile("rsgetline.awk")) + .stdin(gawkText("rsgetline.in")) + .expectLines(gawkPath("rsgetline.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_rsstart1() throws Exception { + AwkTestSupport + .cliTest("GAWK rsstart1") + .argument("-f", gawkFile("rsstart1.awk")) + .stdin(gawkText("rsstart1.in")) + .expectLines(gawkPath("rsstart1.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_rsstart2() throws Exception { + AwkTestSupport + .cliTest("GAWK rsstart2") + .argument("-f", gawkFile("rsstart2.awk")) + .stdin(gawkText("rsstart2.in")) + .expectLines(gawkPath("rsstart2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_rstest6() throws Exception { + AwkTestSupport + .cliTest("GAWK rstest6") + .argument("-f", gawkFile("rstest6.awk")) + .stdin(gawkText("rstest6.in")) + .expectLines(gawkPath("rstest6.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_shadowbuiltin() throws Exception { + AwkTestSupport + .cliTest("GAWK shadowbuiltin") + .argument("-f", gawkFile("shadowbuiltin.awk")) + .expectLines(gawkPath("shadowbuiltin.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_sortfor() throws Exception { + AwkTestSupport + .cliTest("GAWK sortfor") + .argument("-f", gawkFile("sortfor.awk")) + .stdin(gawkText("sortfor.in")) + .expectLines(gawkPath("sortfor.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_sortfor2() throws Exception { + AwkTestSupport + .cliTest("GAWK sortfor2") + .argument("-f", gawkFile("sortfor2.awk")) + .stdin(gawkText("sortfor2.in")) + .expectLines(gawkPath("sortfor2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_sortu() throws Exception { + AwkTestSupport + .cliTest("GAWK sortu") + .argument("-f", gawkFile("sortu.awk")) + .expectLines(gawkPath("sortu.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_split_after_fpat() throws Exception { + AwkTestSupport + .cliTest("GAWK split_after_fpat") + .argument("-f", gawkFile("split_after_fpat.awk")) + .stdin(gawkText("split_after_fpat.in")) + .expectLines(gawkPath("split_after_fpat.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_splitarg4() throws Exception { + AwkTestSupport + .cliTest("GAWK splitarg4") + .argument("-f", gawkFile("splitarg4.awk")) + .stdin(gawkText("splitarg4.in")) + .expectLines(gawkPath("splitarg4.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_strftfld() throws Exception { + AwkTestSupport + .cliTest("GAWK strftfld") + .argument("-f", gawkFile("strftfld.awk")) + .stdin(gawkText("strftfld.in")) + .expectLines(gawkPath("strftfld.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_strtonum() throws Exception { + AwkTestSupport + .cliTest("GAWK strtonum") + .argument("-f", gawkFile("strtonum.awk")) + .expectLines(gawkPath("strtonum.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_strtonum1() throws Exception { + AwkTestSupport + .cliTest("GAWK strtonum1") + .argument("-f", gawkFile("strtonum1.awk")) + .expectLines(gawkPath("strtonum1.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_stupid1() throws Exception { + AwkTestSupport + .cliTest("GAWK stupid1") + .argument("-f", gawkFile("stupid1.awk")) + .expectLines(gawkPath("stupid1.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_stupid2() throws Exception { + AwkTestSupport + .cliTest("GAWK stupid2") + .argument("-f", gawkFile("stupid2.awk")) + .expectLines(gawkPath("stupid2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_stupid3() throws Exception { + AwkTestSupport + .cliTest("GAWK stupid3") + .argument("-f", gawkFile("stupid3.awk")) + .expectLines(gawkPath("stupid3.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_stupid4() throws Exception { + AwkTestSupport + .cliTest("GAWK stupid4") + .argument("-f", gawkFile("stupid4.awk")) + .expectLines(gawkPath("stupid4.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_stupid5() throws Exception { + AwkTestSupport + .cliTest("GAWK stupid5") + .argument("-f", gawkFile("stupid5.awk")) + .expectLines(gawkPath("stupid5.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_switch2() throws Exception { + AwkTestSupport + .cliTest("GAWK switch2") + .argument("-f", gawkFile("switch2.awk")) + .expectLines(gawkPath("switch2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_symtab1() throws Exception { + AwkTestSupport + .cliTest("GAWK symtab1") + .argument("-f", gawkFile("symtab1.awk")) + .expectLines(gawkPath("symtab1.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_symtab2() throws Exception { + AwkTestSupport + .cliTest("GAWK symtab2") + .argument("-f", gawkFile("symtab2.awk")) + .expectLines(gawkPath("symtab2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_symtab3() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_symtab4() throws Exception { + AwkTestSupport + .cliTest("GAWK symtab4") + .argument("-f", gawkFile("symtab4.awk")) + .stdin(gawkText("symtab4.in")) + .expectLines(gawkPath("symtab4.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_symtab5() throws Exception { + AwkTestSupport + .cliTest("GAWK symtab5") + .argument("-f", gawkFile("symtab5.awk")) + .stdin(gawkText("symtab5.in")) + .expectLines(gawkPath("symtab5.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_symtab7() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_symtab10() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_symtab11() throws Exception { + AwkTestSupport + .cliTest("GAWK symtab11") + .argument("-f", gawkFile("symtab11.awk")) + .expectLines(gawkPath("symtab11.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_symtab12() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_timeout() throws Exception { + AwkTestSupport + .cliTest("GAWK timeout") + .argument("-f", gawkFile("timeout.awk")) + .expectLines(gawkPath("timeout.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_typedregex1() throws Exception { + AwkTestSupport + .cliTest("GAWK typedregex1") + .argument("-f", gawkFile("typedregex1.awk")) + .expectLines(gawkPath("typedregex1.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_typedregex2() throws Exception { + AwkTestSupport + .cliTest("GAWK typedregex2") + .argument("-f", gawkFile("typedregex2.awk")) + .expectLines(gawkPath("typedregex2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_typedregex3() throws Exception { + AwkTestSupport + .cliTest("GAWK typedregex3") + .argument("-f", gawkFile("typedregex3.awk")) + .expectLines(gawkPath("typedregex3.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_typedregex5() throws Exception { + AwkTestSupport + .cliTest("GAWK typedregex5") + .argument("-f", gawkFile("typedregex5.awk")) + .stdin(gawkText("typedregex5.in")) + .expectLines(gawkPath("typedregex5.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_typedregex6() throws Exception { + AwkTestSupport + .cliTest("GAWK typedregex6") + .argument("-f", gawkFile("typedregex6.awk")) + .stdin(gawkText("typedregex6.in")) + .expectLines(gawkPath("typedregex6.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_typeof1() throws Exception { + AwkTestSupport + .cliTest("GAWK typeof1") + .argument("-f", gawkFile("typeof1.awk")) + .expectLines(gawkPath("typeof1.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_typeof2() throws Exception { + AwkTestSupport + .cliTest("GAWK typeof2") + .argument("-f", gawkFile("typeof2.awk")) + .expectLines(gawkPath("typeof2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_typeof3() throws Exception { + AwkTestSupport + .cliTest("GAWK typeof3") + .argument("-f", gawkFile("typeof3.awk")) + .expectLines(gawkPath("typeof3.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_typeof4() throws Exception { + AwkTestSupport + .cliTest("GAWK typeof4") + .argument("-f", gawkFile("typeof4.awk")) + .expectLines(gawkPath("typeof4.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_typeof5() throws Exception { + AwkTestSupport + .cliTest("GAWK typeof5") + .argument("-f", gawkFile("typeof5.awk")) + .stdin(gawkText("typeof5.in")) + .expectLines(gawkPath("typeof5.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_typeof6() throws Exception { + AwkTestSupport + .cliTest("GAWK typeof6") + .argument("-f", gawkFile("typeof6.awk")) + .expectLines(gawkPath("typeof6.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_unicode1() throws Exception { + AwkTestSupport + .cliTest("GAWK unicode1") + .argument("--locale", "en-US") + .argument("-f", gawkFile("unicode1.awk")) + .expectLines(gawkPath("unicode1.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_manyfiles() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_argtest() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_badargs() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_strftime() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_devfd() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_errno() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_rebuf() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_rsglstdin() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_rsstart3() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_binmode1() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_devfd1() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_devfd2() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_mixed1() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_beginfile1() throws Exception { + skip("BEGINFILE and ENDFILE are not implemented by Jawk yet."); + } + + @Test + public void test_beginfile2() throws Exception { + skip("BEGINFILE and ENDFILE are not implemented by Jawk yet."); + } + + @Test + public void test_dumpvars() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_profile0() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_profile1() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_profile2() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_profile3() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_profile6() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_profile7() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_profile12() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_nsawk1a() throws Exception { + AwkTestSupport + .cliTest("GAWK nsawk1a") + .argument("-f", gawkFile("nsawk1.awk")) + .expectLines(gawkPath("nsawk1a.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_nsawk1b() throws Exception { + AwkTestSupport + .cliTest("GAWK nsawk1b") + .argument("-v", "I=fine") + .argument("-f", gawkFile("nsawk1.awk")) + .expectLines(gawkPath("nsawk1b.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_nsawk1c() throws Exception { + AwkTestSupport + .cliTest("GAWK nsawk1c") + .argument("-v", "awk::I=fine") + .argument("-f", gawkFile("nsawk1.awk")) + .expectLines(gawkPath("nsawk1c.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_nsawk2a() throws Exception { + AwkTestSupport + .cliTest("GAWK nsawk2a") + .argument("-v", "I=fine") + .argument("-f", gawkFile("nsawk2.awk")) + .expectLines(gawkPath("nsawk2a.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_nsawk2b() throws Exception { + AwkTestSupport + .cliTest("GAWK nsawk2b") + .argument("-v", "awk::I=fine") + .argument("-f", gawkFile("nsawk2.awk")) + .expectLines(gawkPath("nsawk2b.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_include2() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_incdupe() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_incdupe2() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_incdupe3() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_incdupe4() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_incdupe5() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_incdupe6() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_incdupe7() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_charasbytes() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_symtab6() throws Exception { + skip( + "This handwritten case compares a fatal gawk SYMTAB diagnostic on stderr and is intentionally skipped in the explicit AwkTestSupport.cliTest suite."); + } + + @Test + public void test_symtab8() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_symtab9() throws Exception { + AwkTestSupport + .cliTest("GAWK symtab9") + .argument("-f", gawkFile("symtab9.awk")) + .expectLines(gawkPath("symtab9.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_reginttrad() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_colonwarn() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_dbugeval() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_genpot() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_negtime() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_watchpoint1() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_pty1() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_pty2() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_arrdbg() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_sourcesplit() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_nsbad_cmd() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_nonfatal1() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_nsidentifier() throws Exception { + AwkTestSupport + .cliTest("GAWK nsidentifier") + .argument("-v", "SORT=sort") + .argument("-f", gawkFile("nsidentifier.awk")) + .expectLines(gawkPath("nsidentifier.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_typedregex4() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_iolint() throws Exception { + skip(MANUAL_SKIP_REASON); + } + +} diff --git a/src/it/java/io/jawk/GawkIT.java b/src/it/java/io/jawk/GawkIT.java index 205a9278..f398da58 100644 --- a/src/it/java/io/jawk/GawkIT.java +++ b/src/it/java/io/jawk/GawkIT.java @@ -4,7 +4,7 @@ * ╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲ * Jawk * ჻჻჻჻჻჻ - * Copyright 2006 - 2026 MetricsHub + * Copyright (C) 2006 - 2026 MetricsHub * ჻჻჻჻჻჻ * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as @@ -22,41 +22,12 @@ * ╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱ */ -import static org.junit.Assume.assumeTrue; - -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.nio.file.Files; -import java.nio.file.Path; import org.junit.Test; /** - * Explicit gawk compatibility cases generated from the vendored Maketests - * snapshot. The checked-in Java source is the source of truth at runtime; the - * vendored metadata is only used when refreshing this file. + * Core gawk compatibility cases mirrored from the basic and Unix test groups in the vendored gawk suite. */ -public class GawkIT { - - private static final Path GAWK_DIRECTORY = CompatibilityTestResources.resourceDirectory(GawkIT.class, "gawk"); - private static final String NON_ZERO_TRANSCRIPT_REASON = "This case compares a non-zero gawk CLI transcript, which is intentionally skipped in the explicit AwkTestSupport.cliTest suite."; - private static final String NON_UTF8_STDIN_REASON = "This case redirects stdin that is not valid UTF-8, which is intentionally skipped in the explicit AwkTestSupport.cliTest suite."; - private static final String NON_UTF8_EXPECTED_REASON = "This case uses an expected .ok file that is not valid UTF-8, which is intentionally skipped in the explicit AwkTestSupport.cliTest suite."; - - private static Path gawkPath(String fileName) { - return GAWK_DIRECTORY.resolve(fileName); - } - - private static String gawkFile(String fileName) { - return gawkPath(fileName).toString(); - } - - private static String gawkText(String fileName) throws IOException { - return new String(Files.readAllBytes(gawkPath(fileName)), StandardCharsets.UTF_8); - } - - private static void skip(String reason) { - assumeTrue(reason, false); - } +public class GawkIT extends AbstractGawkSuite { @Test public void test_addcomma() throws Exception { @@ -478,11 +449,6 @@ public void test_datanonl() throws Exception { .runAndAssert(); } - @Test - public void test_defref() throws Exception { - skip("gawk's --lint diagnostics are not implemented by Jawk."); - } - @Test public void test_delargv() throws Exception { AwkTestSupport @@ -586,18 +552,6 @@ public void test_eofsplit() throws Exception { .runAndAssert(); } - @Test - public void test_escapebrace() throws Exception { - AwkTestSupport - .cliTest("GAWK escapebrace") - .argument("--posix") - .argument("-f", gawkFile("escapebrace.awk")) - .stdin(gawkText("escapebrace.in")) - .expectLines(gawkPath("escapebrace.ok")) - .expectExit(0) - .runAndAssert(); - } - @Test public void test_exit2() throws Exception { AwkTestSupport @@ -912,17 +866,6 @@ public void test_gsubtst2() throws Exception { .runAndAssert(); } - @Test - public void test_gsubtst3() throws Exception { - AwkTestSupport - .cliTest("GAWK gsubtst3") - .argument("-f", gawkFile("gsubtst3.awk")) - .stdin(gawkText("gsubtst3.in")) - .expectLines(gawkPath("gsubtst3.ok")) - .expectExit(0) - .runAndAssert(); - } - @Test public void test_gsubtst4() throws Exception { AwkTestSupport @@ -1079,11 +1022,6 @@ public void test_leadnl() throws Exception { .runAndAssert(); } - @Test - public void test_litoct() throws Exception { - skip("gawk's --traditional mode is not implemented by Jawk."); - } - @Test public void test_longsub() throws Exception { AwkTestSupport @@ -1278,16 +1216,6 @@ public void test_nlstrina() throws Exception { .runAndAssert(); } - @Test - public void test_noeffect() throws Exception { - skip("gawk's --lint diagnostics are not implemented by Jawk."); - } - - @Test - public void test_nofmtch() throws Exception { - skip("gawk's --lint diagnostics are not implemented by Jawk."); - } - @Test public void test_noloop1() throws Exception { AwkTestSupport @@ -1310,11 +1238,6 @@ public void test_noloop2() throws Exception { .runAndAssert(); } - @Test - public void test_nonl() throws Exception { - skip("gawk's --lint diagnostics are not implemented by Jawk."); - } - @Test public void test_noparms() throws Exception { skip(NON_ZERO_TRANSCRIPT_REASON); @@ -1494,16 +1417,6 @@ public void test_opasnslf() throws Exception { .runAndAssert(); } - @Test - public void test_paramasfunc1() throws Exception { - skip(NON_ZERO_TRANSCRIPT_REASON); - } - - @Test - public void test_paramasfunc2() throws Exception { - skip(NON_ZERO_TRANSCRIPT_REASON); - } - @Test public void test_paramdup() throws Exception { skip(NON_ZERO_TRANSCRIPT_REASON); @@ -1571,29 +1484,6 @@ public void test_pcntplus() throws Exception { .runAndAssert(); } - @Test - public void test_posix2008sub() throws Exception { - AwkTestSupport - .cliTest("GAWK posix2008sub") - .argument("--posix") - .argument("-f", gawkFile("posix2008sub.awk")) - .expectLines(gawkPath("posix2008sub.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_posix_compare() throws Exception { - AwkTestSupport - .cliTest("GAWK posix_compare") - .argument("--locale", "en-US") - .argument("--posix") - .argument("-f", gawkFile("posix_compare.awk")) - .expectLines(gawkPath("posix_compare.ok")) - .expectExit(0) - .runAndAssert(); - } - @Test public void test_prdupval() throws Exception { AwkTestSupport @@ -1615,17 +1505,6 @@ public void test_prec() throws Exception { .runAndAssert(); } - @Test - public void test_printf0() throws Exception { - AwkTestSupport - .cliTest("GAWK printf0") - .argument("--posix") - .argument("-f", gawkFile("printf0.awk")) - .expectLines(gawkPath("printf0.ok")) - .expectExit(0) - .runAndAssert(); - } - @Test public void test_printf1() throws Exception { AwkTestSupport @@ -1867,11 +1746,6 @@ public void test_rs() throws Exception { .runAndAssert(); } - @Test - public void test_rscompat() throws Exception { - skip("gawk's --traditional mode is not implemented by Jawk."); - } - @Test public void test_rsnul1nl() throws Exception { AwkTestSupport @@ -2085,16 +1959,6 @@ public void test_splitwht() throws Exception { .runAndAssert(); } - @Test - public void test_status_close() throws Exception { - AwkTestSupport - .cliTest("GAWK status-close") - .argument("-f", gawkFile("status-close.awk")) - .expectLines(gawkPath("status-close.ok")) - .expectExit(0) - .runAndAssert(); - } - @Test public void test_strcat1() throws Exception { AwkTestSupport @@ -2247,41 +2111,11 @@ public void test_tailrecurse() throws Exception { .runAndAssert(); } - @Test - public void test_tradanch() throws Exception { - skip("gawk's --traditional mode is not implemented by Jawk."); - } - @Test public void test_trailbs() throws Exception { skip(NON_UTF8_EXPECTED_REASON); } - @Test - public void test_uninit2() throws Exception { - skip("gawk's --lint diagnostics are not implemented by Jawk."); - } - - @Test - public void test_uninit3() throws Exception { - skip("gawk's --lint diagnostics are not implemented by Jawk."); - } - - @Test - public void test_uninit4() throws Exception { - skip("gawk's --lint diagnostics are not implemented by Jawk."); - } - - @Test - public void test_uninit5() throws Exception { - skip("gawk's --lint diagnostics are not implemented by Jawk."); - } - - @Test - public void test_uninitialized() throws Exception { - skip("gawk's --lint diagnostics are not implemented by Jawk."); - } - @Test public void test_unterm() throws Exception { skip(NON_ZERO_TRANSCRIPT_REASON); @@ -2452,2064 +2286,186 @@ public void test_rtlen01() throws Exception { } @Test - public void test_aadelete1() throws Exception { - AwkTestSupport - .cliTest("GAWK aadelete1") - .argument("-f", gawkFile("aadelete1.awk")) - .expectLines(gawkPath("aadelete1.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_aadelete2() throws Exception { - skip(NON_ZERO_TRANSCRIPT_REASON); - } - - @Test - public void test_aarray1() throws Exception { - AwkTestSupport - .cliTest("GAWK aarray1") - .argument("-f", gawkFile("aarray1.awk")) - .expectLines(gawkPath("aarray1.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_aasort() throws Exception { - AwkTestSupport - .cliTest("GAWK aasort") - .argument("-f", gawkFile("aasort.awk")) - .expectLines(gawkPath("aasort.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_aasorti() throws Exception { - AwkTestSupport - .cliTest("GAWK aasorti") - .argument("-f", gawkFile("aasorti.awk")) - .expectLines(gawkPath("aasorti.ok")) - .expectExit(0) - .runAndAssert(); + public void test_poundbang() throws Exception { + skip(MANUAL_SKIP_REASON); } @Test - public void test_arraysort() throws Exception { - AwkTestSupport - .cliTest("GAWK arraysort") - .argument("-f", gawkFile("arraysort.awk")) - .expectLines(gawkPath("arraysort.ok")) - .expectExit(0) - .runAndAssert(); + public void test_messages() throws Exception { + skip(MANUAL_SKIP_REASON); } @Test - public void test_arraysort2() throws Exception { + public void test_argarray() throws Exception { AwkTestSupport - .cliTest("GAWK arraysort2") - .argument("-f", gawkFile("arraysort2.awk")) - .expectLines(gawkPath("arraysort2.ok")) + .cliTest("GAWK argarray") + .argument("-f", gawkFile("argarray.awk")) + .stdin("just a test\n") + .operand(gawkFile("argarray.in"), "-") + .postProcessWith(output -> output.replace(gawkFile("argarray.in"), "./argarray.input")) + .expectLines(gawkPath("argarray.ok")) .expectExit(0) .runAndAssert(); } @Test - public void test_arraytype() throws Exception { - AwkTestSupport - .cliTest("GAWK arraytype") - .argument("-f", gawkFile("arraytype.awk")) - .expectLines(gawkPath("arraytype.ok")) - .expectExit(0) - .runAndAssert(); + public void test_regtest() throws Exception { + skip(MANUAL_SKIP_REASON); } @Test - public void test_asortbool() throws Exception { - AwkTestSupport - .cliTest("GAWK asortbool") - .argument("-f", gawkFile("asortbool.awk")) - .expectLines(gawkPath("asortbool.ok")) - .expectExit(0) - .runAndAssert(); + public void test_compare() throws Exception { + skip(MANUAL_SKIP_REASON); } @Test - public void test_backw() throws Exception { - AwkTestSupport - .cliTest("GAWK backw") - .argument("-f", gawkFile("backw.awk")) - .stdin(gawkText("backw.in")) - .expectLines(gawkPath("backw.ok")) - .expectExit(0) - .runAndAssert(); + public void test_inftest() throws Exception { + skip(MANUAL_SKIP_REASON); } @Test - public void test_asortsymtab() throws Exception { - AwkTestSupport - .cliTest("GAWK asortsymtab") - .argument("-f", gawkFile("asortsymtab.awk")) - .expectLines(gawkPath("asortsymtab.ok")) - .expectExit(0) - .runAndAssert(); + public void test_getline2() throws Exception { + skip(MANUAL_SKIP_REASON); } @Test - public void test_clos1way() throws Exception { - AwkTestSupport - .cliTest("GAWK clos1way") - .argument("-f", gawkFile("clos1way.awk")) - .expectLines(gawkPath("clos1way.ok")) - .expectExit(0) - .runAndAssert(); + public void test_awkpath() throws Exception { + skip(MANUAL_SKIP_REASON); } @Test - public void test_clos1way2() throws Exception { - skip(NON_ZERO_TRANSCRIPT_REASON); + public void test_tweakfld() throws Exception { + skip(MANUAL_SKIP_REASON); } @Test - public void test_clos1way3() throws Exception { - skip(NON_ZERO_TRANSCRIPT_REASON); + public void test_pid() throws Exception { + skip(MANUAL_SKIP_REASON); } @Test - public void test_clos1way4() throws Exception { - skip(NON_ZERO_TRANSCRIPT_REASON); + public void test_strftlng() throws Exception { + skip(MANUAL_SKIP_REASON); } @Test - public void test_clos1way5() throws Exception { - skip(NON_ZERO_TRANSCRIPT_REASON); + public void test_nors() throws Exception { + skip(MANUAL_SKIP_REASON); } @Test - public void test_clos1way6() throws Exception { - AwkTestSupport - .cliTest("GAWK clos1way6") - .argument("-f", gawkFile("clos1way6.awk")) - .expectLines(gawkPath("clos1way6.ok")) - .expectExit(0) - .runAndAssert(); + public void test_pipeio1() throws Exception { + skip(MANUAL_SKIP_REASON); } @Test - public void test_commas() throws Exception { - AwkTestSupport - .cliTest("GAWK commas") - .argument("--locale", "en-US") - .argument("-f", gawkFile("commas.awk")) - .expectLines(gawkPath("commas.ok")) - .expectExit(0) - .runAndAssert(); + public void test_pipeio2() throws Exception { + skip(MANUAL_SKIP_REASON); } @Test - public void test_crlf() throws Exception { - AwkTestSupport - .cliTest("GAWK crlf") - .argument("-f", gawkFile("crlf.awk")) - .expectLines(gawkPath("crlf.ok")) - .expectExit(0) - .runAndAssert(); + public void test_clobber() throws Exception { + skip(MANUAL_SKIP_REASON); } @Test - public void test_csv1() throws Exception { - skip("gawk's --csv mode is not implemented by Jawk."); + public void test_arynocls() throws Exception { + skip(MANUAL_SKIP_REASON); } @Test - public void test_csv2() throws Exception { - skip("gawk's --csv mode is not implemented by Jawk."); + public void test_getlnbuf() throws Exception { + skip(MANUAL_SKIP_REASON); } @Test - public void test_csv3() throws Exception { - skip("gawk's --csv mode is not implemented by Jawk."); + public void test_inetechu() throws Exception { + skip(MANUAL_SKIP_REASON); } @Test - public void test_csvodd() throws Exception { - skip("gawk's --csv mode is not implemented by Jawk."); + public void test_inetecht() throws Exception { + skip(MANUAL_SKIP_REASON); } @Test - public void test_dbugeval2() throws Exception { - skip("gawk's --debug mode is not implemented by Jawk."); + public void test_inetdayu() throws Exception { + skip(MANUAL_SKIP_REASON); } @Test - public void test_dbugeval3() throws Exception { - skip("gawk's --debug mode is not implemented by Jawk."); + public void test_inetdayt() throws Exception { + skip(MANUAL_SKIP_REASON); } @Test - public void test_dbugeval4() throws Exception { - skip("gawk's --debug mode is not implemented by Jawk."); + public void test_redfilnm() throws Exception { + skip(MANUAL_SKIP_REASON); } @Test - public void test_dbugtypedre1() throws Exception { - skip("gawk's --debug mode is not implemented by Jawk."); + public void test_space() throws Exception { + skip(MANUAL_SKIP_REASON); } @Test - public void test_dbugtypedre2() throws Exception { - skip("gawk's --debug mode is not implemented by Jawk."); + public void test_rsnulbig() throws Exception { + skip(MANUAL_SKIP_REASON); } @Test - public void test_delsub() throws Exception { - AwkTestSupport - .cliTest("GAWK delsub") - .argument("-f", gawkFile("delsub.awk")) - .expectLines(gawkPath("delsub.ok")) - .expectExit(0) - .runAndAssert(); + public void test_rsnulbig2() throws Exception { + skip(MANUAL_SKIP_REASON); } @Test - public void test_dfacheck1() throws Exception { - AwkTestSupport - .cliTest("GAWK dfacheck1") - .argument("-f", gawkFile("dfacheck1.awk")) - .stdin(gawkText("dfacheck1.in")) - .expectLines(gawkPath("dfacheck1.ok")) - .expectExit(0) - .runAndAssert(); + public void test_exitval1() throws Exception { + skip(MANUAL_SKIP_REASON); } @Test - public void test_elemnew1() throws Exception { - AwkTestSupport - .cliTest("GAWK elemnew1") - .argument("-f", gawkFile("elemnew1.awk")) - .expectLines(gawkPath("elemnew1.ok")) - .expectExit(0) - .runAndAssert(); + public void test_fsspcoln() throws Exception { + skip(MANUAL_SKIP_REASON); } @Test - public void test_elemnew2() throws Exception { - AwkTestSupport - .cliTest("GAWK elemnew2") - .argument("-f", gawkFile("elemnew2.awk")) - .expectLines(gawkPath("elemnew2.ok")) - .expectExit(0) - .runAndAssert(); + public void test_nofile() throws Exception { + skip(MANUAL_SKIP_REASON); } @Test - public void test_elemnew3() throws Exception { - AwkTestSupport - .cliTest("GAWK elemnew3") - .argument("-f", gawkFile("elemnew3.awk")) - .expectLines(gawkPath("elemnew3.ok")) - .expectExit(0) - .runAndAssert(); + public void test_ignrcas3() throws Exception { + skip(MANUAL_SKIP_REASON); } @Test - public void test_exit() throws Exception { + public void test_eofsrc1() throws Exception { skip( - "Shell-script target generated by Maketests; the in-process Jawk harness does not execute external shell scripts."); - } - - @Test - public void test_fieldwdth() throws Exception { - AwkTestSupport - .cliTest("GAWK fieldwdth") - .argument("-f", gawkFile("fieldwdth.awk")) - .stdin(gawkText("fieldwdth.in")) - .expectLines(gawkPath("fieldwdth.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_forcenum() throws Exception { - AwkTestSupport - .cliTest("GAWK forcenum") - .argument("-f", gawkFile("forcenum.awk")) - .expectLines(gawkPath("forcenum.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_fpat1() throws Exception { - AwkTestSupport - .cliTest("GAWK fpat1") - .argument("-f", gawkFile("fpat1.awk")) - .stdin(gawkText("fpat1.in")) - .expectLines(gawkPath("fpat1.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_fpat2() throws Exception { - AwkTestSupport - .cliTest("GAWK fpat2") - .argument("-f", gawkFile("fpat2.awk")) - .expectLines(gawkPath("fpat2.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_fpat3() throws Exception { - AwkTestSupport - .cliTest("GAWK fpat3") - .argument("-f", gawkFile("fpat3.awk")) - .stdin(gawkText("fpat3.in")) - .expectLines(gawkPath("fpat3.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_fpat4() throws Exception { - AwkTestSupport - .cliTest("GAWK fpat4") - .argument("-f", gawkFile("fpat4.awk")) - .expectLines(gawkPath("fpat4.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_fpat5() throws Exception { - AwkTestSupport - .cliTest("GAWK fpat5") - .argument("-f", gawkFile("fpat5.awk")) - .stdin(gawkText("fpat5.in")) - .expectLines(gawkPath("fpat5.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_fpat6() throws Exception { - AwkTestSupport - .cliTest("GAWK fpat6") - .argument("-f", gawkFile("fpat6.awk")) - .stdin(gawkText("fpat6.in")) - .expectLines(gawkPath("fpat6.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_fpat7() throws Exception { - AwkTestSupport - .cliTest("GAWK fpat7") - .argument("-f", gawkFile("fpat7.awk")) - .stdin(gawkText("fpat7.in")) - .expectLines(gawkPath("fpat7.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_fpat8() throws Exception { - AwkTestSupport - .cliTest("GAWK fpat8") - .argument("-f", gawkFile("fpat8.awk")) - .stdin(gawkText("fpat8.in")) - .expectLines(gawkPath("fpat8.ok")) - .expectExit(0) - .runAndAssert(); + "This handwritten case compares gawk parser diagnostics on stderr and is intentionally skipped in the explicit AwkTestSupport.cliTest suite."); } @Test - public void test_fpat9() throws Exception { + public void test_longwrds() throws Exception { AwkTestSupport - .cliTest("GAWK fpat9") - .argument("-f", gawkFile("fpat9.awk")) - .stdin(gawkText("fpat9.in")) - .expectLines(gawkPath("fpat9.ok")) + .cliTest("GAWK longwrds") + .argument("-v", "SORT=sort") + .argument("-f", gawkFile("longwrds.awk")) + .stdin(gawkText("longwrds.in")) + .expectLines(gawkPath("longwrds.ok")) .expectExit(0) .runAndAssert(); } @Test - public void test_fpatnull() throws Exception { + public void test_argcasfile() throws Exception { AwkTestSupport - .cliTest("GAWK fpatnull") - .argument("-f", gawkFile("fpatnull.awk")) - .stdin(gawkText("fpatnull.in")) - .expectLines(gawkPath("fpatnull.ok")) + .cliTest("GAWK argcasfile") + .argument("-f", gawkFile("argcasfile.awk")) + .stdin(gawkText("argcasfile.in")) + .operand("ARGC=1", " /no/such/file") + .expectLines(gawkPath("argcasfile.ok")) .expectExit(0) .runAndAssert(); } - @Test - public void test_fsfwfs() throws Exception { - AwkTestSupport - .cliTest("GAWK fsfwfs") - .argument("-f", gawkFile("fsfwfs.awk")) - .stdin(gawkText("fsfwfs.in")) - .expectLines(gawkPath("fsfwfs.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_functab1() throws Exception { - skip(NON_ZERO_TRANSCRIPT_REASON); - } - - @Test - public void test_functab2() throws Exception { - skip(NON_ZERO_TRANSCRIPT_REASON); - } - - @Test - public void test_functab3() throws Exception { - AwkTestSupport - .cliTest("GAWK functab3") - .argument("-f", gawkFile("functab3.awk")) - .expectLines(gawkPath("functab3.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_functab6() throws Exception { - skip(NON_ZERO_TRANSCRIPT_REASON); - } - - @Test - public void test_funlen() throws Exception { - AwkTestSupport - .cliTest("GAWK funlen") - .argument("-f", gawkFile("funlen.awk")) - .stdin(gawkText("funlen.in")) - .expectLines(gawkPath("funlen.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_fwtest() throws Exception { - AwkTestSupport - .cliTest("GAWK fwtest") - .argument("-f", gawkFile("fwtest.awk")) - .stdin(gawkText("fwtest.in")) - .expectLines(gawkPath("fwtest.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_fwtest2() throws Exception { - AwkTestSupport - .cliTest("GAWK fwtest2") - .argument("-f", gawkFile("fwtest2.awk")) - .stdin(gawkText("fwtest2.in")) - .expectLines(gawkPath("fwtest2.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_fwtest3() throws Exception { - AwkTestSupport - .cliTest("GAWK fwtest3") - .argument("-f", gawkFile("fwtest3.awk")) - .stdin(gawkText("fwtest3.in")) - .expectLines(gawkPath("fwtest3.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_fwtest4() throws Exception { - AwkTestSupport - .cliTest("GAWK fwtest4") - .argument("-f", gawkFile("fwtest4.awk")) - .stdin(gawkText("fwtest4.in")) - .expectLines(gawkPath("fwtest4.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_fwtest5() throws Exception { - AwkTestSupport - .cliTest("GAWK fwtest5") - .argument("-f", gawkFile("fwtest5.awk")) - .stdin(gawkText("fwtest5.in")) - .expectLines(gawkPath("fwtest5.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_fwtest6() throws Exception { - skip(NON_ZERO_TRANSCRIPT_REASON); - } - - @Test - public void test_fwtest7() throws Exception { - AwkTestSupport - .cliTest("GAWK fwtest7") - .argument("-f", gawkFile("fwtest7.awk")) - .stdin(gawkText("fwtest7.in")) - .expectLines(gawkPath("fwtest7.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_fwtest8() throws Exception { - skip(NON_ZERO_TRANSCRIPT_REASON); - } - - @Test - public void test_gensub() throws Exception { - AwkTestSupport - .cliTest("GAWK gensub") - .argument("-f", gawkFile("gensub.awk")) - .stdin(gawkText("gensub.in")) - .expectLines(gawkPath("gensub.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_gensub2() throws Exception { - AwkTestSupport - .cliTest("GAWK gensub2") - .argument("-f", gawkFile("gensub2.awk")) - .expectLines(gawkPath("gensub2.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_gensub3() throws Exception { - AwkTestSupport - .cliTest("GAWK gensub3") - .argument("-f", gawkFile("gensub3.awk")) - .stdin(gawkText("gensub3.in")) - .expectLines(gawkPath("gensub3.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_gensub4() throws Exception { - AwkTestSupport - .cliTest("GAWK gensub4") - .argument("-f", gawkFile("gensub4.awk")) - .expectLines(gawkPath("gensub4.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_getlndir() throws Exception { - AwkTestSupport - .cliTest("GAWK getlndir") - .argument("-f", gawkFile("getlndir.awk")) - .expectLines(gawkPath("getlndir.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_gnuops2() throws Exception { - AwkTestSupport - .cliTest("GAWK gnuops2") - .argument("-f", gawkFile("gnuops2.awk")) - .expectLines(gawkPath("gnuops2.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_gnuops3() throws Exception { - AwkTestSupport - .cliTest("GAWK gnuops3") - .argument("-f", gawkFile("gnuops3.awk")) - .expectLines(gawkPath("gnuops3.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_gnureops() throws Exception { - AwkTestSupport - .cliTest("GAWK gnureops") - .argument("-f", gawkFile("gnureops.awk")) - .expectLines(gawkPath("gnureops.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_gsubind() throws Exception { - skip(NON_ZERO_TRANSCRIPT_REASON); - } - - @Test - public void test_icasefs() throws Exception { - AwkTestSupport - .cliTest("GAWK icasefs") - .argument("-f", gawkFile("icasefs.awk")) - .expectLines(gawkPath("icasefs.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_icasers() throws Exception { - AwkTestSupport - .cliTest("GAWK icasers") - .argument("-f", gawkFile("icasers.awk")) - .stdin(gawkText("icasers.in")) - .expectLines(gawkPath("icasers.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_id() throws Exception { - AwkTestSupport - .cliTest("GAWK id") - .argument("-f", gawkFile("id.awk")) - .expectLines(gawkPath("id.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_igncdym() throws Exception { - AwkTestSupport - .cliTest("GAWK igncdym") - .argument("-f", gawkFile("igncdym.awk")) - .stdin(gawkText("igncdym.in")) - .expectLines(gawkPath("igncdym.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_igncfs() throws Exception { - AwkTestSupport - .cliTest("GAWK igncfs") - .argument("-f", gawkFile("igncfs.awk")) - .stdin(gawkText("igncfs.in")) - .expectLines(gawkPath("igncfs.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_ignrcas2() throws Exception { - AwkTestSupport - .cliTest("GAWK ignrcas2") - .argument("--locale", "en-US") - .argument("-f", gawkFile("ignrcas2.awk")) - .expectLines(gawkPath("ignrcas2.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_ignrcas4() throws Exception { - AwkTestSupport - .cliTest("GAWK ignrcas4") - .argument("-f", gawkFile("ignrcas4.awk")) - .expectLines(gawkPath("ignrcas4.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_ignrcase() throws Exception { - AwkTestSupport - .cliTest("GAWK ignrcase") - .argument("-f", gawkFile("ignrcase.awk")) - .stdin(gawkText("ignrcase.in")) - .expectLines(gawkPath("ignrcase.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_include() throws Exception { - AwkTestSupport - .cliTest("GAWK include") - .argument("-f", gawkFile("include.awk")) - .expectLines(gawkPath("include.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_indirectbuiltin() throws Exception { - AwkTestSupport - .cliTest("GAWK indirectbuiltin") - .argument("-f", gawkFile("indirectbuiltin.awk")) - .expectLines(gawkPath("indirectbuiltin.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_indirectcall() throws Exception { - AwkTestSupport - .cliTest("GAWK indirectcall") - .argument("-f", gawkFile("indirectcall.awk")) - .stdin(gawkText("indirectcall.in")) - .expectLines(gawkPath("indirectcall.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_indirectcall2() throws Exception { - AwkTestSupport - .cliTest("GAWK indirectcall2") - .argument("-f", gawkFile("indirectcall2.awk")) - .expectLines(gawkPath("indirectcall2.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_indirectcall3() throws Exception { - AwkTestSupport - .cliTest("GAWK indirectcall3") - .argument("-f", gawkFile("indirectcall3.awk")) - .expectLines(gawkPath("indirectcall3.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_intarray() throws Exception { - AwkTestSupport - .cliTest("GAWK intarray") - .argument("-f", gawkFile("intarray.awk")) - .expectLines(gawkPath("intarray.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_isarrayunset() throws Exception { - AwkTestSupport - .cliTest("GAWK isarrayunset") - .argument("-f", gawkFile("isarrayunset.awk")) - .expectLines(gawkPath("isarrayunset.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_lint() throws Exception { - AwkTestSupport - .cliTest("GAWK lint") - .argument("-f", gawkFile("lint.awk")) - .expectLines(gawkPath("lint.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_lintexp() throws Exception { - skip("gawk's --lint diagnostics are not implemented by Jawk."); - } - - @Test - public void test_lintindex() throws Exception { - skip("gawk's --lint diagnostics are not implemented by Jawk."); - } - - @Test - public void test_lintint() throws Exception { - skip("gawk's --lint diagnostics are not implemented by Jawk."); - } - - @Test - public void test_lintlength() throws Exception { - skip("gawk's --lint diagnostics are not implemented by Jawk."); - } - - @Test - public void test_lintold() throws Exception { - skip("gawk's --lint-old diagnostics are not implemented by Jawk."); - } - - @Test - public void test_lintplus() throws Exception { - skip("gawk's --lint diagnostics are not implemented by Jawk."); - } - - @Test - public void test_lintset() throws Exception { - AwkTestSupport - .cliTest("GAWK lintset") - .argument("-f", gawkFile("lintset.awk")) - .expectLines(gawkPath("lintset.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_lintwarn() throws Exception { - skip("gawk's --lint diagnostics are not implemented by Jawk."); - } - - @Test - public void test_match1() throws Exception { - AwkTestSupport - .cliTest("GAWK match1") - .argument("-f", gawkFile("match1.awk")) - .expectLines(gawkPath("match1.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_match2() throws Exception { - skip(NON_ZERO_TRANSCRIPT_REASON); - } - - @Test - public void test_match3() throws Exception { - AwkTestSupport - .cliTest("GAWK match3") - .argument("-f", gawkFile("match3.awk")) - .stdin(gawkText("match3.in")) - .expectLines(gawkPath("match3.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_mbstr1() throws Exception { - AwkTestSupport - .cliTest("GAWK mbstr1") - .argument("--locale", "en-US") - .argument("-f", gawkFile("mbstr1.awk")) - .expectLines(gawkPath("mbstr1.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_mbstr2() throws Exception { - skip(NON_UTF8_STDIN_REASON); - } - - @Test - public void test_mdim1() throws Exception { - skip(NON_ZERO_TRANSCRIPT_REASON); - } - - @Test - public void test_mdim2() throws Exception { - AwkTestSupport - .cliTest("GAWK mdim2") - .argument("-f", gawkFile("mdim2.awk")) - .expectLines(gawkPath("mdim2.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_mdim3() throws Exception { - AwkTestSupport - .cliTest("GAWK mdim3") - .argument("-f", gawkFile("mdim3.awk")) - .expectLines(gawkPath("mdim3.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_mdim4() throws Exception { - AwkTestSupport - .cliTest("GAWK mdim4") - .argument("-f", gawkFile("mdim4.awk")) - .stdin(gawkText("mdim4.in")) - .expectLines(gawkPath("mdim4.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_mdim5() throws Exception { - AwkTestSupport - .cliTest("GAWK mdim5") - .argument("-f", gawkFile("mdim5.awk")) - .expectLines(gawkPath("mdim5.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_mdim6() throws Exception { - skip(NON_ZERO_TRANSCRIPT_REASON); - } - - @Test - public void test_mdim7() throws Exception { - AwkTestSupport - .cliTest("GAWK mdim7") - .argument("-f", gawkFile("mdim7.awk")) - .expectLines(gawkPath("mdim7.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_mdim8() throws Exception { - AwkTestSupport - .cliTest("GAWK mdim8") - .argument("-f", gawkFile("mdim8.awk")) - .stdin(gawkText("mdim8.in")) - .expectLines(gawkPath("mdim8.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_mktime() throws Exception { - AwkTestSupport - .cliTest("GAWK mktime") - .argument("-f", gawkFile("mktime.awk")) - .stdin(gawkText("mktime.in")) - .expectLines(gawkPath("mktime.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_modifiers() throws Exception { - skip( - "Shell-script target generated by Maketests; the in-process Jawk harness does not execute external shell scripts."); - } - - @Test - public void test_muldimposix() throws Exception { - skip(NON_ZERO_TRANSCRIPT_REASON); - } - - @Test - public void test_nastyparm() throws Exception { - skip(NON_ZERO_TRANSCRIPT_REASON); - } - - @Test - public void test_next() throws Exception { - skip( - "Shell-script target generated by Maketests; the in-process Jawk harness does not execute external shell scripts."); - } - - @Test - public void test_nondec() throws Exception { - AwkTestSupport - .cliTest("GAWK nondec") - .argument("-f", gawkFile("nondec.awk")) - .expectLines(gawkPath("nondec.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_nondec2() throws Exception { - AwkTestSupport - .cliTest("GAWK nondec2") - .argument("-f", gawkFile("nondec2.awk")) - .expectLines(gawkPath("nondec2.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_nonfatal2() throws Exception { - AwkTestSupport - .cliTest("GAWK nonfatal2") - .argument("-f", gawkFile("nonfatal2.awk")) - .expectLines(gawkPath("nonfatal2.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_nonfatal3() throws Exception { - AwkTestSupport - .cliTest("GAWK nonfatal3") - .argument("-f", gawkFile("nonfatal3.awk")) - .expectLines(gawkPath("nonfatal3.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_nsbad() throws Exception { - skip(NON_ZERO_TRANSCRIPT_REASON); - } - - @Test - public void test_nsbad2() throws Exception { - skip(NON_ZERO_TRANSCRIPT_REASON); - } - - @Test - public void test_nsbad3() throws Exception { - skip(NON_ZERO_TRANSCRIPT_REASON); - } - - @Test - public void test_nsforloop() throws Exception { - AwkTestSupport - .cliTest("GAWK nsforloop") - .argument("-f", gawkFile("nsforloop.awk")) - .expectLines(gawkPath("nsforloop.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_nsfuncrecurse() throws Exception { - AwkTestSupport - .cliTest("GAWK nsfuncrecurse") - .argument("-f", gawkFile("nsfuncrecurse.awk")) - .expectLines(gawkPath("nsfuncrecurse.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_nsindirect1() throws Exception { - AwkTestSupport - .cliTest("GAWK nsindirect1") - .argument("-f", gawkFile("nsindirect1.awk")) - .expectLines(gawkPath("nsindirect1.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_nsindirect2() throws Exception { - AwkTestSupport - .cliTest("GAWK nsindirect2") - .argument("-f", gawkFile("nsindirect2.awk")) - .expectLines(gawkPath("nsindirect2.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_nsprof1() throws Exception { - skip("gawk's --pretty-print mode is not implemented by Jawk."); - } - - @Test - public void test_nsprof2() throws Exception { - skip("gawk's --pretty-print mode is not implemented by Jawk."); - } - - @Test - public void test_octdec() throws Exception { - AwkTestSupport - .cliTest("GAWK octdec") - .argument("-f", gawkFile("octdec.awk")) - .expectLines(gawkPath("octdec.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_patsplit() throws Exception { - AwkTestSupport - .cliTest("GAWK patsplit") - .argument("-f", gawkFile("patsplit.awk")) - .expectLines(gawkPath("patsplit.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_posix() throws Exception { - AwkTestSupport - .cliTest("GAWK posix") - .argument("-f", gawkFile("posix.awk")) - .stdin(gawkText("posix.in")) - .expectLines(gawkPath("posix.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_printfbad1() throws Exception { - skip(NON_ZERO_TRANSCRIPT_REASON); - } - - @Test - public void test_printfbad3() throws Exception { - AwkTestSupport - .cliTest("GAWK printfbad3") - .argument("-f", gawkFile("printfbad3.awk")) - .expectLines(gawkPath("printfbad3.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_printfbad4() throws Exception { - skip(NON_ZERO_TRANSCRIPT_REASON); - } - - @Test - public void test_printhuge() throws Exception { - skip(NON_UTF8_EXPECTED_REASON); - } - - @Test - public void test_procinfs() throws Exception { - AwkTestSupport - .cliTest("GAWK procinfs") - .argument("-f", gawkFile("procinfs.awk")) - .expectLines(gawkPath("procinfs.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_profile4() throws Exception { - skip("gawk's --pretty-print mode is not implemented by Jawk."); - } - - @Test - public void test_profile8() throws Exception { - skip("gawk's --pretty-print mode is not implemented by Jawk."); - } - - @Test - public void test_profile9() throws Exception { - skip("gawk's --pretty-print mode is not implemented by Jawk."); - } - - @Test - public void test_profile10() throws Exception { - skip("gawk's --pretty-print mode is not implemented by Jawk."); - } - - @Test - public void test_profile11() throws Exception { - skip("gawk's --pretty-print mode is not implemented by Jawk."); - } - - @Test - public void test_profile13() throws Exception { - skip("gawk's --pretty-print mode is not implemented by Jawk."); - } - - @Test - public void test_profile14() throws Exception { - skip("gawk's --pretty-print mode is not implemented by Jawk."); - } - - @Test - public void test_profile15() throws Exception { - skip("gawk's --pretty-print mode is not implemented by Jawk."); - } - - @Test - public void test_profile16() throws Exception { - skip("gawk's --pretty-print mode is not implemented by Jawk."); - } - - @Test - public void test_profile17() throws Exception { - skip("gawk's --pretty-print mode is not implemented by Jawk."); - } - - @Test - public void test_regexsub() throws Exception { - AwkTestSupport - .cliTest("GAWK regexsub") - .argument("-f", gawkFile("regexsub.awk")) - .expectLines(gawkPath("regexsub.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_regnul1() throws Exception { - AwkTestSupport - .cliTest("GAWK regnul1") - .argument("-f", gawkFile("regnul1.awk")) - .expectLines(gawkPath("regnul1.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_regnul2() throws Exception { - AwkTestSupport - .cliTest("GAWK regnul2") - .argument("-f", gawkFile("regnul2.awk")) - .expectLines(gawkPath("regnul2.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_regx8bit() throws Exception { - skip(NON_UTF8_EXPECTED_REASON); - } - - @Test - public void test_reint() throws Exception { - AwkTestSupport - .cliTest("GAWK reint") - .argument("-f", gawkFile("reint.awk")) - .stdin(gawkText("reint.in")) - .expectLines(gawkPath("reint.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_reint2() throws Exception { - AwkTestSupport - .cliTest("GAWK reint2") - .argument("--locale", "en-US") - .argument("-f", gawkFile("reint2.awk")) - .stdin(gawkText("reint2.in")) - .expectLines(gawkPath("reint2.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_rsgetline() throws Exception { - AwkTestSupport - .cliTest("GAWK rsgetline") - .argument("-f", gawkFile("rsgetline.awk")) - .stdin(gawkText("rsgetline.in")) - .expectLines(gawkPath("rsgetline.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_rsstart1() throws Exception { - AwkTestSupport - .cliTest("GAWK rsstart1") - .argument("-f", gawkFile("rsstart1.awk")) - .stdin(gawkText("rsstart1.in")) - .expectLines(gawkPath("rsstart1.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_rsstart2() throws Exception { - AwkTestSupport - .cliTest("GAWK rsstart2") - .argument("-f", gawkFile("rsstart2.awk")) - .stdin(gawkText("rsstart2.in")) - .expectLines(gawkPath("rsstart2.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_rstest6() throws Exception { - AwkTestSupport - .cliTest("GAWK rstest6") - .argument("-f", gawkFile("rstest6.awk")) - .stdin(gawkText("rstest6.in")) - .expectLines(gawkPath("rstest6.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_sandbox1() throws Exception { - skip(NON_ZERO_TRANSCRIPT_REASON); - } - - @Test - public void test_shadow() throws Exception { - skip("gawk's --lint diagnostics are not implemented by Jawk."); - } - - @Test - public void test_shadowbuiltin() throws Exception { - AwkTestSupport - .cliTest("GAWK shadowbuiltin") - .argument("-f", gawkFile("shadowbuiltin.awk")) - .expectLines(gawkPath("shadowbuiltin.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_sortfor() throws Exception { - AwkTestSupport - .cliTest("GAWK sortfor") - .argument("-f", gawkFile("sortfor.awk")) - .stdin(gawkText("sortfor.in")) - .expectLines(gawkPath("sortfor.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_sortfor2() throws Exception { - AwkTestSupport - .cliTest("GAWK sortfor2") - .argument("-f", gawkFile("sortfor2.awk")) - .stdin(gawkText("sortfor2.in")) - .expectLines(gawkPath("sortfor2.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_sortu() throws Exception { - AwkTestSupport - .cliTest("GAWK sortu") - .argument("-f", gawkFile("sortu.awk")) - .expectLines(gawkPath("sortu.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_split_after_fpat() throws Exception { - AwkTestSupport - .cliTest("GAWK split_after_fpat") - .argument("-f", gawkFile("split_after_fpat.awk")) - .stdin(gawkText("split_after_fpat.in")) - .expectLines(gawkPath("split_after_fpat.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_splitarg4() throws Exception { - AwkTestSupport - .cliTest("GAWK splitarg4") - .argument("-f", gawkFile("splitarg4.awk")) - .stdin(gawkText("splitarg4.in")) - .expectLines(gawkPath("splitarg4.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_strftfld() throws Exception { - AwkTestSupport - .cliTest("GAWK strftfld") - .argument("-f", gawkFile("strftfld.awk")) - .stdin(gawkText("strftfld.in")) - .expectLines(gawkPath("strftfld.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_strtonum() throws Exception { - AwkTestSupport - .cliTest("GAWK strtonum") - .argument("-f", gawkFile("strtonum.awk")) - .expectLines(gawkPath("strtonum.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_strtonum1() throws Exception { - AwkTestSupport - .cliTest("GAWK strtonum1") - .argument("-f", gawkFile("strtonum1.awk")) - .expectLines(gawkPath("strtonum1.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_stupid1() throws Exception { - AwkTestSupport - .cliTest("GAWK stupid1") - .argument("-f", gawkFile("stupid1.awk")) - .expectLines(gawkPath("stupid1.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_stupid2() throws Exception { - AwkTestSupport - .cliTest("GAWK stupid2") - .argument("-f", gawkFile("stupid2.awk")) - .expectLines(gawkPath("stupid2.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_stupid3() throws Exception { - AwkTestSupport - .cliTest("GAWK stupid3") - .argument("-f", gawkFile("stupid3.awk")) - .expectLines(gawkPath("stupid3.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_stupid4() throws Exception { - AwkTestSupport - .cliTest("GAWK stupid4") - .argument("-f", gawkFile("stupid4.awk")) - .expectLines(gawkPath("stupid4.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_stupid5() throws Exception { - AwkTestSupport - .cliTest("GAWK stupid5") - .argument("-f", gawkFile("stupid5.awk")) - .expectLines(gawkPath("stupid5.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_switch2() throws Exception { - AwkTestSupport - .cliTest("GAWK switch2") - .argument("-f", gawkFile("switch2.awk")) - .expectLines(gawkPath("switch2.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_symtab1() throws Exception { - AwkTestSupport - .cliTest("GAWK symtab1") - .argument("-f", gawkFile("symtab1.awk")) - .expectLines(gawkPath("symtab1.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_symtab2() throws Exception { - AwkTestSupport - .cliTest("GAWK symtab2") - .argument("-f", gawkFile("symtab2.awk")) - .expectLines(gawkPath("symtab2.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_symtab3() throws Exception { - skip(NON_ZERO_TRANSCRIPT_REASON); - } - - @Test - public void test_symtab4() throws Exception { - AwkTestSupport - .cliTest("GAWK symtab4") - .argument("-f", gawkFile("symtab4.awk")) - .stdin(gawkText("symtab4.in")) - .expectLines(gawkPath("symtab4.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_symtab5() throws Exception { - AwkTestSupport - .cliTest("GAWK symtab5") - .argument("-f", gawkFile("symtab5.awk")) - .stdin(gawkText("symtab5.in")) - .expectLines(gawkPath("symtab5.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_symtab7() throws Exception { - skip(NON_ZERO_TRANSCRIPT_REASON); - } - - @Test - public void test_symtab10() throws Exception { - skip(NON_ZERO_TRANSCRIPT_REASON); - } - - @Test - public void test_symtab11() throws Exception { - AwkTestSupport - .cliTest("GAWK symtab11") - .argument("-f", gawkFile("symtab11.awk")) - .expectLines(gawkPath("symtab11.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_symtab12() throws Exception { - skip(NON_ZERO_TRANSCRIPT_REASON); - } - - @Test - public void test_timeout() throws Exception { - AwkTestSupport - .cliTest("GAWK timeout") - .argument("-f", gawkFile("timeout.awk")) - .expectLines(gawkPath("timeout.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_typedregex1() throws Exception { - AwkTestSupport - .cliTest("GAWK typedregex1") - .argument("-f", gawkFile("typedregex1.awk")) - .expectLines(gawkPath("typedregex1.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_typedregex2() throws Exception { - AwkTestSupport - .cliTest("GAWK typedregex2") - .argument("-f", gawkFile("typedregex2.awk")) - .expectLines(gawkPath("typedregex2.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_typedregex3() throws Exception { - AwkTestSupport - .cliTest("GAWK typedregex3") - .argument("-f", gawkFile("typedregex3.awk")) - .expectLines(gawkPath("typedregex3.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_typedregex5() throws Exception { - AwkTestSupport - .cliTest("GAWK typedregex5") - .argument("-f", gawkFile("typedregex5.awk")) - .stdin(gawkText("typedregex5.in")) - .expectLines(gawkPath("typedregex5.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_typedregex6() throws Exception { - AwkTestSupport - .cliTest("GAWK typedregex6") - .argument("-f", gawkFile("typedregex6.awk")) - .stdin(gawkText("typedregex6.in")) - .expectLines(gawkPath("typedregex6.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_typeof1() throws Exception { - AwkTestSupport - .cliTest("GAWK typeof1") - .argument("-f", gawkFile("typeof1.awk")) - .expectLines(gawkPath("typeof1.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_typeof2() throws Exception { - AwkTestSupport - .cliTest("GAWK typeof2") - .argument("-f", gawkFile("typeof2.awk")) - .expectLines(gawkPath("typeof2.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_typeof3() throws Exception { - AwkTestSupport - .cliTest("GAWK typeof3") - .argument("-f", gawkFile("typeof3.awk")) - .expectLines(gawkPath("typeof3.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_typeof4() throws Exception { - AwkTestSupport - .cliTest("GAWK typeof4") - .argument("-f", gawkFile("typeof4.awk")) - .expectLines(gawkPath("typeof4.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_typeof5() throws Exception { - AwkTestSupport - .cliTest("GAWK typeof5") - .argument("-f", gawkFile("typeof5.awk")) - .stdin(gawkText("typeof5.in")) - .expectLines(gawkPath("typeof5.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_typeof6() throws Exception { - AwkTestSupport - .cliTest("GAWK typeof6") - .argument("-f", gawkFile("typeof6.awk")) - .expectLines(gawkPath("typeof6.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_unicode1() throws Exception { - AwkTestSupport - .cliTest("GAWK unicode1") - .argument("--locale", "en-US") - .argument("-f", gawkFile("unicode1.awk")) - .expectLines(gawkPath("unicode1.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_double1() throws Exception { - AwkTestSupport - .cliTest("GAWK double1") - .argument("-f", gawkFile("double1.awk")) - .expectLines(gawkPath("double1.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_double2() throws Exception { - AwkTestSupport - .cliTest("GAWK double2") - .argument("-f", gawkFile("double2.awk")) - .expectLines(gawkPath("double2.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_inf_nan_torture() throws Exception { - AwkTestSupport - .cliTest("GAWK inf-nan-torture") - .argument("-f", gawkFile("inf-nan-torture.awk")) - .stdin(gawkText("inf-nan-torture.in")) - .expectLines(gawkPath("inf-nan-torture.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_intformat() throws Exception { - AwkTestSupport - .cliTest("GAWK intformat") - .argument("-f", gawkFile("intformat.awk")) - .expectLines(gawkPath("intformat.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_asort() throws Exception { - AwkTestSupport - .cliTest("GAWK asort") - .argument("-f", gawkFile("asort.awk")) - .expectLines(gawkPath("asort.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_asorti() throws Exception { - AwkTestSupport - .cliTest("GAWK asorti") - .argument("-f", gawkFile("asorti.awk")) - .expectLines(gawkPath("asorti.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_backbigs1() throws Exception { - skip(NON_UTF8_STDIN_REASON); - } - - @Test - public void test_backsmalls1() throws Exception { - AwkTestSupport - .cliTest("GAWK backsmalls1") - .argument("--locale", "en-US") - .argument("-f", gawkFile("backsmalls1.awk")) - .stdin(gawkText("backsmalls1.in")) - .expectLines(gawkPath("backsmalls1.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_backsmalls2() throws Exception { - AwkTestSupport - .cliTest("GAWK backsmalls2") - .argument("--locale", "en-US") - .argument("-f", gawkFile("backsmalls2.awk")) - .expectLines(gawkPath("backsmalls2.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_fmttest() throws Exception { - AwkTestSupport - .cliTest("GAWK fmttest") - .argument("-f", gawkFile("fmttest.awk")) - .expectLines(gawkPath("fmttest.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_fnarydel() throws Exception { - AwkTestSupport - .cliTest("GAWK fnarydel") - .argument("-f", gawkFile("fnarydel.awk")) - .expectLines(gawkPath("fnarydel.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_fnparydl() throws Exception { - AwkTestSupport - .cliTest("GAWK fnparydl") - .argument("-f", gawkFile("fnparydl.awk")) - .expectLines(gawkPath("fnparydl.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_lc_num1() throws Exception { - AwkTestSupport - .cliTest("GAWK lc_num1") - .argument("--locale", "en-US") - .argument("-f", gawkFile("lc_num1.awk")) - .expectLines(gawkPath("lc_num1.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_mbfw1() throws Exception { - AwkTestSupport - .cliTest("GAWK mbfw1") - .argument("--locale", "en-US") - .argument("-f", gawkFile("mbfw1.awk")) - .stdin(gawkText("mbfw1.in")) - .expectLines(gawkPath("mbfw1.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_mbprintf1() throws Exception { - AwkTestSupport - .cliTest("GAWK mbprintf1") - .argument("--locale", "en-US") - .argument("-f", gawkFile("mbprintf1.awk")) - .stdin(gawkText("mbprintf1.in")) - .expectLines(gawkPath("mbprintf1.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_mbprintf2() throws Exception { - AwkTestSupport - .cliTest("GAWK mbprintf2") - .argument("--locale", "ja-JP") - .argument("-f", gawkFile("mbprintf2.awk")) - .expectLines(gawkPath("mbprintf2.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_mbprintf3() throws Exception { - skip(NON_UTF8_EXPECTED_REASON); - } - - @Test - public void test_mbprintf4() throws Exception { - AwkTestSupport - .cliTest("GAWK mbprintf4") - .argument("--locale", "en-US") - .argument("-f", gawkFile("mbprintf4.awk")) - .stdin(gawkText("mbprintf4.in")) - .expectLines(gawkPath("mbprintf4.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_mtchi18n() throws Exception { - AwkTestSupport - .cliTest("GAWK mtchi18n") - .argument("--locale", "ru-RU") - .argument("-f", gawkFile("mtchi18n.awk")) - .stdin(gawkText("mtchi18n.in")) - .expectLines(gawkPath("mtchi18n.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_rebt8b2() throws Exception { - AwkTestSupport - .cliTest("GAWK rebt8b2") - .argument("-f", gawkFile("rebt8b2.awk")) - .expectLines(gawkPath("rebt8b2.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_sort1() throws Exception { - AwkTestSupport - .cliTest("GAWK sort1") - .argument("-f", gawkFile("sort1.awk")) - .expectLines(gawkPath("sort1.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_sprintfc() throws Exception { - AwkTestSupport - .cliTest("GAWK sprintfc") - .argument("-f", gawkFile("sprintfc.awk")) - .stdin(gawkText("sprintfc.in")) - .expectLines(gawkPath("sprintfc.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_apiterm() throws Exception { - AwkTestSupport - .cliTest("GAWK apiterm") - .argument("-f", gawkFile("apiterm.awk")) - .stdin(gawkText("apiterm.in")) - .expectLines(gawkPath("apiterm.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_fnmatch() throws Exception { - AwkTestSupport - .cliTest("GAWK fnmatch") - .argument("-f", gawkFile("fnmatch.awk")) - .expectLines(gawkPath("fnmatch.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_fork() throws Exception { - AwkTestSupport - .cliTest("GAWK fork") - .argument("-f", gawkFile("fork.awk")) - .expectLines(gawkPath("fork.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_fork2() throws Exception { - AwkTestSupport - .cliTest("GAWK fork2") - .argument("-f", gawkFile("fork2.awk")) - .expectLines(gawkPath("fork2.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_functab4() throws Exception { - AwkTestSupport - .cliTest("GAWK functab4") - .argument("-f", gawkFile("functab4.awk")) - .expectLines(gawkPath("functab4.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_functab5() throws Exception { - AwkTestSupport - .cliTest("GAWK functab5") - .argument("-f", gawkFile("functab5.awk")) - .expectLines(gawkPath("functab5.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_ordchr() throws Exception { - AwkTestSupport - .cliTest("GAWK ordchr") - .argument("-f", gawkFile("ordchr.awk")) - .expectLines(gawkPath("ordchr.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_revout() throws Exception { - AwkTestSupport - .cliTest("GAWK revout") - .argument("-f", gawkFile("revout.awk")) - .expectLines(gawkPath("revout.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_revtwoway() throws Exception { - AwkTestSupport - .cliTest("GAWK revtwoway") - .argument("-f", gawkFile("revtwoway.awk")) - .expectLines(gawkPath("revtwoway.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_rwarray() throws Exception { - AwkTestSupport - .cliTest("GAWK rwarray") - .argument("-f", gawkFile("rwarray.awk")) - .stdin(gawkText("rwarray.in")) - .expectLines(gawkPath("rwarray.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_time() throws Exception { - AwkTestSupport - .cliTest("GAWK time") - .argument("-f", gawkFile("time.awk")) - .expectLines(gawkPath("time.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_mpfrbigint() throws Exception { - skip("gawk's -M bignum mode is not implemented by Jawk."); - } - - @Test - public void test_mpfrbigint2() throws Exception { - skip("gawk's -M bignum mode is not implemented by Jawk."); - } - - @Test - public void test_mpfrcase() throws Exception { - skip("gawk's -M bignum mode is not implemented by Jawk."); - } - - @Test - public void test_mpfrcase2() throws Exception { - skip("gawk's -M bignum mode is not implemented by Jawk."); - } - - @Test - public void test_mpfrfield() throws Exception { - skip("gawk's -M bignum mode is not implemented by Jawk."); - } - - @Test - public void test_mpfrnegzero() throws Exception { - skip("gawk's -M bignum mode is not implemented by Jawk."); - } - - @Test - public void test_mpfrnegzero2() throws Exception { - skip("gawk's -M bignum mode is not implemented by Jawk."); - } - - @Test - public void test_mpfrnonum() throws Exception { - skip("gawk's -M bignum mode is not implemented by Jawk."); - } - - @Test - public void test_mpfrnr() throws Exception { - skip("gawk's -M bignum mode is not implemented by Jawk."); - } - - @Test - public void test_mpfrrem() throws Exception { - skip("gawk's -M bignum mode is not implemented by Jawk."); - } - - @Test - public void test_mpfrrndeval() throws Exception { - skip("gawk's -M bignum mode is not implemented by Jawk."); - } - - @Test - public void test_mpfrstrtonum() throws Exception { - skip("gawk's -M bignum mode is not implemented by Jawk."); - } - - @Test - public void test_mpgforcenum() throws Exception { - skip("gawk's -M bignum mode is not implemented by Jawk."); - } } diff --git a/src/it/java/io/jawk/GawkLocaleIT.java b/src/it/java/io/jawk/GawkLocaleIT.java new file mode 100644 index 00000000..cad7d78c --- /dev/null +++ b/src/it/java/io/jawk/GawkLocaleIT.java @@ -0,0 +1,246 @@ +package io.jawk; + +/*- + * ╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲ + * Jawk + * ჻჻჻჻჻჻ + * Copyright (C) 2006 - 2026 MetricsHub + * ჻჻჻჻჻჻ + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * . + * ╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱ + */ + +import org.junit.Test; + +/** + * Locale- and charset-sensitive gawk compatibility cases mirrored from the vendored locale test groups. + */ +public class GawkLocaleIT extends AbstractGawkSuite { + + @Test + public void test_asort() throws Exception { + AwkTestSupport + .cliTest("GAWK asort") + .argument("-f", gawkFile("asort.awk")) + .expectLines(gawkPath("asort.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_asorti() throws Exception { + AwkTestSupport + .cliTest("GAWK asorti") + .argument("-f", gawkFile("asorti.awk")) + .expectLines(gawkPath("asorti.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_backbigs1() throws Exception { + skip(NON_UTF8_STDIN_REASON); + } + + @Test + public void test_backsmalls1() throws Exception { + AwkTestSupport + .cliTest("GAWK backsmalls1") + .argument("--locale", "en-US") + .argument("-f", gawkFile("backsmalls1.awk")) + .stdin(gawkText("backsmalls1.in")) + .expectLines(gawkPath("backsmalls1.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_backsmalls2() throws Exception { + AwkTestSupport + .cliTest("GAWK backsmalls2") + .argument("--locale", "en-US") + .argument("-f", gawkFile("backsmalls2.awk")) + .expectLines(gawkPath("backsmalls2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_fmttest() throws Exception { + AwkTestSupport + .cliTest("GAWK fmttest") + .argument("-f", gawkFile("fmttest.awk")) + .expectLines(gawkPath("fmttest.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_fnarydel() throws Exception { + AwkTestSupport + .cliTest("GAWK fnarydel") + .argument("-f", gawkFile("fnarydel.awk")) + .expectLines(gawkPath("fnarydel.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_fnparydl() throws Exception { + AwkTestSupport + .cliTest("GAWK fnparydl") + .argument("-f", gawkFile("fnparydl.awk")) + .expectLines(gawkPath("fnparydl.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_lc_num1() throws Exception { + AwkTestSupport + .cliTest("GAWK lc_num1") + .argument("--locale", "en-US") + .argument("-f", gawkFile("lc_num1.awk")) + .expectLines(gawkPath("lc_num1.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_mbfw1() throws Exception { + AwkTestSupport + .cliTest("GAWK mbfw1") + .argument("--locale", "en-US") + .argument("-f", gawkFile("mbfw1.awk")) + .stdin(gawkText("mbfw1.in")) + .expectLines(gawkPath("mbfw1.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_mbprintf1() throws Exception { + AwkTestSupport + .cliTest("GAWK mbprintf1") + .argument("--locale", "en-US") + .argument("-f", gawkFile("mbprintf1.awk")) + .stdin(gawkText("mbprintf1.in")) + .expectLines(gawkPath("mbprintf1.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_mbprintf2() throws Exception { + AwkTestSupport + .cliTest("GAWK mbprintf2") + .argument("--locale", "ja-JP") + .argument("-f", gawkFile("mbprintf2.awk")) + .expectLines(gawkPath("mbprintf2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_mbprintf3() throws Exception { + skip(NON_UTF8_EXPECTED_REASON); + } + + @Test + public void test_mbprintf4() throws Exception { + AwkTestSupport + .cliTest("GAWK mbprintf4") + .argument("--locale", "en-US") + .argument("-f", gawkFile("mbprintf4.awk")) + .stdin(gawkText("mbprintf4.in")) + .expectLines(gawkPath("mbprintf4.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_mtchi18n() throws Exception { + AwkTestSupport + .cliTest("GAWK mtchi18n") + .argument("--locale", "ru-RU") + .argument("-f", gawkFile("mtchi18n.awk")) + .stdin(gawkText("mtchi18n.in")) + .expectLines(gawkPath("mtchi18n.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_rebt8b2() throws Exception { + AwkTestSupport + .cliTest("GAWK rebt8b2") + .argument("-f", gawkFile("rebt8b2.awk")) + .expectLines(gawkPath("rebt8b2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_sort1() throws Exception { + AwkTestSupport + .cliTest("GAWK sort1") + .argument("-f", gawkFile("sort1.awk")) + .expectLines(gawkPath("sort1.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_sprintfc() throws Exception { + AwkTestSupport + .cliTest("GAWK sprintfc") + .argument("-f", gawkFile("sprintfc.awk")) + .stdin(gawkText("sprintfc.in")) + .expectLines(gawkPath("sprintfc.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_rtlenmb() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_mbprintf5() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_jarebug() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_nlstringtest() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_spacere() throws Exception { + AwkTestSupport + .cliTest("GAWK spacere") + .argument("-f", gawkFile("spacere.awk")) + .expectLines(gawkPath("spacere.ok")) + .expectExit(0) + .runAndAssert(); + } + +} diff --git a/src/it/java/io/jawk/GawkManualIT.java b/src/it/java/io/jawk/GawkManualIT.java deleted file mode 100644 index 9511c6a5..00000000 --- a/src/it/java/io/jawk/GawkManualIT.java +++ /dev/null @@ -1,734 +0,0 @@ -package io.jawk; - -/*- - * ╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲ - * Jawk - * ჻჻჻჻჻჻ - * Copyright (C) 2006 - 2026 MetricsHub - * ჻჻჻჻჻჻ - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . - * ╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱ - */ - -import static org.junit.Assume.assumeTrue; - -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.nio.file.Files; -import java.nio.file.Path; -import org.junit.Test; - -/** - * Explicit handwritten gawk compatibility cases transcribed from vendored - * Makefile.am rules. The Java source is the runtime source of truth; many - * shell-heavy cases are kept as explicit skipped placeholders until they are - * worth expressing as AwkTestSupport.cliTest cases. - */ -public class GawkManualIT { - - private static final Path GAWK_DIRECTORY = CompatibilityTestResources.resourceDirectory(GawkManualIT.class, "gawk"); - private static final String MANUAL_SKIP_REASON = "Handwritten gawk case from Makefile.am not yet expressed as an AwkTestSupport.cliTest case."; - - private static Path gawkPath(String fileName) { - return GAWK_DIRECTORY.resolve(fileName); - } - - private static String gawkFile(String fileName) { - return gawkPath(fileName).toString(); - } - - private static String gawkText(String fileName) throws IOException { - return new String(Files.readAllBytes(gawkPath(fileName)), StandardCharsets.UTF_8); - } - - private static void skip(String reason) { - assumeTrue(reason, false); - } - - @Test - public void test_pma() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_poundbang() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_messages() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_argarray() throws Exception { - AwkTestSupport - .cliTest("GAWK argarray") - .argument("-f", gawkFile("argarray.awk")) - .stdin("just a test\n") - .operand(gawkFile("argarray.in"), "-") - .postProcessWith(output -> output.replace(gawkFile("argarray.in"), "./argarray.input")) - .expectLines(gawkPath("argarray.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_regtest() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_manyfiles() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_compare() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_inftest() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_getline2() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_awkpath() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_argtest() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_badargs() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_strftime() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_devfd() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_errno() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_tweakfld() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_pid() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_strftlng() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_nors() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_rebuf() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_rsglstdin() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_pipeio1() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_pipeio2() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_clobber() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_arynocls() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_getlnbuf() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_inetmesg() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_inetechu() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_inetecht() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_inetdayu() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_inetdayt() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_redfilnm() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_space() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_rsnulbig() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_rsnulbig2() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_exitval1() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_fsspcoln() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_rsstart3() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_rtlenmb() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_nofile() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_binmode1() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_devfd1() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_devfd2() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_mixed1() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_mbprintf5() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_beginfile1() throws Exception { - skip("BEGINFILE and ENDFILE are not implemented by Jawk yet."); - } - - @Test - public void test_beginfile2() throws Exception { - skip("BEGINFILE and ENDFILE are not implemented by Jawk yet."); - } - - @Test - public void test_dumpvars() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_profile0() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_profile1() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_profile2() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_profile3() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_profile5() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_profile6() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_profile7() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_profile12() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_mpfrieee() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_mpfrexprange() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_mpfrrnd() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_mpfrsort() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_mpfruplus() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_mpfranswer42() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_mpfrmemok1() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_mpfrsqrt() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_jarebug() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_ordchr2() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_readfile() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_readfile2() throws Exception { - AwkTestSupport - .cliTest("GAWK readfile2") - .argument("-f", gawkFile("readfile2.awk")) - .operand(gawkFile("readfile2.awk"), gawkFile("readdir.awk")) - .expectLines(gawkPath("readfile2.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_nsawk1a() throws Exception { - AwkTestSupport - .cliTest("GAWK nsawk1a") - .argument("-f", gawkFile("nsawk1.awk")) - .expectLines(gawkPath("nsawk1a.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_nsawk1b() throws Exception { - AwkTestSupport - .cliTest("GAWK nsawk1b") - .argument("-v", "I=fine") - .argument("-f", gawkFile("nsawk1.awk")) - .expectLines(gawkPath("nsawk1b.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_nsawk1c() throws Exception { - AwkTestSupport - .cliTest("GAWK nsawk1c") - .argument("-v", "awk::I=fine") - .argument("-f", gawkFile("nsawk1.awk")) - .expectLines(gawkPath("nsawk1c.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_nsawk2a() throws Exception { - AwkTestSupport - .cliTest("GAWK nsawk2a") - .argument("-v", "I=fine") - .argument("-f", gawkFile("nsawk2.awk")) - .expectLines(gawkPath("nsawk2a.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_nsawk2b() throws Exception { - AwkTestSupport - .cliTest("GAWK nsawk2b") - .argument("-v", "awk::I=fine") - .argument("-f", gawkFile("nsawk2.awk")) - .expectLines(gawkPath("nsawk2b.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_include2() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_incdupe() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_incdupe2() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_incdupe3() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_incdupe4() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_incdupe5() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_incdupe6() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_incdupe7() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_inplace1() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_inplace2() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_inplace2bcomp() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_inplace3() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_inplace3bcomp() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_testext() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_getfile() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_readdir() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_readdir_test() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_readdir_retest() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_readall() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_fts() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_charasbytes() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_symtab6() throws Exception { - skip( - "This handwritten case compares a fatal gawk SYMTAB diagnostic on stderr and is intentionally skipped in the explicit AwkTestSupport.cliTest suite."); - } - - @Test - public void test_symtab8() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_symtab9() throws Exception { - AwkTestSupport - .cliTest("GAWK symtab9") - .argument("-f", gawkFile("symtab9.awk")) - .expectLines(gawkPath("symtab9.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_reginttrad() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_colonwarn() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_dbugeval() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_filefuncs() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_genpot() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_negtime() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_watchpoint1() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_pty1() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_pty2() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_ignrcas3() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_arrdbg() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_sourcesplit() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_eofsrc1() throws Exception { - skip( - "This handwritten case compares gawk parser diagnostics on stderr and is intentionally skipped in the explicit AwkTestSupport.cliTest suite."); - } - - @Test - public void test_nsbad_cmd() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_nonfatal1() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_nlstringtest() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_longwrds() throws Exception { - AwkTestSupport - .cliTest("GAWK longwrds") - .argument("-v", "SORT=sort") - .argument("-f", gawkFile("longwrds.awk")) - .stdin(gawkText("longwrds.in")) - .expectLines(gawkPath("longwrds.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_nsidentifier() throws Exception { - AwkTestSupport - .cliTest("GAWK nsidentifier") - .argument("-v", "SORT=sort") - .argument("-f", gawkFile("nsidentifier.awk")) - .expectLines(gawkPath("nsidentifier.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_spacere() throws Exception { - AwkTestSupport - .cliTest("GAWK spacere") - .argument("-f", gawkFile("spacere.awk")) - .expectLines(gawkPath("spacere.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_typedregex4() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_iolint() throws Exception { - skip(MANUAL_SKIP_REASON); - } - - @Test - public void test_argcasfile() throws Exception { - AwkTestSupport - .cliTest("GAWK argcasfile") - .argument("-f", gawkFile("argcasfile.awk")) - .stdin(gawkText("argcasfile.in")) - .operand("ARGC=1", " /no/such/file") - .expectLines(gawkPath("argcasfile.ok")) - .expectExit(0) - .runAndAssert(); - } - - @Test - public void test_indirectbuiltin2() throws Exception { - skip(MANUAL_SKIP_REASON); - } -} diff --git a/src/it/java/io/jawk/GawkOptionalFeatureIT.java b/src/it/java/io/jawk/GawkOptionalFeatureIT.java new file mode 100644 index 00000000..318e6514 --- /dev/null +++ b/src/it/java/io/jawk/GawkOptionalFeatureIT.java @@ -0,0 +1,741 @@ +package io.jawk; + +/*- + * ╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲ + * Jawk + * ჻჻჻჻჻჻ + * Copyright (C) 2006 - 2026 MetricsHub + * ჻჻჻჻჻჻ + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * . + * ╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱ + */ + +import org.junit.Test; + +/** + * Optional-feature and environment-specific gawk compatibility cases mirrored from the vendored optional gawk groups. + */ +public class GawkOptionalFeatureIT extends AbstractGawkSuite { + + @Test + public void test_defref() throws Exception { + skip("gawk's --lint diagnostics are not implemented by Jawk."); + } + + @Test + public void test_escapebrace() throws Exception { + AwkTestSupport + .cliTest("GAWK escapebrace") + .argument("--posix") + .argument("-f", gawkFile("escapebrace.awk")) + .stdin(gawkText("escapebrace.in")) + .expectLines(gawkPath("escapebrace.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_gsubtst3() throws Exception { + AwkTestSupport + .cliTest("GAWK gsubtst3") + .argument("-f", gawkFile("gsubtst3.awk")) + .stdin(gawkText("gsubtst3.in")) + .expectLines(gawkPath("gsubtst3.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_litoct() throws Exception { + skip("gawk's --traditional mode is not implemented by Jawk."); + } + + @Test + public void test_noeffect() throws Exception { + skip("gawk's --lint diagnostics are not implemented by Jawk."); + } + + @Test + public void test_nofmtch() throws Exception { + skip("gawk's --lint diagnostics are not implemented by Jawk."); + } + + @Test + public void test_nonl() throws Exception { + skip("gawk's --lint diagnostics are not implemented by Jawk."); + } + + @Test + public void test_paramasfunc1() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_paramasfunc2() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_posix2008sub() throws Exception { + AwkTestSupport + .cliTest("GAWK posix2008sub") + .argument("--posix") + .argument("-f", gawkFile("posix2008sub.awk")) + .expectLines(gawkPath("posix2008sub.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_posix_compare() throws Exception { + AwkTestSupport + .cliTest("GAWK posix_compare") + .argument("--locale", "en-US") + .argument("--posix") + .argument("-f", gawkFile("posix_compare.awk")) + .expectLines(gawkPath("posix_compare.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_printf0() throws Exception { + AwkTestSupport + .cliTest("GAWK printf0") + .argument("--posix") + .argument("-f", gawkFile("printf0.awk")) + .expectLines(gawkPath("printf0.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_rscompat() throws Exception { + skip("gawk's --traditional mode is not implemented by Jawk."); + } + + @Test + public void test_status_close() throws Exception { + AwkTestSupport + .cliTest("GAWK status-close") + .argument("-f", gawkFile("status-close.awk")) + .expectLines(gawkPath("status-close.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_tradanch() throws Exception { + skip("gawk's --traditional mode is not implemented by Jawk."); + } + + @Test + public void test_uninit2() throws Exception { + skip("gawk's --lint diagnostics are not implemented by Jawk."); + } + + @Test + public void test_uninit3() throws Exception { + skip("gawk's --lint diagnostics are not implemented by Jawk."); + } + + @Test + public void test_uninit4() throws Exception { + skip("gawk's --lint diagnostics are not implemented by Jawk."); + } + + @Test + public void test_uninit5() throws Exception { + skip("gawk's --lint diagnostics are not implemented by Jawk."); + } + + @Test + public void test_uninitialized() throws Exception { + skip("gawk's --lint diagnostics are not implemented by Jawk."); + } + + @Test + public void test_csv1() throws Exception { + skip("gawk's --csv mode is not implemented by Jawk."); + } + + @Test + public void test_csv2() throws Exception { + skip("gawk's --csv mode is not implemented by Jawk."); + } + + @Test + public void test_csv3() throws Exception { + skip("gawk's --csv mode is not implemented by Jawk."); + } + + @Test + public void test_csvodd() throws Exception { + skip("gawk's --csv mode is not implemented by Jawk."); + } + + @Test + public void test_dbugeval2() throws Exception { + skip("gawk's --debug mode is not implemented by Jawk."); + } + + @Test + public void test_dbugeval3() throws Exception { + skip("gawk's --debug mode is not implemented by Jawk."); + } + + @Test + public void test_dbugeval4() throws Exception { + skip("gawk's --debug mode is not implemented by Jawk."); + } + + @Test + public void test_dbugtypedre1() throws Exception { + skip("gawk's --debug mode is not implemented by Jawk."); + } + + @Test + public void test_dbugtypedre2() throws Exception { + skip("gawk's --debug mode is not implemented by Jawk."); + } + + @Test + public void test_forcenum() throws Exception { + AwkTestSupport + .cliTest("GAWK forcenum") + .argument("-f", gawkFile("forcenum.awk")) + .expectLines(gawkPath("forcenum.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_intarray() throws Exception { + AwkTestSupport + .cliTest("GAWK intarray") + .argument("-f", gawkFile("intarray.awk")) + .expectLines(gawkPath("intarray.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_lintexp() throws Exception { + skip("gawk's --lint diagnostics are not implemented by Jawk."); + } + + @Test + public void test_lintindex() throws Exception { + skip("gawk's --lint diagnostics are not implemented by Jawk."); + } + + @Test + public void test_lintint() throws Exception { + skip("gawk's --lint diagnostics are not implemented by Jawk."); + } + + @Test + public void test_lintlength() throws Exception { + skip("gawk's --lint diagnostics are not implemented by Jawk."); + } + + @Test + public void test_lintold() throws Exception { + skip("gawk's --lint-old diagnostics are not implemented by Jawk."); + } + + @Test + public void test_lintplus() throws Exception { + skip("gawk's --lint diagnostics are not implemented by Jawk."); + } + + @Test + public void test_lintwarn() throws Exception { + skip("gawk's --lint diagnostics are not implemented by Jawk."); + } + + @Test + public void test_muldimposix() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_nondec2() throws Exception { + AwkTestSupport + .cliTest("GAWK nondec2") + .argument("-f", gawkFile("nondec2.awk")) + .expectLines(gawkPath("nondec2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_nsprof1() throws Exception { + skip("gawk's --pretty-print mode is not implemented by Jawk."); + } + + @Test + public void test_nsprof2() throws Exception { + skip("gawk's --pretty-print mode is not implemented by Jawk."); + } + + @Test + public void test_profile4() throws Exception { + skip("gawk's --pretty-print mode is not implemented by Jawk."); + } + + @Test + public void test_profile8() throws Exception { + skip("gawk's --pretty-print mode is not implemented by Jawk."); + } + + @Test + public void test_profile9() throws Exception { + skip("gawk's --pretty-print mode is not implemented by Jawk."); + } + + @Test + public void test_profile10() throws Exception { + skip("gawk's --pretty-print mode is not implemented by Jawk."); + } + + @Test + public void test_profile11() throws Exception { + skip("gawk's --pretty-print mode is not implemented by Jawk."); + } + + @Test + public void test_profile13() throws Exception { + skip("gawk's --pretty-print mode is not implemented by Jawk."); + } + + @Test + public void test_profile14() throws Exception { + skip("gawk's --pretty-print mode is not implemented by Jawk."); + } + + @Test + public void test_profile15() throws Exception { + skip("gawk's --pretty-print mode is not implemented by Jawk."); + } + + @Test + public void test_profile16() throws Exception { + skip("gawk's --pretty-print mode is not implemented by Jawk."); + } + + @Test + public void test_profile17() throws Exception { + skip("gawk's --pretty-print mode is not implemented by Jawk."); + } + + @Test + public void test_reint() throws Exception { + AwkTestSupport + .cliTest("GAWK reint") + .argument("-f", gawkFile("reint.awk")) + .stdin(gawkText("reint.in")) + .expectLines(gawkPath("reint.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_reint2() throws Exception { + AwkTestSupport + .cliTest("GAWK reint2") + .argument("--locale", "en-US") + .argument("-f", gawkFile("reint2.awk")) + .stdin(gawkText("reint2.in")) + .expectLines(gawkPath("reint2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_sandbox1() throws Exception { + skip(NON_ZERO_TRANSCRIPT_REASON); + } + + @Test + public void test_shadow() throws Exception { + skip("gawk's --lint diagnostics are not implemented by Jawk."); + } + + @Test + public void test_double1() throws Exception { + AwkTestSupport + .cliTest("GAWK double1") + .argument("-f", gawkFile("double1.awk")) + .expectLines(gawkPath("double1.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_double2() throws Exception { + AwkTestSupport + .cliTest("GAWK double2") + .argument("-f", gawkFile("double2.awk")) + .expectLines(gawkPath("double2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_inf_nan_torture() throws Exception { + AwkTestSupport + .cliTest("GAWK inf-nan-torture") + .argument("-f", gawkFile("inf-nan-torture.awk")) + .stdin(gawkText("inf-nan-torture.in")) + .expectLines(gawkPath("inf-nan-torture.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_intformat() throws Exception { + AwkTestSupport + .cliTest("GAWK intformat") + .argument("-f", gawkFile("intformat.awk")) + .expectLines(gawkPath("intformat.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_apiterm() throws Exception { + AwkTestSupport + .cliTest("GAWK apiterm") + .argument("-f", gawkFile("apiterm.awk")) + .stdin(gawkText("apiterm.in")) + .expectLines(gawkPath("apiterm.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_fnmatch() throws Exception { + AwkTestSupport + .cliTest("GAWK fnmatch") + .argument("-f", gawkFile("fnmatch.awk")) + .expectLines(gawkPath("fnmatch.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_fork() throws Exception { + AwkTestSupport + .cliTest("GAWK fork") + .argument("-f", gawkFile("fork.awk")) + .expectLines(gawkPath("fork.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_fork2() throws Exception { + AwkTestSupport + .cliTest("GAWK fork2") + .argument("-f", gawkFile("fork2.awk")) + .expectLines(gawkPath("fork2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_functab4() throws Exception { + AwkTestSupport + .cliTest("GAWK functab4") + .argument("-f", gawkFile("functab4.awk")) + .expectLines(gawkPath("functab4.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_functab5() throws Exception { + AwkTestSupport + .cliTest("GAWK functab5") + .argument("-f", gawkFile("functab5.awk")) + .expectLines(gawkPath("functab5.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_ordchr() throws Exception { + AwkTestSupport + .cliTest("GAWK ordchr") + .argument("-f", gawkFile("ordchr.awk")) + .expectLines(gawkPath("ordchr.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_revout() throws Exception { + AwkTestSupport + .cliTest("GAWK revout") + .argument("-f", gawkFile("revout.awk")) + .expectLines(gawkPath("revout.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_revtwoway() throws Exception { + AwkTestSupport + .cliTest("GAWK revtwoway") + .argument("-f", gawkFile("revtwoway.awk")) + .expectLines(gawkPath("revtwoway.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_rwarray() throws Exception { + AwkTestSupport + .cliTest("GAWK rwarray") + .argument("-f", gawkFile("rwarray.awk")) + .stdin(gawkText("rwarray.in")) + .expectLines(gawkPath("rwarray.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_time() throws Exception { + AwkTestSupport + .cliTest("GAWK time") + .argument("-f", gawkFile("time.awk")) + .expectLines(gawkPath("time.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_mpfrbigint() throws Exception { + skip("gawk's -M bignum mode is not implemented by Jawk."); + } + + @Test + public void test_mpfrbigint2() throws Exception { + skip("gawk's -M bignum mode is not implemented by Jawk."); + } + + @Test + public void test_mpfrcase() throws Exception { + skip("gawk's -M bignum mode is not implemented by Jawk."); + } + + @Test + public void test_mpfrcase2() throws Exception { + skip("gawk's -M bignum mode is not implemented by Jawk."); + } + + @Test + public void test_mpfrfield() throws Exception { + skip("gawk's -M bignum mode is not implemented by Jawk."); + } + + @Test + public void test_mpfrnegzero() throws Exception { + skip("gawk's -M bignum mode is not implemented by Jawk."); + } + + @Test + public void test_mpfrnegzero2() throws Exception { + skip("gawk's -M bignum mode is not implemented by Jawk."); + } + + @Test + public void test_mpfrnonum() throws Exception { + skip("gawk's -M bignum mode is not implemented by Jawk."); + } + + @Test + public void test_mpfrnr() throws Exception { + skip("gawk's -M bignum mode is not implemented by Jawk."); + } + + @Test + public void test_mpfrrem() throws Exception { + skip("gawk's -M bignum mode is not implemented by Jawk."); + } + + @Test + public void test_mpfrrndeval() throws Exception { + skip("gawk's -M bignum mode is not implemented by Jawk."); + } + + @Test + public void test_mpfrstrtonum() throws Exception { + skip("gawk's -M bignum mode is not implemented by Jawk."); + } + + @Test + public void test_mpgforcenum() throws Exception { + skip("gawk's -M bignum mode is not implemented by Jawk."); + } + + @Test + public void test_pma() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_inetmesg() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_profile5() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_mpfrieee() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_mpfrexprange() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_mpfrrnd() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_mpfrsort() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_mpfruplus() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_mpfranswer42() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_mpfrmemok1() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_mpfrsqrt() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_ordchr2() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_readfile() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_readfile2() throws Exception { + AwkTestSupport + .cliTest("GAWK readfile2") + .argument("-f", gawkFile("readfile2.awk")) + .operand(gawkFile("readfile2.awk"), gawkFile("readdir.awk")) + .expectLines(gawkPath("readfile2.ok")) + .expectExit(0) + .runAndAssert(); + } + + @Test + public void test_inplace1() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_inplace2() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_inplace2bcomp() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_inplace3() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_inplace3bcomp() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_testext() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_getfile() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_readdir() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_readdir_test() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_readdir_retest() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_readall() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_fts() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_filefuncs() throws Exception { + skip(MANUAL_SKIP_REASON); + } + + @Test + public void test_indirectbuiltin2() throws Exception { + skip(MANUAL_SKIP_REASON); + } + +} diff --git a/src/site/markdown/compatibility.md b/src/site/markdown/compatibility.md index 4ddf29dc..191621a0 100644 --- a/src/site/markdown/compatibility.md +++ b/src/site/markdown/compatibility.md @@ -78,15 +78,17 @@ Jawk maintains compatibility tests derived from the BWK (One True AWK) and gawk Compatibility suites now live under `src/it/java`, with their vendored inputs under `src/it/resources`. The compatibility suites read those vendored files directly from the repository checkout instead of relying on the Maven test classpath layout. -The gawk coverage is also split in two parts, but both are now explicit Java integration suites built on `AwkTestSupport`. `GawkIT` mirrors the portable cases from gawk's vendored `Maketests` snapshot as checked-in Java tests, and `GawkManualIT` mirrors handwritten `Makefile.am` rules the same way. The vendored gawk files remain in the repository to make future refreshes and diffs straightforward, but the runtime source of truth is the Java test code. +The gawk coverage is split into a small set of explicit Java integration suites built on `AwkTestSupport`, following the broad test families declared in gawk's vendored `Makefile.am`. The vendored gawk files remain in the repository to make future refreshes and diffs straightforward, but the runtime source of truth is the Java test code. | Suite | Coverage | | --- | --- | | **BwkPIT** | Pattern matching and basic AWK operations from the BWK test collection | | **BwkTIT** | Text processing, field splitting, built-in functions, and output formatting | | **BwkMiscIT** | Miscellaneous BWK compatibility edge cases | -| **GawkIT** | Portable gawk compatibility mirrored from the vendored `Maketests` snapshot as explicit `AwkTestSupport` CLI tests, with unsupported shell, debugger, CSV, pretty-print, lint, traditional, and bignum modes skipped explicitly | -| **GawkManualIT** | Handwritten `Makefile.am` rules mirrored as explicit `AwkTestSupport` integration tests or explicit skipped placeholders | +| **GawkIT** | Core gawk compatibility mirrored from the vendored basic and Unix test groups | +| **GawkExtensionIT** | gawk extension-oriented compatibility mirrored from the vendored extension-style test groups | +| **GawkLocaleIT** | Locale- and charset-sensitive gawk compatibility mirrored from the vendored locale test groups | +| **GawkOptionalFeatureIT** | Optional-feature and environment-specific gawk compatibility mirrored from the vendored optional test groups | Not all gawk compatibility cases pass, primarily because Jawk uses Java regular expressions and `java.util.Formatter` rather than their C equivalents. Linux CI is the authoritative environment for the full compatibility pass rate. Windows can still run the explicit Java gawk suites without requiring Unix tooling. From 2a5491896ef9994ddbdc6f51c32114342193818c Mon Sep 17 00:00:00 2001 From: Bertrand Martin Date: Thu, 23 Apr 2026 20:01:48 +0200 Subject: [PATCH 14/15] Clarify formatter sequencing in agent guide --- AGENTS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index 885aa88d..dab053df 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -2,7 +2,7 @@ ## Code format -Your never need to worry about code formatting at all. Simply run `mvn formatter:format` before committing changes to make sure the new code follows this project's code formatting rules. +Your never need to worry about code formatting at all. Simply run `mvn formatter:format` before committing changes to make sure the new code follows this project's code formatting rules. Make sure not run `mvn formatter:format` sequentially, before any other Maven command, to avoid concurrency issues. All files must include the proper license header. When you add a new file, make sure to include the proper license header by running the `mvn license:update-file-header` command before committing (or even before trying the build and test, since the build will fail if a file doesn't include the proper license header). From 80b47096fc7dfe97b429aff8080dcb8377102c20 Mon Sep 17 00:00:00 2001 From: Bertrand Martin <32521698+bertysentry@users.noreply.github.com> Date: Thu, 23 Apr 2026 20:07:25 +0200 Subject: [PATCH 15/15] Update AGENTS.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- AGENTS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index dab053df..816a38cd 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -2,7 +2,7 @@ ## Code format -Your never need to worry about code formatting at all. Simply run `mvn formatter:format` before committing changes to make sure the new code follows this project's code formatting rules. Make sure not run `mvn formatter:format` sequentially, before any other Maven command, to avoid concurrency issues. +You never need to worry about code formatting at all. Simply run `mvn formatter:format` before committing changes to make sure the new code follows this project's code formatting rules. Make sure not to run `mvn formatter:format` separately before other Maven commands, to avoid concurrency issues. All files must include the proper license header. When you add a new file, make sure to include the proper license header by running the `mvn license:update-file-header` command before committing (or even before trying the build and test, since the build will fail if a file doesn't include the proper license header).