summaryrefslogtreecommitdiffstats
path: root/menu
diff options
context:
space:
mode:
authorWaldo Bastian <waldo.bastian@intel.com>2006-07-13 22:58:52 +0000
committerWaldo Bastian <waldo.bastian@intel.com>2006-07-13 22:58:52 +0000
commitaa4fce5fe7db4109b37e4add34e7d145361f7375 (patch)
tree315e97bbec49530132c5b6e6327a96cf86475e53 /menu
parent9d56a632e7b418a83c978b9035f07da6ae98719f (diff)
downloadxdg-specs-aa4fce5fe7db4109b37e4add34e7d145361f7375.tar.xz
Don't fail if system items bleed through in the tests
Diffstat (limited to 'menu')
-rwxr-xr-xmenu/tests/menutest20
1 files changed, 16 insertions, 4 deletions
diff --git a/menu/tests/menutest b/menu/tests/menutest
index adf93d8..6061ba8 100755
--- a/menu/tests/menutest
+++ b/menu/tests/menutest
@@ -90,10 +90,22 @@ for TEST in ${TESTS}; do
echo '>>> OK (different order)'
SUCCEEDED="${SUCCEEDED} ${TEST}"
else
- echo '>>> Failed'
- cat ${MENUTESTDIR}/result.diff
- cat ${MENUTESTDIR}/log
- FAILED="${FAILED} ${TEST}"
+ grep ${MENUTESTDIR} ${MENUTESTDIR}/result1 > ${MENUTESTDIR}/result1.filtered 2> /dev/null
+ if diff -q ${MENUTESTDIR}/result1.filtered ${MENUTESTDIR}/result2 > /dev/null; then
+ echo '>>> OK (additional system items)'
+ SUCCEEDED="${SUCCEEDED} ${TEST}"
+ else
+ grep ${MENUTESTDIR} ${MENUTESTDIR}/result1.sorted > ${MENUTESTDIR}/result1.filtered 2> /dev/null
+ if diff -u ${MENUTESTDIR}/result1.filtered ${MENUTESTDIR}/result2.sorted > ${MENUTESTDIR}/result.diff; then
+ echo '>>> OK (different order, additional system items)'
+ SUCCEEDED="${SUCCEEDED} ${TEST}"
+ else
+ echo '>>> Failed'
+ cat ${MENUTESTDIR}/result.diff
+ cat ${MENUTESTDIR}/log
+ FAILED="${FAILED} ${TEST}"
+ fi
+ fi
fi
fi
fi