testsuite: Fix line count test

a substring match is not enough, ex: 10 != 1

Fixes: 30383b074d ("tests: Add output testing")
Signed-off-by: Benjamin Poirier <bpoirier@cumulusnetworks.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
This commit is contained in:
Benjamin Poirier 2019-12-16 15:43:38 +09:00 committed by Stephen Hemminger
parent 15322f46c3
commit d88a6a98e8

View File

@ -121,7 +121,7 @@ test_on_not()
test_lines_count()
{
echo -n "test on lines count ($1): "
if cat "$STD_OUT" | wc -l | grep -q "$1"
if [ $(cat "$STD_OUT" | wc -l) -eq "$1" ]
then
pr_success
else