mirror of
https://github.com/git/git.git
synced 2024-11-01 06:47:52 +01:00
280242d1cc
As long as we do not need to readline from the terminal, we should not barf when starting up the program. Without this patch, t9001 test on Cygwin occasionally died with the following error message: Unable to get Terminal Size. The TIOCGWINSZ ioctl didn't work. The COLUMNS and LINES environment variables didn't work. The resize program didn't work. at /usr/lib/perl5/vendor_perl/5.8/cygwin/Term/ReadKey.pm line 362. Compilation failed in require at /usr/lib/perl5/vendor_perl/5.8/Term/ReadLine/Perl.pm line 58. Acked-by: Ryan Anderson <ryan@michonline.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
44 lines
1 KiB
Bash
Executable file
44 lines
1 KiB
Bash
Executable file
#!/bin/sh
|
|
|
|
test_description='git-send-email'
|
|
. ./test-lib.sh
|
|
|
|
PROG='git send-email'
|
|
test_expect_success \
|
|
'prepare reference tree' \
|
|
'echo "1A quick brown fox jumps over the" >file &&
|
|
echo "lazy dog" >>file &&
|
|
git add file
|
|
GIT_AUTHOR_NAME="A" git commit -a -m "Initial."'
|
|
|
|
test_expect_success \
|
|
'Setup helper tool' \
|
|
'(echo "#!/bin/sh"
|
|
echo shift
|
|
echo for a
|
|
echo do
|
|
echo " echo \"!\$a!\""
|
|
echo "done >commandline"
|
|
echo "cat > msgtxt"
|
|
) >fake.sendmail
|
|
chmod +x ./fake.sendmail
|
|
git add fake.sendmail
|
|
GIT_AUTHOR_NAME="A" git commit -a -m "Second."'
|
|
|
|
test_expect_success 'Extract patches' '
|
|
patches=`git format-patch -n HEAD^1`
|
|
'
|
|
|
|
test_expect_success 'Send patches' '
|
|
git send-email -from="Example <nobody@example.com>" --to=nobody@example.com --smtp-server="$(pwd)/fake.sendmail" $patches 2>errors
|
|
'
|
|
|
|
cat >expected <<\EOF
|
|
!nobody@example.com!
|
|
!author@example.com!
|
|
EOF
|
|
test_expect_success \
|
|
'Verify commandline' \
|
|
'diff commandline expected'
|
|
|
|
test_done
|