diff --git a/shell.c b/shell.c index 1591b31..61a8ecd 100644 --- a/shell.c +++ b/shell.c @@ -4085,7 +4085,7 @@ cmd_board_get(struct shell_ctx *ctx, int argc, char **argv) { COVERAGE_ON(); c = umka_sys_board_get(); COVERAGE_OFF(); - if (c.status) { + if (c.status && (c.value != '\r')) { fputc(c.value, ctx->fout); } } while (c.status && ((c.value != '\n') || flush)); diff --git a/test/065_#board_all.ref.log b/test/065_#board_all.ref.log index f4d98b9..eac2f69 100644 --- a/test/065_#board_all.ref.log +++ b/test/065_#board_all.ref.log @@ -18,12 +18,14 @@ hi /> board_put \n /> board_put b /> board_put c +/> board_put \r /> board_put \n +/> board_put \r /> board_put d /> board_put e /> board_put f /> -/> board_get -f +/> board_get -fn a bc -def \ No newline at end of file +def diff --git a/test/065_#board_all.t b/test/065_#board_all.t index 1cd6bae..2e03924 100644 --- a/test/065_#board_all.t +++ b/test/065_#board_all.t @@ -14,9 +14,11 @@ board_put a board_put \n board_put b board_put c +board_put \r board_put \n +board_put \r board_put d board_put e board_put f -board_get -f +board_get -fn diff --git a/test/t065/ref.log b/test/t065/ref.log index f4d98b9..eac2f69 100644 --- a/test/t065/ref.log +++ b/test/t065/ref.log @@ -18,12 +18,14 @@ hi /> board_put \n /> board_put b /> board_put c +/> board_put \r /> board_put \n +/> board_put \r /> board_put d /> board_put e /> board_put f /> -/> board_get -f +/> board_get -fn a bc -def \ No newline at end of file +def diff --git a/test/t065/run.us b/test/t065/run.us index 1cd6bae..2e03924 100644 --- a/test/t065/run.us +++ b/test/t065/run.us @@ -14,9 +14,11 @@ board_put a board_put \n board_put b board_put c +board_put \r board_put \n +board_put \r board_put d board_put e board_put f -board_get -f +board_get -fn