diff options
author | Mark McLoughlin <mark@skynet.ie> | 2004-08-29 12:33:51 +0000 |
---|---|---|
committer | Mark McLoughlin <mark@skynet.ie> | 2004-08-29 12:33:51 +0000 |
commit | abbe4db525c4da32067204c371161959f594decd (patch) | |
tree | 0607c0cfe30b2e1191901e3d671d29e5c9a9bb02 /menu/tests/menutest | |
parent | 2a3b70fd794c64aac1dfc9d8ba567888195d0903 (diff) | |
download | xdg-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-x | menu/tests/menutest | 18 |
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}" |