uCBQN/test.bqn
2021-05-10 02:44:26 +03:00

26 lines
1.1 KiB
BQN
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#! /usr/bin/env dbqn
"Usage: ./test.bqn path/to/mlochbaum/BQN [-qsmev] name | ./BQN"!2•args
path•args
args1•args
opt""
{𝕊: opt𝕩 args˜1}('-') args
"Missing argument!"!1=args
caseargs
case".bqn"
tests •FLines path"/test/cases/"case
tests/˜ (('#')0<)¨tests
{𝕊: tests/˜'!'¨tests} 's'opt
{𝕊: tests/˜'!'=¨tests} 'e'opt
verify 'v'opt
RMC '#' # doesn't work for token.bqn but whatever
Q {
i𝕩'%'
((1+'!'𝕩)×verify)(1+i) { """should've errored!""∘•BQN⎊1 """ {𝕩/˜1+𝕩='"'}𝕩˜1+𝕩'%' """"} {"""incorrect!""‿1⊑˜(" i𝕩 ") ≡ {" (1+i)𝕩 " }"} RMC 𝕩
}
Out {•Out'%'(verify{"""incorrect!""‿1⊑˜1≡{" RMC 𝕩 " }"})Q𝕩}
(('m'opt)Out{•Show𝕩Out𝕩})¨tests
# ('%'⊸∊∨ '#'= ·⊑ ∾⟜"#")◶•Out‿@¨tests
•Out(¬'q'opt) """finished"""
•Out(¬'q'opt) ""