From a35c979bbf10c95e71e062d76e56023815bc01e7 Mon Sep 17 00:00:00 2001 From: Kai Schmidt Date: Thu, 28 Nov 2024 14:03:52 -0800 Subject: [PATCH] git include special tests --- .gitignore | 2 +- tests_special/error.ua | 101 +++++++++++++++++++++++++++++++++++++++++ tests_special/uasm.ua | 8 ++++ 3 files changed, 110 insertions(+), 1 deletion(-) create mode 100644 tests_special/error.ua create mode 100644 tests_special/uasm.ua diff --git a/.gitignore b/.gitignore index 0f12dc845..8fdb3c581 100644 --- a/.gitignore +++ b/.gitignore @@ -19,7 +19,7 @@ site/dist *.dll profile.yaml uiua.tmLanguage.json -!/tests/* +!/tests_*/* !/examples/* !/site/*.ua diff --git a/tests_special/error.ua b/tests_special/error.ua new file mode 100644 index 000000000..9a763e7ce --- /dev/null +++ b/tests_special/error.ua @@ -0,0 +1,101 @@ +⊟ [1 2 3] 4_5 + +≡⊟ [1 2 3] [4 5] + +≡⊟ [1 2 3] [] +≡(⊂⊂) [1 2 3] [4 5 6] [] + +∵⊟ [1 2 3] [4 5] + +⊡ ↯0_2e [1] + +Ex ~ "example" +Ex~RangeDiff + +F! ← F!^0 +F!+ + +regex "([a-z]" "hello world" + +"Hello"_"Worrld" + +⍜⊏() ⊚. [ + [0 0 1 0 0] + [0 0 0 0 1] + [1 0 0 0 0] + [0 0 0 1 0] + [0 1 0 0 0]] + +F ← [⋅⋅◌⍢(-1:0|>0)]1 +F"oops" + +F ← [⋅◌ ⍥0] 1 +F "oops" + +F ← ⌊×10[◌◌⍥gen]⧻:0 + +⊕⊢ [0 2 2] [1 2 3] + ++ ¤[1 2 3] [10_20_30_40 50_60_70_80] + +⇡⇡50 + +x ← &sc +F! ←^ °⋕x◌ +F!5 + +⇡1e20 + +⬚0≡(++) [1] [2 3 4] [5 6] + +5 +⊸∘◌ + +F ← |39 ⍥+ + +⍜⊏(?≡⊂:9?) [0 2] [1_2 3_4 5_6 7_8] + +┌─╴M + F ↚ +1 +└─╴ +M!F 5 + +d ← gen [] ⚂ +D! ←^ $"_" d ◌ +◌D!4 + +! ← ^0 +!(^0) + +F ← |0 spawnF +F + +┌─╴Foo + |Bar {a} + |Baz {a} +└─╴ +⍤⤙≍ 5 Foo~Baz~a Foo~Bar 5 + +°(⊂0?) + +⟜(@a @b) + +⊂?⟜(°△⍜⊢¬+1)⇡13 + +⊂:?⟜(°△⍜⊢¬+1)⇡13 + +# Experimental! +quote(⊂⊂:⊂⊂,⊸:-7’+1⊡5."quote(⊂⊂:⊂⊂,⊸:-7’+1⊡5.") + +°binary 0_1_10 + +comptime(⍤@@@@) + +F! ← ^2 + +⬚0⌝⊏ ¯2 5 +⬚0⌝⊡ ¯2 5 + +°¤ 1 + +°[∘] 1 diff --git a/tests_special/uasm.ua b/tests_special/uasm.ua new file mode 100644 index 000000000..8bf0f331a --- /dev/null +++ b/tests_special/uasm.ua @@ -0,0 +1,8 @@ +{[] "" {} ×i[]} +⍤⤙≍ ⇡4 ≡◇type # No inline! + +{[5] "H" {1_2_3} [i]} +{[] "" {} ×i[]} +⍤⤙≍ ⊙(⍚↘1) # No inline! + +⍤⤙≍ ↘1"S " @ # No inline!