Merged
Conversation
Contributor
Author
|
I just want to make sure the supporting information is noticed on this PR. The added test currently asserts for the observed behavior. If this behavior isn't expected, let me know and I can open an issue for it. |
Contributor
Author
|
nothing like finding a bug in your own pr... sigh... |
Contributor
We all starts somewhere, besides I believe this is your first time contributing, so you attempting to make Skript better is a chad move 💪 |
NotSoDelayed
suggested changes
Jul 20, 2025
Contributor
Author
|
oops, didn't mean to request review yet I'll add the undefined var stuff |
Absolutionism
requested changes
Jul 20, 2025
Contributor
|
Also another thing, it's not required, but it's usually a safer bet to do spawn a cow at test-location:
set {_cow} to entityrather than spawn a cow at test-location
set {_cow} to last spawned entity |
Absolutionism
requested changes
Jul 20, 2025
Absolutionism
approved these changes
Jul 20, 2025
sovdeeth
requested changes
Jul 21, 2025
sovdeeth
approved these changes
Jul 28, 2025
NotSoDelayed
approved these changes
Jul 29, 2025
erenkarakal
pushed a commit
to erenkarakal/Skript
that referenced
this pull request
Nov 26, 2025
* add ExprAI tests * tab indent * improve entity selection * fix entity setting for multiple entities test * add missing edge case * end in new line * add everyones suggestions * entities to entity * revert back to entites * additional suggestions and requests * remove test for undefined behavior
erenkarakal
pushed a commit
to erenkarakal/Skript
that referenced
this pull request
Nov 26, 2025
* add ExprAI tests * tab indent * improve entity selection * fix entity setting for multiple entities test * add missing edge case * end in new line * add everyones suggestions * entities to entity * revert back to entites * additional suggestions and requests * remove test for undefined behavior
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
The Skript project has low test coverage for its existing syntax, which increases the risk of regressions. The core ExprAI syntax for getting and setting an entity's AI status had no automated tests.
Solution
This PR introduces a test suite for ExprAI. The new test script verifies the following aspects of the expression:
Getting and setting the AI for single entities.
Handling lists of multiple entities.
Syntax aliases and patterns.
Boolean aliases.
Edge cases like setting to an unset value and querying a dead entity.
Testing Completed
Added the ExprAI.sk syntax test. The full project test suite was run via .\gradlew clean build and passed successfully.
Supporting Information
An interesting edge case was found during testing: querying the AI of an entity after it is killed returns true, not . The added test currently asserts for this observed behavior. This is open for discussion on whether this is the desired final functionality.
Edit: You can also set the AI of an entity after it has died.
Completes: none
Related: #6158