mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-11-19 10:25:00 +00:00
Added a new test for get[Padded]Slice and renamed testHangingQuote to testUnmatchedQuote.
This commit is contained in:
parent
67918f171b
commit
fa82482823
@ -81,7 +81,7 @@ public class CommandContextTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testHangingQuote() {
|
public void testUnmatchedQuote() {
|
||||||
String cmd = "r \"hello goodbye have fun";
|
String cmd = "r \"hello goodbye have fun";
|
||||||
try {
|
try {
|
||||||
new CommandContext(cmd);
|
new CommandContext(cmd);
|
||||||
@ -131,4 +131,16 @@ public class CommandContextTest {
|
|||||||
fail("Error creating CommandContext");
|
fail("Error creating CommandContext");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testSlice() {
|
||||||
|
try {
|
||||||
|
CommandContext context = new CommandContext("foo bar baz");
|
||||||
|
assertArrayEquals(new String[] { "foo", "bar", "baz" }, context.getSlice(0));
|
||||||
|
|
||||||
|
} catch (CommandException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
fail("Error creating CommandContext");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user