Added more tests and fixed some issues
This commit is contained in:
parent
3ec833a5bd
commit
b557fa1c3d
@ -18,7 +18,8 @@ class ParserTest {
|
||||
testInput(parser, "ls -la ./what", "ls", List.of("l", "a"), List.of("./what"));
|
||||
testInput(parser, "rm -r /bin /opt", "rm", List.of("r"), List.of("/bin", "/opt"));
|
||||
testInput(parser, "cd .", "cd", List.of(), List.of("."));
|
||||
testInput(parser, "mkdir .", "cd", List.of(), List.of("."));
|
||||
testInput(parser, "mkdir .", "mkdir", List.of(), List.of("."));
|
||||
testInput(parser, "super -abc -de -f super nice danke paul", "super", List.of("a", "b", "c", "d", "e", "f"), List.of("super", "nice", "danke", "paul"));
|
||||
}
|
||||
|
||||
private void testInput(Parser parser, String input, String expectedCommand, List<String> expectedFlags, List<String> expectedArgs) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user