forked from RIOT-OS/RIOT
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
drop! sys/shell: correctly detect and handle long lines (dependency to …
…RIOT-OS#13195) The numeric value for EOF is -1. This caused the shell to return the same code when EOF was encountered and when the line lenght was exceeded. Additionally, if the line length is exceeded, the correct behaviour is to consume the remaining characters until the end of the line, to prevent the following line from containing (potentially dangerous) garbage. Co-authored-by: Hendrik van Essen <hendrik.ve@fu-berlin.de> sys/shell: rephrase/reformat some comments tests/shell: add test case for shell's buffer size Co-authored-by: Juan Carrano <j.carrano@fu-berlin.de> tests/shell: avoid sending an extra empty line on native Co-authored-by: Juan Carrano <j.carrano@fu-berlin.de> tests/shell: check for startup message Co-authored-by: Juan Carrano <j.carrano@fu-berlin.de> tests/shell: check for shell prompt Co-authored-by: Juan Carrano <j.carrano@fu-berlin.de> tests/shell: fix test case for line cancelling 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> tests/shell: add test case for exceeding lines Co-authored-by: Juan Carrano <j.carrano@fu-berlin.de> tests/shell: remove redundant parentheses
- Loading branch information
Showing
3 changed files
with
157 additions
and
32 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