add a way to define whole-file tests with test/run.bqn

This commit is contained in:
dzaima 2025-06-01 05:35:48 +03:00
parent 7d55317ec4
commit 5d7caab374

View File

@ -78,6 +78,12 @@ searchRefine ← {
exitCode 0
Run { 𝕊 testname:
lns •FLines fullfile "cases"•file.At filename ".bqn" ˜(-) testname
{
1lns?
"### WHOLE-FILE-TEST" lns?
lns "("(1lns)")"
;@
}
defkdefv "IS_HEAPVERIFY""heapverify←"•Repr o.heapverify
i 0
Pos {filename, ":", •Repr 1+𝕩}
@ -89,7 +95,7 @@ Run ← { 𝕊 testname:
;
"":@
;
'#'𝕩? @
'#'𝕩? ¬(@+10)𝕩? @
;
"("𝕩?
Process (@+10)¨ ¯1 <Next•_while_{")"¯1𝕩} Next@