[SCM] Installer for game data files branch, testsuite, updated. 521cbfd9ee9133726037dd0213d70a46a2552c63

Jon Dowland jmtd at debian.org
Thu Dec 17 16:48:35 UTC 2009


The following commit has been merged in the testsuite branch:
commit b5df457cda1db20875502853414cfeabf8cb36e8
Author: Jon Dowland <jmtd at debian.org>
Date:   Thu Dec 17 11:57:41 2009 +0000

    roll directory tests into shunit2 script

diff --git a/tests/runtests b/tests/runtests
new file mode 100755
index 0000000..b03da96
--- /dev/null
+++ b/tests/runtests
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+test_verify_file_yes() {
+  ./tests/lib/verify_file "tests/verify_file"
+  assertEquals $? 0
+}
+test_verify_file_no() {
+  ./tests/lib/verify_file "tests/does_not_exist"
+  assertNotEquals $? 0
+}
+test_verify_dir_yes() {
+  ./tests/lib/verify_directory "tests"
+  assertEquals $? 0
+}
+test_verify_dir_yes() {
+  ./tests/lib/verify_directory "tests/does_not_exist"
+  assertNotEquals $? 0
+}
+
+. ./tests/shunit2/shunit2
diff --git a/tests/verify_directory b/tests/verify_directory
deleted file mode 100755
index 586d275..0000000
--- a/tests/verify_directory
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh
-set -u
-set -e
-
-workdir=$(mktemp -td game-data-packager.tests.XXXXXX)
-mkdir "$workdir/yes"
-
-printf "verify_directory: "
-if   ./tests/lib/verify_directory "$workdir/yes" &&
-   ! ./tests/lib/verify_directory "$workdir/no "; then
-    echo pass
-else
-    echo fail
-fi
-
-rmdir "$workdir/yes"
-rmdir "$workdir"
diff --git a/tests/verify_file b/tests/verify_file
deleted file mode 100755
index cb179f4..0000000
--- a/tests/verify_file
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/sh
-
-test_verify_file_yes() {
-  ./tests/lib/verify_file "tests/verify_file"
-  assertEquals $? 0
-}
-test_verify_file_no() {
-  ./tests/lib/verify_file "tests/does_not_exist"
-  assertNotEquals $? 0
-}
-
-. ./tests/shunit2/shunit2

-- 
Installer for game data files



More information about the Pkg-games-commits mailing list