move old helper utilities to test/
This commit is contained in:
parent
f8447d9b5f
commit
8900d27e27
@ -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/random.bqn // various random tests
|
||||
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
|
||||
```
|
||||
@ -3,7 +3,7 @@
|
||||
path←0⊑•args
|
||||
envP←1⊑•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/undo.bqn"
|
||||
# tests ← •FLines path∾"/test/cases/under.bqn"
|
||||
@ -13,12 +13,12 @@ tests ← •FLines path∾"/test/cases/prim.bqn"
|
||||
('#'≠ ·⊑ ∾⟜"#")◶@‿{
|
||||
(⊑'%'⊸∊)◶{𝕤
|
||||
•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"‿"f=-DPRECOMP -m32"‿"lf=-m32"‿"c"
|
||||
make ← "make"‿"f=-DPRECOMP"‿"c"
|
||||
(×⊑)◶@‿{𝕤⋄•Out "############ Failed to compile! ############" ⋄ •Out¨1↓𝕩}{env⇐<"PATH="∾envP}•SH make
|
||||
code‿out‿err←•SH⟨"./BQN"⟩
|
||||
code‿out‿err←•SH⟨•file.At "../BQN"⟩
|
||||
•Out out
|
||||
{𝕤⋄•Out"exit code "∾(•Repr code) ⋄ •Out err}⍟(×code) err
|
||||
}‿⊢
|
||||
@ -1,6 +1,6 @@
|
||||
#! /usr/bin/env dbqn
|
||||
"Usage: ./test.bqn path/to/mlochbaum/BQN [-qsmev] name | ./BQN"!2≤≠•args
|
||||
path←⊑•args
|
||||
path←•wdpath•file.At ⊑•args
|
||||
args←1↓•args
|
||||
opt←""
|
||||
{𝕊: opt↩𝕩 ⋄ args↓˜↩1}⍟('-'≡⊑) ⊑args
|
||||
@ -18,7 +18,7 @@ opt←""
|
||||
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𝕩}
|
||||
Out ← {•Out(⊑'%'⊸∊)◶(verify◶⊢‿{∾⟨"""incorrect!""‿1⊑˜1≡{" ⋄ RMC 𝕩 ⋄ " }"⟩})‿Q𝕩}
|
||||
|
||||
((⊑'m'∊opt)⊑Out‿{•Show𝕩⋄Out𝕩})¨tests
|
||||
# ('%'⊸∊∨ '#'= ·⊑ ∾⟜"#")◶•Out‿@¨tests
|
||||
Loading…
Reference in New Issue
Block a user