numam-spdk/test/app/match
Tomasz Zawadzki 2d687618f3 test/match: do not ignore all input when passing \n
Match script before this change ignored all input
when passing just a new line in ignore file.
This was because \n symbol was stripped from that
particular line (chop()) leaving empty string.
This always matched all of the input when using index().

Now when comparing the input line and ignore line,
we check that ignore line is not empty.

Besides that, to still allow ignoring new lines
we check and compare both strings directly.

Changed chop() to chomp() to prevent further breakage,
difference is that chomp() only strips new line characters.
As that was the original intention anyway.

The loop changed so we exit on first instance of ignored
line matching, rather than mention particular line
multiple times for each matched ignore.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I62d48e1130c600ffff6713d2748239cc955bbe9e
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/483834
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-02-04 20:08:02 +00:00
..
match test/match: do not ignore all input when passing \n 2020-02-04 20:08:02 +00:00