-
-
Notifications
You must be signed in to change notification settings - Fork 368
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev/patch' into item-tests
- Loading branch information
Showing
8 changed files
with
105 additions
and
41 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
20 changes: 20 additions & 0 deletions
20
src/test/skript/tests/regressions/6811-inventory-holder-location-doublechest.sk
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
test "inventory holder location double chest": | ||
set {_b::1} to the block at spawn of world "world" | ||
set {_b::2} to the block north of {_b::1} | ||
set {_prev::1} to type of block at {_b::1} | ||
set {_prev::2} to type of block at {_b::2} | ||
|
||
set block at {_b::1} to chest[facing=east;type=right] | ||
set block at {_b::2} to chest[facing=east;type=left] | ||
|
||
set {_inv} to inventory of {_b::1} | ||
set {_holder} to holder of {_inv} | ||
|
||
set {_a-loc} to location of {_holder} | ||
set {_b-loc::*} to location of {_b::1} and location of {_b::2} | ||
|
||
# clean up first in case assert fails | ||
set block at {_b::1} to {_prev::1} | ||
set block at {_b::2} to {_prev::2} | ||
|
||
assert {_b-loc::*} contains {_a-loc} with "holder location of double chest differs from block location" |
4 changes: 4 additions & 0 deletions
4
src/test/skript/tests/regressions/6830-remove air from slot.sk
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
test "remove air from air slot": | ||
set {_chest} to chest inventory with 3 rows | ||
# throws exception if not fixed | ||
remove 1 of (slot 0 of {_chest}) from (slot 0 of {_chest}) |
15 changes: 15 additions & 0 deletions
15
src/test/skript/tests/syntaxes/expressions/ExprLastDamage.sk
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
test "last damage": | ||
set {_l} to location 0.5 above highest block at location(1,1,1) | ||
spawn a sheep at {_l} | ||
set {_e} to last spawned entity | ||
|
||
assert last damage of {_e} = 0 with "last damage of newly spawned entity should be 0" | ||
|
||
damage {_e} by 1 | ||
assert last damage of {_e} = 1 with "last damage of entity should be 1 after damaging it by 1" | ||
|
||
set last damage of {_e} to 3 | ||
assert last damage of {_e} = 3 with "last damage of entity should be 3 after setting to 3" | ||
|
||
# thank you for your service | ||
delete entity in {_e} |