Skip to content

Commit 1f5ad6b

Browse files
avargitster
authored andcommitted
t: use sane_unset instead of unset
Change several tests to use the sane_unset function introduced in v1.7.3.1-35-g00648ba instead of the built-in unset function. This fixes a failure I was having on t9130-git-svn-authors-file.sh on Solaris, and prevents several other issues from occurring. Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent d24fbca commit 1f5ad6b

6 files changed

+10
-10
lines changed

t/t4150-am.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ test_expect_success setup '
136136
git format-patch -M --stdout lorem^ >rename-add.patch &&
137137
138138
# reset time
139-
unset test_tick &&
139+
sane_unset test_tick &&
140140
test_tick
141141
'
142142

t/t5560-http-backend-noserver.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ run_backend() {
1717
GET() {
1818
REQUEST_METHOD="GET" && export REQUEST_METHOD &&
1919
run_backend "/repo.git/$1" &&
20-
unset REQUEST_METHOD &&
20+
sane_unset REQUEST_METHOD &&
2121
if ! grep "Status" act.out >act
2222
then
2323
printf "Status: 200 OK\r\n" >act
@@ -30,8 +30,8 @@ POST() {
3030
REQUEST_METHOD="POST" && export REQUEST_METHOD &&
3131
CONTENT_TYPE="application/x-$1-request" && export CONTENT_TYPE &&
3232
run_backend "/repo.git/$1" "$2" &&
33-
unset REQUEST_METHOD &&
34-
unset CONTENT_TYPE &&
33+
sane_unset REQUEST_METHOD &&
34+
sane_unset CONTENT_TYPE &&
3535
if ! grep "Status" act.out >act
3636
then
3737
printf "Status: 200 OK\r\n" >act

t/t6032-merge-large-rename.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ test_expect_success 'setup large simple rename' '
9595
'
9696

9797
test_expect_success 'massive simple rename does not spam added files' '
98-
unset GIT_MERGE_VERBOSITY &&
98+
sane_unset GIT_MERGE_VERBOSITY &&
9999
git merge --no-stat simple-rename | grep -v Removing >output &&
100100
test 5 -gt "$(wc -l < output)"
101101
'

t/t9130-git-svn-authors-file.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ test_expect_success 'fresh clone with svn.authors-file in config' '
9696
rm -r "$GIT_DIR" &&
9797
test x = x"$(git config svn.authorsfile)" &&
9898
test_config="$HOME"/.gitconfig &&
99-
unset GIT_DIR &&
100-
unset GIT_CONFIG &&
99+
sane_unset GIT_DIR &&
100+
sane_unset GIT_CONFIG &&
101101
git config --global \
102102
svn.authorsfile "$HOME"/svn-authors &&
103103
test x"$HOME"/svn-authors = x"$(git config svn.authorsfile)" &&

t/t9200-git-cvsexportcommit.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ test_expect_success 'use the same checkout for Git and CVS' '
321321
322322
(mkdir shared &&
323323
cd shared &&
324-
unset GIT_DIR &&
324+
sane_unset GIT_DIR &&
325325
cvs co . &&
326326
git init &&
327327
git add " space" &&

t/t9808-git-p4-chdir.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ test_expect_success 'P4CONFIG and absolute dir clone' '
2525
test_when_finished cleanup_git &&
2626
(
2727
P4CONFIG=p4config && export P4CONFIG &&
28-
unset P4PORT P4CLIENT &&
28+
sane_unset P4PORT P4CLIENT &&
2929
"$GITP4" clone --verbose --dest="$git" //depot
3030
)
3131
'
@@ -37,7 +37,7 @@ test_expect_success 'P4CONFIG and relative dir clone' '
3737
test_when_finished cleanup_git &&
3838
(
3939
P4CONFIG=p4config && export P4CONFIG &&
40-
unset P4PORT P4CLIENT &&
40+
sane_unset P4PORT P4CLIENT &&
4141
"$GITP4" clone --verbose --dest="git" //depot
4242
)
4343
'

0 commit comments

Comments
 (0)