-
-
Notifications
You must be signed in to change notification settings - Fork 371
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/feature' into clear-message
- Loading branch information
Showing
14 changed files
with
106 additions
and
33 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
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
53 changes: 53 additions & 0 deletions
53
src/test/java/org/skriptlang/skript/test/tests/regression/BlockDataNotCloned6829.java
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,53 @@ | ||
/** | ||
* This file is part of Skript. | ||
* | ||
* Skript is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* Skript is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with Skript. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
* Copyright Peter Güttinger, SkriptLang team and contributors | ||
*/ | ||
package org.skriptlang.skript.test.tests.regression; | ||
|
||
import ch.njol.skript.lang.Effect; | ||
import ch.njol.skript.lang.TriggerItem; | ||
import ch.njol.skript.lang.util.ContextlessEvent; | ||
import ch.njol.skript.test.runner.SkriptJUnitTest; | ||
import ch.njol.skript.variables.Variables; | ||
import org.bukkit.block.data.type.Tripwire; | ||
import org.bukkit.event.Event; | ||
import org.junit.Assert; | ||
import org.junit.Test; | ||
|
||
import java.util.Objects; | ||
|
||
public class BlockDataNotCloned6829 extends SkriptJUnitTest { | ||
|
||
public void run(String unparsedEffect, Event event) { | ||
Effect effect = Effect.parse(unparsedEffect, "Can't understand this effect: " + unparsedEffect); | ||
if (effect == null) | ||
throw new IllegalStateException(); | ||
TriggerItem.walk(effect, event); | ||
} | ||
|
||
@Test | ||
public void test() { | ||
Event event = ContextlessEvent.get(); | ||
run("set {_original tripwire} to tripwire[]", event); | ||
run("set {_another tripwire} to {_original tripwire}", event); | ||
Tripwire originalTripwire = (Tripwire) Objects.requireNonNull(Variables.getVariable("original tripwire", event, true)); | ||
Tripwire anotherTripwire = (Tripwire) Objects.requireNonNull(Variables.getVariable("another tripwire", event, true)); | ||
anotherTripwire.setDisarmed(true); | ||
Assert.assertFalse(originalTripwire.isDisarmed()); | ||
} | ||
|
||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions
3
src/test/skript/tests/regressions/pull-6832-potioneffecttype-compare.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,3 @@ | ||
test "compare potion effect types": | ||
assert nausea = nausea with "2 nausea potion effect types should match" | ||
assert type of (potion effect of nausea for 1 minute) = nausea with "type of potion effect of nausea should equal nausea" |