diff options
author | Robin Houston <robin.houston@gmail.com> | 2012-01-24 17:19:38 +0000 |
---|---|---|
committer | Robin Houston <robin.houston@gmail.com> | 2012-01-24 17:19:38 +0000 |
commit | ddb79209784a29da895b81221c0c2f9d2b01e2c9 (patch) | |
tree | a04a99d405765755ab5386ddd366cbc00def8501 | |
parent | e6506561b67e35800c71674642223547f0633c52 (diff) |
Ignore non-matching lines
When reading a list of test pairs from standard input, ignore lines
that do not match the expected format
* FAILED: test1 test2
-rwxr-xr-x | script/spec-all-pairs | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/script/spec-all-pairs b/script/spec-all-pairs index 3604e8111..6f27e6b8e 100755 --- a/script/spec-all-pairs +++ b/script/spec-all-pairs @@ -39,11 +39,18 @@ pairs_from_stdin() { all_okay=true while read line do - line=${line#\* FAILED: } - if ! test_pair $line - then - all_okay=false - fi + case "$line" in + \*\ FAILED:\ *) + line=${line#\* FAILED: } + if ! test_pair $line + then + all_okay=false + fi + ;; + *) + echo "No match: $line" + ;; + esac done $all_okay |