-
-
Notifications
You must be signed in to change notification settings - Fork 381
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Breakable Syntax to Existing Unbreakable Syntaxes (#6160)
* add breakable syntax * Convert to SPE * Add tests * Fix indent for tests * Improve examples * Include 'breakable' keyword in docs description * Rename `breakable` field to prevent confusion --------- Co-authored-by: Moderocky <admin@moderocky.com> Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>
- Loading branch information
1 parent
125f14b
commit fd833ac
Showing
3 changed files
with
63 additions
and
60 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
15 changes: 15 additions & 0 deletions
15
src/test/skript/tests/syntaxes/expressions/ExprUnbreakable.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 "unbreakable": | ||
set {_breakable1} to iron sword | ||
assert {_breakable1} is breakable with "Iron Sword should be breakable ##1" | ||
assert {_breakable1} is not unbreakable with "Iron Sword should be not unbreakable ##1" | ||
set {_unbreakable1} to unbreakable iron sword | ||
assert {_unbreakable1} is unbreakable with "Iron Sword should be unbreakable ##2" | ||
assert {_unbreakable1} is not breakable with "Iron Sword should be not breakable ##2" | ||
set {_breakable2} to breakable {_unbreakable1} | ||
assert {_breakable2} is breakable with "Iron Sword should be breakable ##2" | ||
assert {_breakable2} is not unbreakable with "Iron Sword should be not unbreakable ##2" | ||
set {_unbreakable2} to unbreakable {_breakable1} | ||
assert {_unbreakable2} is unbreakable with "Iron Sword should be unbreakable ##2" | ||
assert {_unbreakable2} is not breakable with "Iron Sword should be not breakable ##2" | ||
assert {_null} is not breakable with "CondIsUnbreakable on unset variable check failed ##1" | ||
assert {_null} is not unbreakable with "CondIsUnbreakable on unset variable check failed ##2" |