#! /usr/bin/env dbqn nc‿rt‿ref ← "-nocomp"‿"-rt"‿"-ref" ∊ •args files ← "simple"‿"syntax"‿"prim"⍟(0=≠) ('-'≠⊑)¨⊸/ •args "Can't test runtime without the compiler!" ! ¬nc∧rt∨ref Native ← •BQN exec ← ((rt⌈2×ref)¬nc)◶⟨ Native˙ # Native {𝕤⋄ ⟨DRun⟩←•Import "../dc.bqn" ⋄ DRun} # Compiled; native runtime {𝕤⋄ •Import "../bqn.bqn"} # Self-hosted {𝕤⋄ •Import "ref.bqn"} # Reference implementations ⟩ @ Cases ← (0<≠)◶0‿('#'≠⊑)¨⊸/ · •FLines "cases/"∾∾⟜".bqn" c ← ∾ Cases¨ files Trim ← ((∨`∧∨`⌾⌽)' '⊸≠)⊸/ M ← {e‿b: Msg ← {∾⟨ """",b,""": expected " "to fail"⍟("!"⊸≡)e " but " 0⊸≡◶⟨"received "∾2•Fmt⊑,"evaluation failed"⟩𝕩 ⥊@+10 ⟩} ("!"⊸≡◶⟨