Skip to content

Commit 3e49a44

Browse files
Ensure other test commands run
1 parent a275c4c commit 3e49a44

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

src/test/skript/tests/bukkit/command/StructCommand.sk

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,18 +49,13 @@ command /test-args-plural <x: numbers>:
4949

5050
command {@command} <text> [<text>] [<itemtype = %dirt named "steve"%>]:
5151
trigger:
52-
set {_arg1} to arg-1
53-
assert {_arg1} is "taco" with "arg-1 test failed (got '%{_arg1}%')"
54-
set {_arg2} to arg-2
55-
assert {_arg2} is not set with "arg-2 test failed (got '%{_arg2}%')"
56-
set {_arg3} to arg-3
57-
assert {_arg3} is dirt named "steve" with "arg-3 test failed (got '%{_arg3}%')"
52+
set {-test-{@command}::arg1} to arg-1
53+
set {-test-{@command}::arg2} to arg-2
54+
set {-test-{@command}::arg3} to arg-3
5855

5956
command //somecommand [<text>]:
6057
trigger:
61-
set {_arg1} to arg-1
62-
if {_arg1} is set:
63-
assert {_arg1} is "burrito is tasty" with "arg-1 is 'burrito is tasty' test failed (got '%{_arg1}%')"
58+
set {-test-somecommand::arg1} to arg-1
6459

6560
# see https://github.com/SkriptLang/Skript/pull/6286
6661
command /commandtest <string="player">:
@@ -86,5 +81,10 @@ test "StructCommand":
8681
execute command "test-args-plural 10 and 2"
8782
assert {-test-args-plural::*} is 10 and 2 with "plural input to plural args did not work"
8883

89-
execute command "skriptcommand taco"
84+
execute command "{@command} taco"
85+
assert {-test-{@command}::arg1} is "taco" with "arg-1 test failed"
86+
assert {-test-{@command}::arg2} is not set with "arg-2 test failed"
87+
assert {-test-{@command}::arg3} is dirt named "steve" with "arg-3 test failed"
88+
9089
execute command "//somecommand burrito is tasty"
90+
assert {-test-somecommand::arg1} is "burrito is tasty" with "arg-1 is 'burrito is tasty' test failed"

0 commit comments

Comments
 (0)