aboutsummaryrefslogtreecommitdiff
path: root/test/dz_comp
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2020-12-14 20:32:45 -0500
committerMarshall Lochbaum <mwlochbaum@gmail.com>2020-12-14 20:32:45 -0500
commit6c250d890add5f0fc09b94925ae528292642d8cb (patch)
tree31f0e2f17f716522b2f01c296fd7f4008717e07e /test/dz_comp
parentd4702524bc6f8279a9fe6f6739183216c07913bf (diff)
Unify prim.bqn and other test formats by using expected result 1 if there's no %
Diffstat (limited to 'test/dz_comp')
-rwxr-xr-xtest/dz_comp5
1 files changed, 2 insertions, 3 deletions
diff --git a/test/dz_comp b/test/dz_comp
index bb6f40dd..4fee5da3 100755
--- a/test/dz_comp
+++ b/test/dz_comp
@@ -26,11 +26,10 @@ Native ← {⍎𝕩}
exec ← (rt¬nc)◶⟨Native˙, DRun˙, {𝕩⊸DRun}∘GetRT⟩ @
Cases ← (0<≠)◶0‿('#'≠⊑)¨⊸/ · •FLines "cases/"∾∾⟜".bqn"
-c ← ∾ Cases¨ "simple"‿"syntax"
-{𝕩: c ∾↩ "1 %"⊸∾¨ Cases "prim" }⍟⊢ prim
+c ← ∾ Cases¨ "simple"‿"syntax"∾prim/⟨"prim"⟩
M ← {e‿b:
Err ← {(@+10)∾˜""""∾b∾""": expected "∾e∾" but received "∾⍕𝕩}
(Native e) ≢◶""‿Err Exec b
}
-r ← '%' M∘((+`-2⊸×)∘=⊔⊢)¨ c
+r ← (M '%'⊸= (∨´⊣)◶⟨"1"≍○<⊢,(+`-2⊸×)⊸⊔⟩ ⊢)¨ c
•Out ("All "∾(⍕≠c)∾" passed!")⍟(0=≠) ∾r