-
-
Notifications
You must be signed in to change notification settings - Fork 373
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix the REMOVE changer of variables (#7163)
* Fix the REMOVE changer of variables * Fix wording * Fix tests * Update Variable.java --------- Co-authored-by: sovdee <[email protected]>
- Loading branch information
1 parent
7b5a8a6
commit aa71764
Showing
2 changed files
with
18 additions
and
35 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
6 changes: 6 additions & 0 deletions
6
src/test/skript/tests/regressions/7162-removing from variable skips duplicates.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,6 @@ | ||
test "removing from variables skips duplicates": | ||
set {_list::*} to 1, 1, 2, 3, 4, 5, 6 and 6 | ||
remove 1 and 1 from {_list::*} | ||
assert {_list::*} is 2, 3, 4, 5, 6 and 6 with "didn't remove all instances of 1 from the list" | ||
remove first 6 elements out of {_list::*} from {_list::*} | ||
assert {_list::*} is not set with "didn't remove all elements" |