{"thread":{"id":"29606","subject":"[PATCH] t: use sane_unset instead of unset","startedAt":"2012-02-12T01:05:12Z","lastAt":"2012-02-12T01:05:12Z","messageCount":1,"participants":["Ævar Arnfjörð Bjarmason"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"184498","messageId":"1329008712-11572-1-git-send-email-avarab@gmail.com","threadId":"29606","inReplyTo":null,"subject":"[PATCH] t: use sane_unset instead of unset","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2012-02-12T01:05:12Z","receivedAt":"2012-02-12T01:05:12Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Change several tests to use the sane_unset function introduced in\nv1.7.3.1-35-g00648ba instead of the built-in unset function.\n\nThis fixes a failure I was having on t9130-git-svn-authors-file.sh on\nSolaris, and prevents several other issues from occurring.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n t/t4150-am.sh                    |    2 +-\n t/t5560-http-backend-noserver.sh |    6 +++---\n t/t6032-merge-large-rename.sh    |    2 +-\n t/t9130-git-svn-authors-file.sh  |    4 ++--\n t/t9200-git-cvsexportcommit.sh   |    2 +-\n t/t9808-git-p4-chdir.sh          |    4 ++--\n 6 files changed, 10 insertions(+), 10 deletions(-)\n\ndiff --git a/t/t4150-am.sh b/t/t4150-am.sh\nindex 8807b60..f1b60b8 100755\n--- a/t/t4150-am.sh\n+++ b/t/t4150-am.sh\n@@ -136,7 +136,7 @@ test_expect_success setup '\n \tgit format-patch -M --stdout lorem^ >rename-add.patch &&\n \n \t# reset time\n-\tunset test_tick &&\n+\tsane_unset test_tick &&\n \ttest_tick\n '\n \ndiff --git a/t/t5560-http-backend-noserver.sh b/t/t5560-http-backend-noserver.sh\nindex 0ad7ce0..ef98d95 100755\n--- a/t/t5560-http-backend-noserver.sh\n+++ b/t/t5560-http-backend-noserver.sh\n@@ -17,7 +17,7 @@ run_backend() {\n GET() {\n \tREQUEST_METHOD=\"GET\" && export REQUEST_METHOD &&\n \trun_backend \"/repo.git/$1\" &&\n-\tunset REQUEST_METHOD &&\n+\tsane_unset REQUEST_METHOD &&\n \tif ! grep \"Status\" act.out >act\n \tthen\n \t\tprintf \"Status: 200 OK\\r\\n\" >act\n@@ -30,8 +30,8 @@ POST() {\n \tREQUEST_METHOD=\"POST\" && export REQUEST_METHOD &&\n \tCONTENT_TYPE=\"application/x-$1-request\" && export CONTENT_TYPE &&\n \trun_backend \"/repo.git/$1\" \"$2\" &&\n-\tunset REQUEST_METHOD &&\n-\tunset CONTENT_TYPE &&\n+\tsane_unset REQUEST_METHOD &&\n+\tsane_unset CONTENT_TYPE &&\n \tif ! grep \"Status\" act.out >act\n \tthen\n \t\tprintf \"Status: 200 OK\\r\\n\" >act\ndiff --git a/t/t6032-merge-large-rename.sh b/t/t6032-merge-large-rename.sh\nindex fdb6c25..94f010b 100755\n--- a/t/t6032-merge-large-rename.sh\n+++ b/t/t6032-merge-large-rename.sh\n@@ -95,7 +95,7 @@ test_expect_success 'setup large simple rename' '\n '\n \n test_expect_success 'massive simple rename does not spam added files' '\n-\tunset GIT_MERGE_VERBOSITY &&\n+\tsane_unset GIT_MERGE_VERBOSITY &&\n \tgit merge --no-stat simple-rename | grep -v Removing >output &&\n \ttest 5 -gt \"$(wc -l < output)\"\n '\ndiff --git a/t/t9130-git-svn-authors-file.sh b/t/t9130-git-svn-authors-file.sh\nindex b324c49..c3443ce 100755\n--- a/t/t9130-git-svn-authors-file.sh\n+++ b/t/t9130-git-svn-authors-file.sh\n@@ -96,8 +96,8 @@ test_expect_success 'fresh clone with svn.authors-file in config' '\n \t\trm -r \"$GIT_DIR\" &&\n \t\ttest x = x\"$(git config svn.authorsfile)\" &&\n \t\ttest_config=\"$HOME\"/.gitconfig &&\n-\t\tunset GIT_DIR &&\n-\t\tunset GIT_CONFIG &&\n+\t\tsane_unset GIT_DIR &&\n+\t\tsane_unset GIT_CONFIG &&\n \t\tgit config --global \\\n \t\t  svn.authorsfile \"$HOME\"/svn-authors &&\n \t\ttest x\"$HOME\"/svn-authors = x\"$(git config svn.authorsfile)\" &&\ndiff --git a/t/t9200-git-cvsexportcommit.sh b/t/t9200-git-cvsexportcommit.sh\nindex 518358a..b59be9a 100755\n--- a/t/t9200-git-cvsexportcommit.sh\n+++ b/t/t9200-git-cvsexportcommit.sh\n@@ -321,7 +321,7 @@ test_expect_success 'use the same checkout for Git and CVS' '\n \n \t(mkdir shared &&\n \t cd shared &&\n-\t unset GIT_DIR &&\n+\t sane_unset GIT_DIR &&\n \t cvs co . &&\n \t git init &&\n \t git add \" space\" &&\ndiff --git a/t/t9808-git-p4-chdir.sh b/t/t9808-git-p4-chdir.sh\nindex eb8cc95..f002283 100755\n--- a/t/t9808-git-p4-chdir.sh\n+++ b/t/t9808-git-p4-chdir.sh\n@@ -25,7 +25,7 @@ test_expect_success 'P4CONFIG and absolute dir clone' '\n \ttest_when_finished cleanup_git &&\n \t(\n \t\tP4CONFIG=p4config && export P4CONFIG &&\n-\t\tunset P4PORT P4CLIENT &&\n+\t\tsane_unset P4PORT P4CLIENT &&\n \t\t\"$GITP4\" clone --verbose --dest=\"$git\" //depot\n \t)\n '\n@@ -37,7 +37,7 @@ test_expect_success 'P4CONFIG and relative dir clone' '\n \ttest_when_finished cleanup_git &&\n \t(\n \t\tP4CONFIG=p4config && export P4CONFIG &&\n-\t\tunset P4PORT P4CLIENT &&\n+\t\tsane_unset P4PORT P4CLIENT &&\n \t\t\"$GITP4\" clone --verbose --dest=\"git\" //depot\n \t)\n '\n-- \n1.7.9\n"}]}