Skip to content

Commit

Permalink
Merge branch 'dev/feature' into patch/secspression-logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Efnilite authored Jan 6, 2025
2 parents 33dc775 + b147bf0 commit 541c0ca
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
7 changes: 3 additions & 4 deletions src/main/java/ch/njol/skript/test/runner/EffAssert.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,9 @@ public class EffAssert extends Effect {
static {
if (TestMode.ENABLED)
Skript.registerEffect(EffAssert.class,
"assert <.+> [(1:to fail)]",
"assert <.+> [(1:to fail)] with [error] %string%",
"assert <.+> [(1:to fail)] with [error] %string%, expected [value] %object%, [and] (received|got) " +
"[value] %object%");
"assert <.+> [(1:to fail)] with [error] %string%, expected [value] %object%, [and] (received|got) [value] %object%",
"assert <.+> [(1:to fail)]");
}

private @Nullable Condition condition;
Expand All @@ -49,7 +48,7 @@ public boolean init(Expression<?>[] exprs, int matchedPattern, Kleenean isDelaye
}

String conditionString = parseResult.regexes.get(0).group();
if (matchedPattern > 0)
if (matchedPattern < 2)
this.errorMsg = (Expression<String>) exprs[0];
boolean canInit = true;
if (exprs.length > 1) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,16 @@ class Example4 {}
if (TestMode.ENABLED) {
Classes.registerClass(new ClassInfo<>(Example1.class, "testgui")
.user("example1")
.name("Test -ui"));
.name(ClassInfo.NO_DOC));
Classes.registerClass(new ClassInfo<>(Example2.class, "exemplus")
.user("example2")
.name("Test -i"));
.name(ClassInfo.NO_DOC));
Classes.registerClass(new ClassInfo<>(Example3.class, "aardwolf")
.user("example3")
.name("Test -ves"));
.name(ClassInfo.NO_DOC));
Classes.registerClass(new ClassInfo<>(Example4.class, "hoof")
.user("example3")
.name("Test -ves 2"));
.name(ClassInfo.NO_DOC));
Skript.registerEffect(EffTestPluralClassInfos.class,
"classinfo test for %testgui%",
"classinfo test for %testguis%",
Expand Down

0 comments on commit 541c0ca

Please sign in to comment.