Skip to content
Open
Changes from 3 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
19 changes: 19 additions & 0 deletions src/test/skript/tests/syntaxes/expressions/ExprActiveItem.sk
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
test "Active Item Expression":
spawn a cow at test-location:
set {_cow} to entity
assert active item of {_cow} is not set with "A cow that is not using an item should have no active item"
clear entity within {_cow}

test "Active Item Plurality":
spawn 2 cows at test-location:
add entity to {_cows::*}
assert active item of {_cows::*} is not set with "A list of idle entities should return no active items"
clear entities within {_cows::*}

test "Active Item Aliases":
spawn a cow at test-location:
set {_cow} to entity
assert raised tool of {_cow} is not set with "'raised tool' alias should work"
assert active weapon of {_cow} is not set with "'active weapon' alias should work"
assert {_cow}'s active item is not set with "Possessive syntax should work"
clear entity within {_cow}