@@ -49,18 +49,13 @@ command /test-args-plural <x: numbers>:
4949
5050command {@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
5956command //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
6661command /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