-
-
Notifications
You must be signed in to change notification settings - Fork 400
add expr length tests #8052
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
base: dev/feature
Are you sure you want to change the base?
add expr length tests #8052
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentation needs to be in tabs, not spaces.
Maybe some tests using substring and joining.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Always nice to have more tests!
I think substring and joining should be tested elsewhere. ie: In |
Problem
The Skript project currently has very low test coverage for its existing syntax, making it difficult to ensure changes don't introduce regressions. Specifically, the core length of expression was untested.
Solution
This PR adds a new syntax test file,
ExprLength.sk
, to provide unit test coverage for the length of expressions.The tests cover behavior for:
String literals and variables.
Edge cases like empty strings, whitespace, and Unicode characters.
Automatic type conversion from numbers.
The list-looping behavior when applied to a list of strings.
String interpolation.
Testing Completed
Added the
ExprLength.sk
test. The full test suite was run via .\gradlew skriptTest and passed successfully.Supporting Information
None
Completes: none
Related: #6158