Commit cfeb325b authored by Théo Battrel's avatar Théo Battrel Committed by Anas Nashif
Browse files

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: default avatarThéo Battrel <theo.battrel@nordicsemi.no>
parent 9aba9ddd
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -110,6 +110,7 @@ SHELL_DEFINE(shell_euart0, "", &shell_transport_euart0,

static void *setup(void)
{
	uint8_t tx_content[SAMPLE_DATA_SIZE] = {0};
	static struct shell_backend_uart_fixture fixture = {
		.dev = DEVICE_DT_GET(DT_NODELABEL(euart0)),
	};
@@ -120,6 +121,10 @@ static void *setup(void)
	/* Let the shell backend initialize. */
	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;
}