Skip to content
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

Fixes missing and/or warnings #7125

Merged
merged 2 commits into from
Oct 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions src/test/skript/tests/syntaxes/expressions/ExprJoinSplit.sk
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
test "join strings":
assert join "a", "b", "c" is "abc" with "join strings without delimiter failed"
assert join "a", "b", "c" with " " is "a b c" with "join strings with delimiter failed"
assert join "a", "b" and "c" is "abc" with "join strings without delimiter failed"
assert join "a", "b" and "c" with " " is "a b c" with "join strings with delimiter failed"

test "split strings on string":
assert split "abc" at "[a-z]" is "abc" with "split with regex chars failed"

assert split "a b c" at " " is "a", "b", "c" with "split failed"
assert split "a b c" at " " with case sensitivity is "a", "b", "c" with "split with case sensitivity failed"
assert split "a b c" at " " without trailing string is "a", "b", "c" with "split without trailing string failed"
assert split "a b c" at " " is "a", "b" and "c" with "split failed"
assert split "a b c" at " " with case sensitivity is "a", "b" and "c" with "split with case sensitivity failed"
assert split "a b c" at " " without trailing string is "a", "b" and "c" with "split without trailing string failed"

assert split "abc" at "" is "a", "b", "c", "" with "split with empty delimiter failed"
assert split "abc" at "" with case sensitivity is "a", "b", "c", "" with "split with empty delimiter with case sensitivity failed"
assert split "abc" at "" without trailing string is "a", "b", "c" with "split with empty delimiter without trailing string failed"
assert split "abc" at "" with case sensitivity without trailing string is "a", "b", "c" with "split with empty delimiter with case sensitivity without trailing string failed"
assert split "abc" at "" is "a", "b", "c" and "" with "split with empty delimiter failed"
assert split "abc" at "" with case sensitivity is "a", "b", "c" and "" with "split with empty delimiter with case sensitivity failed"
assert split "abc" at "" without trailing string is "a", "b" and "c" with "split with empty delimiter without trailing string failed"
assert split "abc" at "" with case sensitivity without trailing string is "a", "b" and "c" with "split with empty delimiter with case sensitivity without trailing string failed"

assert split "-x-X" at "x" is "-", "-", "" with "split with delimiter at end failed"
assert split "-x-X" at "x" with case sensitivity is "-", "-X" with "split with delimiter at end with case sensitivity failed"
assert split "-x-X" at "x" without trailing string is "-", "-" with "split with delimiter at end without trailing string failed"
assert split "-x-X" at "x" with case sensitivity without trailing string is "-", "-X" with "split with delimiter at end with case sensitivity without trailing string failed"
assert split "-x-X" at "x" is "-", "-" and "" with "split with delimiter at end failed"
assert split "-x-X" at "x" with case sensitivity is "-" and "-X" with "split with delimiter at end with case sensitivity failed"
assert split "-x-X" at "x" without trailing string is "-" and "-" with "split with delimiter at end without trailing string failed"
assert split "-x-X" at "x" with case sensitivity without trailing string is "-" and "-X" with "split with delimiter at end with case sensitivity without trailing string failed"

test "split strings on regex":
assert regex split "a b c" at " " is "a", "b", "c" with "regex split failed"
assert regex split "a b_c" at "( |_)" is "a", "b", "c" with "regex split with regex failed"
assert regex split "a b c" at " " is "a", "b" and "c" with "regex split failed"
assert regex split "a b_c" at "( |_)" is "a", "b" and "c" with "regex split with regex failed"

assert regex split "-a-b-c" at "[a-z]" is "-", "-", "-", "" with "regex split with delimiter at end failed"
assert regex split "-a-b-c" at "[a-z]" without trailing string is "-", "-", "-" with "regex split with delimiter at end without trailing string failed"
assert regex split "-a-b-c" at "[a-z]" is "-", "-", "-" and "" with "regex split with delimiter at end failed"
assert regex split "-a-b-c" at "[a-z]" without trailing string is "-", "-" and "-" with "regex split with delimiter at end without trailing string failed"
6 changes: 3 additions & 3 deletions src/test/skript/tests/syntaxes/sections/SecFilter.sk
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ test "filter":
mod(input, 2) = 0

assert size of {_a::*} is 11 with "failed to filter on mod()"
assert {_a::*} is -10, -8, -6, -4 ,-2, 0, 2, 4, 6, 8, 10 with "failed to filter on mod()"
assert {_a::*} is -10, -8, -6, -4 ,-2, 0, 2, 4, 6, 8 and 10 with "failed to filter on mod()"


set {_a::*} to integers between -10 and 10
Expand All @@ -20,7 +20,7 @@ test "filter":
input > 0

assert size of {_a::*} is 5 with "failed to filter on mod(), >0, is number"
assert {_a::*} is 2, 4, 6, 8, 10 with "failed to filter on mod(), >0, is number"
assert {_a::*} is 2, 4, 6, 8 and 10 with "failed to filter on mod(), >0, is number"


set {_a::*} to integers between -10 and 10
Expand All @@ -32,4 +32,4 @@ test "filter":
input > 0

assert size of {_a::*} is 16 with "failed to filter on any of mod(), >0"
assert {_a::*} is -10, -8, -6, -4, -2, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 with "failed to filter on any of mod(), >0"
assert {_a::*} is -10, -8, -6, -4, -2, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 and 10 with "failed to filter on any of mod(), >0"