Skip to content

Commit

Permalink
add test to validate platforms in gamedb
Browse files Browse the repository at this point in the history
  • Loading branch information
alkazar committed Apr 16, 2024
1 parent 8c925b6 commit 1f0e7ad
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/04-gamedb-platforms.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
ACTUAL=$(cat gamedb.yaml | grep platform: | cut -d':' -f 2 | sort | uniq -c | tr -s ' ' | cut -d' ' -f 3 | tr '\n' ' ' | sed 's/ $//')
EXPECTED="epic-store flathub gog steam"

if [ "$ACTUAL" != "$EXPECTED" ]; then
echo "One or more invalid platforms detected."
echo
echo "Expected: '$EXPECTED'"
echo "Actual: '$ACTUAL'"
exit 1
fi
1 change: 1 addition & 0 deletions tests/run-all
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ set -e
./tests/01-gamedb-syntax.py
./tests/02-gamedb-duplicates.sh
./tests/03-hwdb-syntax.py
./tests/04-gamedb-platforms.sh

0 comments on commit 1f0e7ad

Please sign in to comment.