aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtest/dz_wasm.js8
-rwxr-xr-x[-rw-r--r--]wc.bqn2
2 files changed, 5 insertions, 5 deletions
diff --git a/test/dz_wasm.js b/test/dz_wasm.js
index 326cb16c..b1afa586 100755
--- a/test/dz_wasm.js
+++ b/test/dz_wasm.js
@@ -6,16 +6,16 @@ const execFile = require('child_process').execFile
.exports.fn()
const t=load('cases/simple.bqn').split('\n').filter(x=>x).map(x=>x.split(' % '))
- , test=t.map(e=>'"'+e[1]+'"').join('\n')
+ , test=t.map(e=> e[1])
, expt=t.map(e=>+e[0])
var compiler = execFile(
__dirname+'/../wc.bqn',
- [ '{•←WCompile𝕩}¨⟨'+test+'⟩' ],
+ 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])
+ .map(a=>runWasm(a.split(" ").map(n=>+n)))
+ , pass=expt.map((e,i)=>e===rslt[i])
, fail=pass.map((p,i)=>p?-1:i).filter(i=>i>=0)
console.log(
fail.length
diff --git a/wc.bqn b/wc.bqn
index 00d6da13..ab4d6af6 100644..100755
--- a/wc.bqn
+++ b/wc.bqn
@@ -86,4 +86,4 @@ WCompile←{
Gen ⟨(≠¨f)/(1‿2‿0≍¨1)⥊¨¨f64 ⋄ 2 ⋄ ∾f⟩
}
-•Eval ⊑•args
+•Out ∾((@+10)«·∾(" "∾⍕)¨)∘WCompile¨ •args