From b2259d77c119c12f357b3dd8119f4a1c0cfa359e Mon Sep 17 00:00:00 2001 From: dzaima Date: Sun, 11 May 2025 20:27:36 +0300 Subject: [PATCH] some tests for bad squeeze attempts --- test/cases/prims.bqn | 1 + test/cases/system.bqn | 2 ++ 2 files changed, 3 insertions(+) diff --git a/test/cases/prims.bqn b/test/cases/prims.bqn index 1676e651..2cbb39bd 100644 --- a/test/cases/prims.bqn +++ b/test/cases/prims.bqn @@ -130,6 +130,7 @@ w←1‿1⥊1 ⋄ x←2⥊1 ⋄ w‿x <¨↩ ⋄ {! (∾⟨"𝕨",•Repr𝕩, !"Integer out of range: 1e20" % %USE evar ⋄ /_evar 1e20⌾(100⊸⊑) 200⥊10 ! (//⁼)⊸≡8‿15‿25‿32‿90‿101‿155‿165‿584‿594‿894‿912‿1312‿1328‿1350‿1367‿1391‿1407‿1469‿1486‿1559‿1566‿1576‿1582‿1592‿1599‿1609‿1616‿1626‿1635‿4086‿4093‿4114‿4122‿4141‿4149‿4169‿4177 /⁼1e4⥊1‿2 %% 0‿5000‿5000 +!"Expected integer, got character" % /⁼ "hello" !"/⁼𝕩: 𝕩 cannot contain negative numbers" % %USE evar ⋄ /⁼_evar (↕10) ∾ ¯2 ∾ 20+↕10 !"/⁼𝕩: 𝕩 must consist of natural numbers" % %USE evar ⋄ /⁼_evar (↕10) ∾ 2.2 ∾ 20+↕10 !"/⁼𝕩: 𝕩 must consist of natural numbers" % %USE evar ⋄ /⁼_evar (↕10) ∾ 1e20 ∾ 20+↕10 diff --git a/test/cases/system.bqn b/test/cases/system.bqn index 77321e73..677b0890 100644 --- a/test/cases/system.bqn +++ b/test/cases/system.bqn @@ -15,6 +15,7 @@ !"•BQN: Path must be a string" % ⟨1‿2⟩ •BQN "2+2" !"•BQN: Filename must be a string" % ⟨•path, 1‿2⟩ •BQN "2+2" ⟨•path, "abc/def"⟩ •BQN "•name" %% "abc/def" +!"•BQN: 𝕩 must be a string" % •BQN ↕3 !"No path present for •path" % •BQN"•path" !"No arguments present for •args" % •BQN"•args" !"No name present for •name" % •BQN"•name" @@ -210,6 +211,7 @@ v←1 ⋄ ! •BQN∘•Repr⊸≡ ⟨+,1‿2,+¨,(+V)(V+V),2‿2⥊↕4⟩ •Repr∘•ParseFloat¨ ⟨"1.2351641146031163604e-323", "1.2351641146031163605e-323"⟩ %% ⟨"1e¯323","1e¯323"⟩ !"•ParseFloat 𝕩: Input was empty" % •ParseFloat "" !"•ParseFloat 𝕩: Input was empty" % •ParseFloat ↕0 +!"•ParseFloat 𝕩: Expected a character list argument" % •ParseFloat ↕3 !"•ParseFloat 𝕩: Input must have rank 1" % •ParseFloat <@ !"•ParseFloat 𝕩: Input must have rank 1" % •ParseFloat 1‿1⥊'1' !"•ParseFloat 𝕩: Expected a character list argument" % •ParseFloat 48‿49