-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Should sort the whole list, otherwise the batching will get other batches than expected after missing tests are removed.
- Loading branch information
Showing
3 changed files
with
168 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/usr/bin/env bash | ||
# Sort if has two arguments | ||
# Check if sorted otherwise | ||
if [[ $# == 2 ]]; then | ||
sort -n < "$1" | while read -r line; do | ||
printf 'TEST: %s\n' "$line" | ||
done | ||
else | ||
if sort -n < "$1" | diff "$1" /dev/stdin; then | ||
while read -r line; do | ||
printf "Test case '%s'..\n Pass (Result image matches reference)\n" "$line" | ||
done < "$1" | ||
printf 'DONE!\n' | ||
else | ||
test=`head -n1 "$1"` | ||
printf "Test case '%s'..\n Fail (List is not sorted)\n" "$test" | ||
fi | ||
fi |