uCBQN/test/precompiled.bqn
2022-06-04 01:54:19 +03:00

25 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: ./precompiled.bqn path/to/mlochbaum/BQN ""$PATH"" [expressions, else prim tests]"!2•args
path0•args
envP1•args
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"
# tests ← •FLines path∾"/test/cases/fill.bqn"
{tests𝕩}(×) 2•args
('#' · "#")@{
('%'){𝕤
•Out 𝕩
"../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
codeouterr•SH•file.At "../BQN"
•Out out
{𝕤•Out"exit code "(•Repr code) •Out err}(×code) err
}
}¨tests