tests: don't rely on strerror text when testing rmdir failure

AIX doesn't make a distiction between EEXIST and ENOTEMPTY; relying on the strerror string for the rmdir failure is fragile. Just test that the start of the string matches the Git controlled "failed to rmdir..." error. The exact text of the OS generated error string isn't important to the test. Signed-off-by: Charles Bailey <cbailey32@bloomberg.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Charles Bailey committed Mar 29, 2014 at 15:39 UTC 11b53902513c6d59f59594845ce53fe761f0894c
2 files changed +2 -4
t/t3600-rm.sh
+1 -2
@@ -711,8 +711,7 @@ test_expect_success 'checking out a commit after submodule removal needs manual
711 git submodule update &&
712 git checkout -q HEAD^ 2>actual &&
713 git checkout -q master 2>actual &&
714 - echo "warning: unable to rmdir submod: Directory not empty" >expected &&
715 - test_i18ncmp expected actual &&
714 + test_i18ngrep "^warning: unable to rmdir submod:" actual &&
715 git status -s submod >actual &&
716 echo "?? submod/" >expected &&
717 test_cmp expected actual &&
t/t7001-mv.sh
+1 -2
@@ -446,8 +446,7 @@ test_expect_success 'checking out a commit before submodule moved needs manual u
446 git mv sub sub2 &&
447 git commit -m "moved sub to sub2" &&
448 git checkout -q HEAD^ 2>actual &&
449 - echo "warning: unable to rmdir sub2: Directory not empty" >expected &&
450 - test_i18ncmp expected actual &&
449 + test_i18ngrep "^warning: unable to rmdir sub2:" actual &&
450 git status -s sub2 >actual &&
451 echo "?? sub2/" >expected &&
452 test_cmp expected actual &&