diff options
Diffstat (limited to 'menu/tests')
-rwxr-xr-x | menu/tests/menutest | 20 |
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 |