From 5d7caab374b1b89c192536ef62c8f441cce03950 Mon Sep 17 00:00:00 2001 From: dzaima Date: Sun, 1 Jun 2025 05:35:48 +0300 Subject: [PATCH] add a way to define whole-file tests with test/run.bqn --- test/run.bqn | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/run.bqn b/test/run.bqn index b84181ad..814f58b5 100644 --- a/test/run.bqn +++ b/test/run.bqn @@ -78,6 +78,12 @@ searchRefine ← { exitCode ← 0 Run ← { 𝕊 testname: lns ← •FLines fullfile ← "cases"•file.At filename ← ".bqn" ∾˜⍟(⊣≢-∘≠⊸↑) testname + { + 1≤≠lns? + "### WHOLE-FILE-TEST" ≡ ⊑lns? + lns ↩ ⟨"("⟩∾(1↓lns)∾⟨")"⟩ + ;@ + } defk‿defv ← ⟨"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@⟩