diff options
| author | s-ol <s+removethis@s-ol.nu> | 2025-03-18 11:47:22 +0000 |
|---|---|---|
| committer | s-ol <s+removethis@s-ol.nu> | 2025-03-18 12:06:18 +0000 |
| commit | b6cbc69461dc054019f50f8971704f6ef9de63ab (patch) | |
| tree | d2b8942b780f668ccbe57b52dd8d65f61613e935 /spec/lib/builtins/cond_spec.moon | |
| parent | builtins: switch takes single array as value (diff) | |
| download | alive-wip.tar.gz alive-wip.zip | |
language: [array] and {struct} literalswip
Diffstat (limited to 'spec/lib/builtins/cond_spec.moon')
| -rw-r--r-- | spec/lib/builtins/cond_spec.moon | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/lib/builtins/cond_spec.moon b/spec/lib/builtins/cond_spec.moon index 04c56ef..b075f8b 100644 --- a/spec/lib/builtins/cond_spec.moon +++ b/spec/lib/builtins/cond_spec.moon @@ -5,7 +5,7 @@ describe "if", -> COPILOT = TestPilot! it "checks truthiness", -> - for truthy in *{'true', '1', '-1', '1234', '(array 1 2 3)', '"test"', '""'} + for truthy in *{'true', '1', '-1', '1234', '[1 2 3]', '"test"', '""'} with COPILOT\eval_once "(if #{truthy} 'yes' 'no')" assert.is.true \is_const! assert.is.equal 'yes', .result! @@ -41,7 +41,7 @@ describe "if", -> it "forwards any result", -> with COPILOT\eval_once ' (import* time) - (if true (every 1 (array 1 2 3)))' + (if true (every 1 [1 2 3]))' assert.is.false \is_const! assert.is.equal '<num[3]! nil>', tostring .result @@ -49,7 +49,7 @@ describe "when", -> COPILOT = TestPilot! it "checks truthiness", -> - for truthy in *{'true', '1', '-1', '1234', '(array 1 2 3)', '"test"', '""'} + for truthy in *{'true', '1', '-1', '1234', '[1 2 3]', '"test"', '""'} with COPILOT\eval_once "(when #{truthy} 'yes')" assert.is.true \is_const! assert.is.equal 'yes', .result! @@ -81,12 +81,12 @@ describe "when", -> with COPILOT\eval_once ' (import* time) (when true - (every 1 (array 1 2 3)) + (every 1 [1 2 3]) 1 2 3)' assert.is.false \is_const! assert.is.equal '<num~ 3>', tostring .result - with COPILOT\eval_once '(when true (array 1 2 3))' + with COPILOT\eval_once '(when true [1 2 3])' assert.is.true \is_const! assert.is.equal '<num[3]= [1 2 3]>', tostring .result |
