The 'wc' command on macOS prefixes the count it returns with spaces, if
we quote the output it won't be properly converted to integer for the
comparison.
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
totalevents="$2"
intersect="$3"
totalevents="$2"
intersect="$3"
- test "$("${BT_BIN}" "$trace" | wc -l)" = "$totalevents"
+ test $("${BT_BIN}" "$trace" | wc -l) = "$totalevents"
ok $? "$totalevents events in the whole trace"
ok $? "$totalevents events in the whole trace"
- test "$("${BT_BIN}" --stream-intersection "$trace" 2>/dev/null| wc -l)" = "$intersect"
+ test $("${BT_BIN}" --stream-intersection "$trace" 2>/dev/null| wc -l) = "$intersect"
ok $? "$intersect events in packets intersecting"
}
ok $? "$intersect events in packets intersecting"
}