Divide test cases in to groups and add test cases for:
- multiple spaces between arguments
- tabs between arguments
- leading/trailing spaces
- more simple variations for escaping
- multiple tests for correct quoting
A second occurence of the test case "('help', EXPECTED_HELP),"
was removed.
Check that single and double quotes work, along with backslash escaping
and that malformed strings are rejected.
Right now the test is failing. The next commit will replace the tokenizer
with one that works correctly.
Co-authored-by: Juan Carrano <j.carrano@fu-berlin.de>
Test erasing characters using backspace. The test is not really testing
a lot right now, because the host is still line buffering.
Co-authored-by: Juan Carrano <j.carrano@fu-berlin.de>
The test for the line cancellation (ctrl-c) functionality was unable to
detect error because of the way pexpect matches output.
While working on the long line shell bug, a regression was about to be
introduced because of this. This commit fixes the test by directly reading from
the child process and expects an exact response.
Co-authored-by: Juan Carrano <j.carrano@fu-berlin.de>
Previously, the test would start sending the first test commands right
at the beginning. This fails on boards whose UART is not ready at that
point.
This PR makes the test script explicitly wait for the prompt to be
ready.
Python dictionaries are not guaranteed to be ordered until version
3.7. In 3.6 they are ordered too, but that is an implementation
detail. riotdocker seems to be using 3.5.
As it stands now, it would not be a problem if the test commands
are run in a random order, except that:
- It would result in non-reproduceable tests.
- It hinders testing other functionality, such as exiting the shell.