aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2020-07-06 13:12:56 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2020-07-06 13:12:56 -0400
commitab3a1a403f41b8993f734ce37b3d81c6b66475e5 (patch)
tree0b8533c31977977a5a62ab3e70de3e94a6f3c52d
parent85e948b432aa26dea5b20ff9998aaef5b2ee7f69 (diff)
Formatting
-rwxr-xr-xtest/dt.js29
1 files changed, 17 insertions, 12 deletions
diff --git a/test/dt.js b/test/dt.js
index a5862ccf..86f10357 100755
--- a/test/dt.js
+++ b/test/dt.js
@@ -8,15 +8,20 @@ const t=load('cases.bqn').split('\n').filter(x=>x).map(x=>x.split(' % '))
, test=t.map(e=>'"'+e[1]+'"').join('\n')
, expt=t.map(e=>+e[0])
-var compiler = execFile(__dirname+'/../spec/dzref',[__dirname+'/../dc.bqn','{•←Compile𝕩}¨⟨'+test+'⟩'], function (error, stdout, stderr) {
- const rslt=stdout.split('\n').filter(a=>a.length)
- .map(a=>runWasm(a.split("‿").map(n=>+n)))
- , pass=rslt.map((r,i)=>r===expt[i])
- , fail=pass.map((p,i)=>p?-1:i).filter(i=>i>=0)
- console.log(
- fail.length
- ? fail.map(i=>'"'+t[i][1]+'": expected '+expt[i]+' but received '+rslt[i])
- : "All passed!"
- )
- process.exit(+(fail.length>0))
-});
+var compiler = execFile(
+ __dirname+'/../spec/dzref',
+ [ __dirname+'/../dc.bqn',
+ '{•←Compile𝕩}¨⟨'+test+'⟩' ],
+ function (error, stdout, stderr) {
+ const rslt=stdout.split('\n').filter(a=>a.length)
+ .map(a=>runWasm(a.split("‿").map(n=>+n)))
+ , pass=rslt.map((r,i)=>r===expt[i])
+ , fail=pass.map((p,i)=>p?-1:i).filter(i=>i>=0)
+ console.log(
+ fail.length
+ ? fail.map(i=>'"'+t[i][1]+'": expected '+expt[i]+' but received '+rslt[i])
+ : "All passed!"
+ )
+ process.exit(+(fail.length>0))
+ }
+);