2021-05-20 07:51:30 +03:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -eu
|
|
|
|
|
|
|
|
# Fix sorting differences between Linux and Mac
|
|
|
|
export LC_ALL=C
|
|
|
|
|
|
|
|
cat tests/golden.txt | awk NF | sort | uniq | awk '{$1=$1};1' | uniq | sort > tests/golden_sorted.txt
|
|
|
|
mv tests/golden_sorted.txt tests/golden.txt
|
|
|
|
|
|
|
|
cat tests/ignored.txt | awk NF | sort | uniq | awk '{$1=$1};1' | uniq | sort > tests/ignored_sorted.txt
|
2021-05-21 09:57:17 +03:00
|
|
|
mv tests/ignored_sorted.txt tests/ignored.txt
|
|
|
|
|
2021-05-28 13:44:03 +03:00
|
|
|
cat tests/postponed.txt | awk NF | sort | uniq | awk '{$1=$1};1' | uniq | sort > tests/postponed_sorted.txt
|
|
|
|
mv tests/postponed_sorted.txt tests/postponed.txt
|
|
|
|
|
2021-05-21 09:57:17 +03:00
|
|
|
# Don't mark ignored test as golden
|
|
|
|
comm -23 tests/golden.txt tests/ignored.txt > tests/nodup.txt
|
2021-05-28 13:44:03 +03:00
|
|
|
comm -23 tests/nodup.txt tests/postponed.txt > tests/nodup_2.txt
|
|
|
|
rm tests/nodup.txt
|
|
|
|
mv tests/nodup_2.txt tests/golden.txt
|