summaryrefslogtreecommitdiffstats
path: root/menu/tests/menutest
diff options
context:
space:
mode:
authorMark McLoughlin <mark@skynet.ie>2004-08-29 12:33:51 +0000
committerMark McLoughlin <mark@skynet.ie>2004-08-29 12:33:51 +0000
commitabbe4db525c4da32067204c371161959f594decd (patch)
tree0607c0cfe30b2e1191901e3d671d29e5c9a9bb02 /menu/tests/menutest
parent2a3b70fd794c64aac1dfc9d8ba567888195d0903 (diff)
downloadxdg-specs-abbe4db525c4da32067204c371161959f594decd.tar.xz
test for NoDisplay=true behavious in .desktop and .directory files.
2004-08-29 Mark McLoughlin <mark@skynet.ie> * tests/m: test for NoDisplay=true behavious in .desktop and .directory files. * data/hidden.desktop, data/hidden.directory: add. * data/apps.directory: add Type=Directory. * menutest: actually generate a test result if one doesn't exist - makes it easier to write new tests.
Diffstat (limited to 'menu/tests/menutest')
-rwxr-xr-xmenu/tests/menutest18
1 files changed, 12 insertions, 6 deletions
diff --git a/menu/tests/menutest b/menu/tests/menutest
index c932fac..6c2ca0e 100755
--- a/menu/tests/menutest
+++ b/menu/tests/menutest
@@ -36,10 +36,7 @@ for TEST in ${TESTS}; do
mkdir ${MENUTESTDIR}
RESULT=tests/${TEST}/result
- if [ ! -e ${RESULT} ]; then
- echo '!!! Result file ('${RESULT}') for '${TEST}' missing'
- else
- (
+ (
echo ">>> Running test ${TEST}"
# Some predefined values
@@ -60,9 +57,18 @@ for TEST in ${TESTS}; do
. tests/${TEST}/test
$MENUTEST > ${MENUTESTDIR}/result1 2> ${MENUTESTDIR}/log
- ./expand ${RESULT} > ${MENUTESTDIR}/result2
- )
+ if [ -e ${RESULT} ]; then
+ ./expand ${RESULT} > ${MENUTESTDIR}/result2
+ fi
+ )
+
+ if [ ! -e ${RESULT} ]; then
+ echo '!!! Result file ('${RESULT}') for '${TEST}' missing'
+ echo '>>> Failed'
+ FAILED="${FAILED} ${TEST}"
+
+ else
if diff -q ${MENUTESTDIR}/result1 ${MENUTESTDIR}/result2 > /dev/null; then
echo '>>> OK'
SUCCEEDED="${SUCCEEDED} ${TEST}"