t9001 (send-email): Do not use hardcoded /bin/sh in test
Scriptlets used form inside this test began with hardcoded "#!/bin/sh". By setting SHELL_PATH the user is already telling us that what the vendor has in /bin/sh isn't POSIX enough, and we really should try to honor that request. Originally noticed by SungHyun Nam who later tested this patch and verified that it fixes the issue on Solaris 9. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano committed
Jul 17, 2008 at 23:18 UTC
bb3e4f03be815067814624b1e0b2f6de054519cd
1 file changed
+4
-4
t/t9001-send-email.sh
+4
-4
@@ -13,7 +13,7 @@ test_expect_success \
13
14
test_expect_success \
15
'Setup helper tool' \
16
- '(echo "#!/bin/sh"
16
+ '(echo "#!$SHELL_PATH"
17
echo shift
18
echo output=1
19
echo "while test -f commandline\$output; do output=\$((\$output+1)); done"
@@ -138,7 +138,7 @@ test_expect_success 'Valid In-Reply-To when prompting' '
138
'
139
140
test_expect_success 'setup fake editor' '
141
- (echo "#!/bin/sh" &&
141
+ (echo "#!$SHELL_PATH" &&
142
echo "echo fake edit >>\"\$1\""
143
) >fake-editor &&
144
chmod +x fake-editor
@@ -235,7 +235,7 @@ test_expect_success 'sendemail.cc unset' '
235
236
test_expect_success '--compose adds MIME for utf8 body' '
237
clean_fake_sendmail &&
238
- (echo "#!/bin/sh" &&
238
+ (echo "#!$SHELL_PATH" &&
239
echo "echo utf8 body: àéìöú >>\"\$1\""
240
) >fake-editor-utf8 &&
241
chmod +x fake-editor-utf8 &&
@@ -254,7 +254,7 @@ test_expect_success '--compose adds MIME for utf8 body' '
254
255
test_expect_success '--compose respects user mime type' '
256
clean_fake_sendmail &&
257
- (echo "#!/bin/sh" &&
257
+ (echo "#!$SHELL_PATH" &&
258
echo "(echo MIME-Version: 1.0"
259
echo " echo Content-Type: text/plain\\; charset=iso-8859-1"
260
echo " echo Content-Transfer-Encoding: 8bit"