mirror of
https://github.com/git/git
synced 2024-08-24 18:26:02 +00:00
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>
This commit is contained in:
parent
1f26ce615a
commit
11b5390251
|
@ -711,8 +711,7 @@ test_expect_success 'checking out a commit after submodule removal needs manual
|
||||||
git submodule update &&
|
git submodule update &&
|
||||||
git checkout -q HEAD^ 2>actual &&
|
git checkout -q HEAD^ 2>actual &&
|
||||||
git checkout -q master 2>actual &&
|
git checkout -q master 2>actual &&
|
||||||
echo "warning: unable to rmdir submod: Directory not empty" >expected &&
|
test_i18ngrep "^warning: unable to rmdir submod:" actual &&
|
||||||
test_i18ncmp expected actual &&
|
|
||||||
git status -s submod >actual &&
|
git status -s submod >actual &&
|
||||||
echo "?? submod/" >expected &&
|
echo "?? submod/" >expected &&
|
||||||
test_cmp expected actual &&
|
test_cmp expected actual &&
|
||||||
|
|
|
@ -446,8 +446,7 @@ test_expect_success 'checking out a commit before submodule moved needs manual u
|
||||||
git mv sub sub2 &&
|
git mv sub sub2 &&
|
||||||
git commit -m "moved sub to sub2" &&
|
git commit -m "moved sub to sub2" &&
|
||||||
git checkout -q HEAD^ 2>actual &&
|
git checkout -q HEAD^ 2>actual &&
|
||||||
echo "warning: unable to rmdir sub2: Directory not empty" >expected &&
|
test_i18ngrep "^warning: unable to rmdir sub2:" actual &&
|
||||||
test_i18ncmp expected actual &&
|
|
||||||
git status -s sub2 >actual &&
|
git status -s sub2 >actual &&
|
||||||
echo "?? sub2/" >expected &&
|
echo "?? sub2/" >expected &&
|
||||||
test_cmp expected actual &&
|
test_cmp expected actual &&
|
||||||
|
|
Loading…
Reference in a new issue