-
-
Notifications
You must be signed in to change notification settings - Fork 376
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Apply new line (
%nr%
) in item lore correctly (#3636)
* Apply new line in item lore * Add test case for item with lore * Remove needless clone() * fix test case of item with lore * Use Expression#stream instead of Arrays.stream
- Loading branch information
1 parent
2610d30
commit 0841a4f
Showing
2 changed files
with
26 additions
and
2 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
19 changes: 19 additions & 0 deletions
19
src/test/skript/tests/syntaxes/expressions/ExprItemWithLore.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,19 @@ | ||
test "item with lore as one string without newline": | ||
set {_i1} to 1 of stone with lore "first line" | ||
assert the line 1 of lore of {_i1} is "first line" with "has correct first line" | ||
|
||
test "item with lore as multiple string without newline": | ||
set {_i2} to 1 of stone with lore "first line" and "second line" | ||
assert the line 1 of lore of {_i2} is "first line" with "has correct first line" | ||
assert the line 2 of lore of {_i2} is "second line" with "has correct second line" | ||
|
||
test "item with lore as one string with newline": | ||
set {_i3} to 1 of stone with lore "first line%nl%second line" | ||
assert the line 1 of lore of {_i3} is "first line" with "has correct first line" | ||
assert the line 2 of lore of {_i3} is "second line" with "has correct second line" | ||
|
||
test "item with lore as multiple string with newline": | ||
set {_i4} to 1 of stone with lore "first line%nl%second line" and "third line" | ||
assert the line 1 of lore of {_i4} is "first line" with "has correct first line" | ||
assert the line 2 of lore of {_i4} is "second line" with "has correct second line" | ||
assert the line 3 of lore of {_i4} is "third line" with "has correct third line" |