-
-
Notifications
You must be signed in to change notification settings - Fork 399
Allow Literals in 'Size of' #7961
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
APickledWalrus
merged 13 commits into
SkriptLang:dev/patch
from
erenkarakal:patch/allow-literals-in-expramount
Jul 1, 2025
Merged
Changes from 6 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
4292d1e
allow literals in ExprAmount
erenkarakal a9be31d
update ExprAmount
erenkarakal e6d8a3d
Merge branch 'dev/patch' into patch/allow-literals-in-expramount
erenkarakal 53ef340
fix indentation
erenkarakal 54a8ee6
Merge remote-tracking branch 'origin/patch/allow-literals-in-expramou…
erenkarakal a8b9f0d
fix indentation
erenkarakal bb285b0
requested changes
erenkarakal 4490146
whoops
erenkarakal cb39b4f
add debug
erenkarakal bf2b933
add debug
erenkarakal 33c1275
indentation
erenkarakal 07b361c
update test
erenkarakal 5906ed0
Merge branch 'dev/patch' into patch/allow-literals-in-expramount
erenkarakal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,22 @@ | ||
test "amount of objects": | ||
set {_objects::*} to (1 and 2) | ||
set {_amount} to amount of {_objects::*} | ||
assert {_amount} is 2 with "was wrong" | ||
assert {_amount} is 2 with "size of list was wrong - 1" | ||
|
||
set {_objects::*} to ("hello", "there" and 1) | ||
set {_amount} to amount of {_objects::*} | ||
assert {_amount} is 3 with "was wrong" | ||
assert {_amount} is 3 with "size of list was wrong - 2" | ||
|
||
assert size of (1, 2 and 3) is 3 with "size of literal list was wrong" | ||
|
||
test "amount of items": | ||
assert amount of (3 of stone) is 3 with "was wrong" | ||
set {_item} to 3 of stone | ||
assert amount of {_item} is 3 with "was wrong" | ||
|
||
test "recursive size": | ||
set {_a} to 1 | ||
set {_a::*} to 1, 2 and 3 | ||
set {_a::1::*} to 1 and 2 | ||
set {_a::1::1::1::1::1} to 5 | ||
assert recursive size of {_a::*} is 6 with "recursive size was wrong" |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.