Skip to content

Commit

Permalink
tests: don't rely on strerror text when testing rmdir failure
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Charles Bailey authored and Junio C Hamano committed Mar 31, 2014
1 parent 1f26ce6 commit 11b5390
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions t/t3600-rm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -711,8 +711,7 @@ test_expect_success 'checking out a commit after submodule removal needs manual
git submodule update &&
git checkout -q HEAD^ 2>actual &&
git checkout -q master 2>actual &&
echo "warning: unable to rmdir submod: Directory not empty" >expected &&
test_i18ncmp expected actual &&
test_i18ngrep "^warning: unable to rmdir submod:" actual &&
git status -s submod >actual &&
echo "?? submod/" >expected &&
test_cmp expected actual &&
Expand Down
3 changes: 1 addition & 2 deletions t/t7001-mv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -446,8 +446,7 @@ test_expect_success 'checking out a commit before submodule moved needs manual u
git mv sub sub2 &&
git commit -m "moved sub to sub2" &&
git checkout -q HEAD^ 2>actual &&
echo "warning: unable to rmdir sub2: Directory not empty" >expected &&
test_i18ncmp expected actual &&
test_i18ngrep "^warning: unable to rmdir sub2:" actual &&
git status -s sub2 >actual &&
echo "?? sub2/" >expected &&
test_cmp expected actual &&
Expand Down

0 comments on commit 11b5390

Please sign in to comment.