move old helper utilities to test/

This commit is contained in:
dzaima 2022-06-04 01:54:19 +03:00
parent f8447d9b5f
commit 8900d27e27
3 changed files with 9 additions and 5 deletions

View File

@ -13,4 +13,8 @@ test/moreCfgs.sh path/to/mlochbaum/BQN // run "2+2" in a bunch of configurations
./BQN test/squeeze.bqn // fuzz-test squeezing; requires a CBQN build with -DEEQUAL_NEGZERO ./BQN test/squeeze.bqn // fuzz-test squeezing; requires a CBQN build with -DEEQUAL_NEGZERO
./BQN test/random.bqn // various random tests ./BQN test/random.bqn // various random tests
make -C test/ffi // test FFI functionality make -C test/ffi // test FFI functionality
legacy utilities:
test/readTests.bqn // read mlochbaum/BQN tests in various formats
test/precompiled.bqn // run a precompiled expression
``` ```

View File

@ -3,7 +3,7 @@
path0•args path0•args
envP1•args envP1•args
tests •FLines path"/test/cases/prim.bqn" tests •FLines •wdpath•file.At path"/test/cases/prim.bqn"
# tests ← •FLines path∾"/test/cases/identity.bqn" # tests ← •FLines path∾"/test/cases/identity.bqn"
# tests ← •FLines path∾"/test/cases/undo.bqn" # tests ← •FLines path∾"/test/cases/undo.bqn"
# tests ← •FLines path∾"/test/cases/under.bqn" # tests ← •FLines path∾"/test/cases/under.bqn"
@ -13,12 +13,12 @@ tests ← •FLines path∾"/test/cases/prim.bqn"
('#' · "#")@{ ('#' · "#")@{
('%'){𝕤 ('%'){𝕤
•Out 𝕩 •Out 𝕩
"src/gen/interp" •FChars 1,path,𝕩 •Import "cc.bqn" "../src/gen/interp" •FChars 1,path,𝕩 •Import "../cc.bqn"
# make ← "make"‿"singeli=1"‿"f=-DPRECOMP -march=native"‿"c" # make ← "make"‿"singeli=1"‿"f=-DPRECOMP -march=native"‿"c"
# make ← "make"‿"f=-DPRECOMP -m32"‿"lf=-m32"‿"c" # make ← "make"‿"f=-DPRECOMP -m32"‿"lf=-m32"‿"c"
make "make""f=-DPRECOMP""c" make "make""f=-DPRECOMP""c"
(×)@{𝕤•Out "############ Failed to compile! ############" •Out¨1𝕩}{env<"PATH="envP}•SH make (×)@{𝕤•Out "############ Failed to compile! ############" •Out¨1𝕩}{env<"PATH="envP}•SH make
codeouterr•SH"./BQN" codeouterr•SH•file.At "../BQN"
•Out out •Out out
{𝕤•Out"exit code "(•Repr code) •Out err}(×code) err {𝕤•Out"exit code "(•Repr code) •Out err}(×code) err
} }

View File

@ -1,6 +1,6 @@
#! /usr/bin/env dbqn #! /usr/bin/env dbqn
"Usage: ./test.bqn path/to/mlochbaum/BQN [-qsmev] name | ./BQN"!2•args "Usage: ./test.bqn path/to/mlochbaum/BQN [-qsmev] name | ./BQN"!2•args
path•args path•wdpath•file.At •args
args1•args args1•args
opt"" opt""
{𝕊: opt𝕩 args˜1}('-') args {𝕊: opt𝕩 args˜1}('-') args
@ -18,7 +18,7 @@ opt←""
i𝕩'%' i𝕩'%'
((1+'!'𝕩)×verify)(1+i) { """should've errored!""∘•BQN⎊1 """ {𝕩/˜1+𝕩='"'}𝕩˜1+𝕩'%' """"} {"""incorrect!""‿1⊑˜(" i𝕩 ") ≡ {" (1+i)𝕩 " }"} RMC 𝕩 ((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𝕩} Out {•Out('%')(verify{"""incorrect!""‿1⊑˜1≡{" RMC 𝕩 " }"})Q𝕩}
(('m'opt)Out{•Show𝕩Out𝕩})¨tests (('m'opt)Out{•Show𝕩Out𝕩})¨tests
# ('%'⊸∊∨ '#'= ·⊑ ∾⟜"#")◶•Out‿@¨tests # ('%'⊸∊∨ '#'= ·⊑ ∾⟜"#")◶•Out‿@¨tests