Tests: Shell: Take into account startup new line
Update `shell_backend_uart` to take into account the new line print by `z_cursor_next_line_move`. Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
This commit is contained in:
parent
9aba9ddd0c
commit
cfeb325b4f
1 changed files with 5 additions and 0 deletions
|
@ -110,6 +110,7 @@ SHELL_DEFINE(shell_euart0, "", &shell_transport_euart0,
|
||||||
|
|
||||||
static void *setup(void)
|
static void *setup(void)
|
||||||
{
|
{
|
||||||
|
uint8_t tx_content[SAMPLE_DATA_SIZE] = {0};
|
||||||
static struct shell_backend_uart_fixture fixture = {
|
static struct shell_backend_uart_fixture fixture = {
|
||||||
.dev = DEVICE_DT_GET(DT_NODELABEL(euart0)),
|
.dev = DEVICE_DT_GET(DT_NODELABEL(euart0)),
|
||||||
};
|
};
|
||||||
|
@ -120,6 +121,10 @@ static void *setup(void)
|
||||||
/* Let the shell backend initialize. */
|
/* Let the shell backend initialize. */
|
||||||
k_usleep(10);
|
k_usleep(10);
|
||||||
|
|
||||||
|
/* get the shell startup newline */
|
||||||
|
uart_emul_get_tx_data(fixture.dev, tx_content, SAMPLE_DATA_SIZE);
|
||||||
|
zassert_mem_equal(tx_content, "\r\n", strlen("\r\n"));
|
||||||
|
|
||||||
return &fixture;
|
return &fixture;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue