Skip to content

Commit 11b5390

Browse files
hashplinggitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 1f26ce6 commit 11b5390

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

t/t3600-rm.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -711,8 +711,7 @@ test_expect_success 'checking out a commit after submodule removal needs manual
711711
git submodule update &&
712712
git checkout -q HEAD^ 2>actual &&
713713
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 &&
716715
git status -s submod >actual &&
717716
echo "?? submod/" >expected &&
718717
test_cmp expected actual &&

t/t7001-mv.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -446,8 +446,7 @@ test_expect_success 'checking out a commit before submodule moved needs manual u
446446
git mv sub sub2 &&
447447
git commit -m "moved sub to sub2" &&
448448
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 &&
451450
git status -s sub2 >actual &&
452451
echo "?? sub2/" >expected &&
453452
test_cmp expected actual &&

0 commit comments

Comments
 (0)