aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2020-07-06 13:32:18 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2020-07-06 13:43:12 -0400
commit5cd9e7b5e7a4f4b55814590abdf56254fb84b54e (patch)
tree09a691f65937dc517ee9c88fdc46ae078abc1e61
parentab3a1a403f41b8993f734ce37b3d81c6b66475e5 (diff)
Add dcshim to call compiler from any current directory
-rwxr-xr-xdc.bqn2
-rwxr-xr-xdcshim.bqn3
-rwxr-xr-xtest/dt.js5
3 files changed, 6 insertions, 4 deletions
diff --git a/dc.bqn b/dc.bqn
index f219b5b1..70f51ff1 100755
--- a/dc.bqn
+++ b/dc.bqn
@@ -1,4 +1,4 @@
-⍝ Run with spec/dzref
+#! ./spec/dzref
nl‿tab←•UCS 10‿9
charSet←∾charGroups←⟨
diff --git a/dcshim.bqn b/dcshim.bqn
new file mode 100755
index 00000000..1762c342
--- /dev/null
+++ b/dcshim.bqn
@@ -0,0 +1,3 @@
+#! /usr/bin/env dbqn
+
+((<•path∾"dc.bqn")∾•args) •EX •path∾"spec/dzref"
diff --git a/test/dt.js b/test/dt.js
index 86f10357..49636a66 100755
--- a/test/dt.js
+++ b/test/dt.js
@@ -9,9 +9,8 @@ const t=load('cases.bqn').split('\n').filter(x=>x).map(x=>x.split(' % '))
, expt=t.map(e=>+e[0])
var compiler = execFile(
- __dirname+'/../spec/dzref',
- [ __dirname+'/../dc.bqn',
- '{•←Compile𝕩}¨⟨'+test+'⟩' ],
+ __dirname+'/../dcshim.bqn',
+ [ '{•←Compile𝕩}¨⟨'+test+'⟩' ],
function (error, stdout, stderr) {
const rslt=stdout.split('\n').filter(a=>a.length)
.map(a=>runWasm(a.split("‿").map(n=>+n)))