From aa4fce5fe7db4109b37e4add34e7d145361f7375 Mon Sep 17 00:00:00 2001 From: Waldo Bastian Date: Thu, 13 Jul 2006 22:58:52 +0000 Subject: Don't fail if system items bleed through in the tests --- menu/tests/menutest | 20 ++++++++++++++++---- 1 file 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 -- cgit v1.2.3-70-g09d2