Skip to content
Commit ea9fe2f5 authored by Jakub Rzeszutko's avatar Jakub Rzeszutko Committed by Carles Cufí
Browse files

tests: shell_flash: fix test case scenario



The previous test had two defects. First, the shell command was called
before the backend was initialized.

Second, the test compared the string from shell's backend buffer with
the reference string using strncmp function. This test result was very
susceptible to the time when it was performed because of data contained
in the buffer. Apart from expected string there was data like escape
codes needed to control the terminal.

To fix it, function strncmp was replaced by strstr, which
searches for the reference strings regardless of the characters
controlling the terminal.

Signed-off-by: default avatarJakub Rzeszutko <jakub.rzeszutko@nordisemi.no>
parent e73e9321
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment