Skip to content

Commit

Permalink
add test for game order
Browse files Browse the repository at this point in the history
  • Loading branch information
alkazar committed May 24, 2024
1 parent 5c5f577 commit 131a6c3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/05-gamedb-order.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
cat gamedb.yaml | grep "name:" | sed 's/- name: //' | sed 's/ name: //' | sed -E 's/^"|"$//g' | sed -E "s/^'|'$//g" | sed 's/^A //I' | sed 's/^An //I' | sed 's/^The //I' > /tmp/chimera_gamedb_original_order
cat /tmp/chimera_gamedb_original_order | sort > /tmp/chimera_gamedb_sorted_order

diff -u /tmp/chimera_gamedb_original_order /tmp/chimera_gamedb_sorted_order
if [ $? != 0 ]; then
echo "gamedb.yaml should be in alphabetical order by name."
exit 1
fi
1 change: 1 addition & 0 deletions tests/run-all
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ set -e
./tests/02-gamedb-duplicates.sh
./tests/03-hwdb-syntax.py
./tests/04-gamedb-platforms.sh
#./tests/05-gamedb-order.sh

0 comments on commit 131a6c3

Please sign in to comment.