aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2020-07-12 19:40:08 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2020-07-12 19:40:08 -0400
commiteca947a293bcd76faf8d1323ce7ee5f6bf86e76d (patch)
treee9db41b2abc56a63534c9cbc93b6ded76065f781 /test
parent9c2945c10cd78d0444871c44aafa73ae7abb9c05 (diff)
Allow running reference tests with -ref in test/bt
Diffstat (limited to 'test')
-rwxr-xr-xtest/bt4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/bt b/test/bt
index 187c2bf8..7dc27055 100755
--- a/test/bt
+++ b/test/bt
@@ -1,7 +1,9 @@
#! /usr/bin/env dbqn
dRun ← ⟨"dRun"⟩ •EX •path∾"../dcshim.bqn"
-c ← (¬"{"⊑∘∊⊢)¨⊸/ ∾(•LNS •path∾∾⟜"cases.bqn")¨""‿"b"
+l ← ∾(•LNS •path∾∾⟜"cases.bqn")¨""‿"b"
+{ l ∾↩ "1 %"⊸∾¨ (3≤≠)◶0‿(('#'≠2⊸⊑)∧" "≡2⊸↑)¨⊸/ •LNS •path∾"testref.bqn" }⍟⊢(<"-ref")∊•args
+c ← (¬"{"⊑∘∊⊢)¨⊸/ l
M ← {e‿b: (⍎e)⊸≢◶""‿{(•UCS 10)∾˜""""∾b∾""": expected "∾e∾" but received "∾⍕𝕩} DRun b}
r ← '%' M∘((+`-2⊸×)∘=⊔⊢)¨ c
• ← "All passed!"⍟(0=≠) ∾r