Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-07-22 23:05:54 +0300
committerJunio C Hamano <gitster@pobox.com>2021-07-22 23:05:54 +0300
commit8de2e2e41b23c466793a67966d20bad67b1263cd (patch)
tree7a75a8466b5fb088537296e424a494f32be8b79f /t/t9001-send-email.sh
parent8f0c15bfb6f23c5afea36d6698dea157d53c0c72 (diff)
parent17530b2ed2eac62706b8bbbcf93f62866f651ffd (diff)
Merge branch 'ab/send-email-optim'
"git send-email" optimization. * ab/send-email-optim: perl: nano-optimize by replacing Cwd::cwd() with Cwd::getcwd() send-email: move trivial config handling to Perl perl: lazily load some common Git.pm setup code send-email: lazily load modules for a big speedup send-email: get rid of indirect object syntax send-email: use function syntax instead of barewords send-email: lazily shell out to "git var" send-email: lazily load config for a big speedup send-email: copy "config_regxp" into git-send-email.perl send-email: refactor sendemail.smtpencryption config parsing send-email: remove non-working support for "sendemail.smtpssl" send-email tests: test for boolean variables without a value send-email tests: support GIT_TEST_PERL_FATAL_WARNINGS=true
Diffstat (limited to 't/t9001-send-email.sh')
-rwxr-xr-xt/t9001-send-email.sh29
1 files changed, 29 insertions, 0 deletions
diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh
index e9dc58f508..57fc10e7f8 100755
--- a/t/t9001-send-email.sh
+++ b/t/t9001-send-email.sh
@@ -1368,6 +1368,16 @@ test_expect_success $PREREQ 'sendemail.identity: bool variable fallback' '
! grep "X-Mailer" stdout
'
+test_expect_success $PREREQ 'sendemail.identity: bool variable without a value' '
+ git -c sendemail.xmailer \
+ send-email \
+ --dry-run \
+ --from="nobody@example.com" \
+ $patches >stdout &&
+ grep "To: default@example.com" stdout &&
+ grep "X-Mailer" stdout
+'
+
test_expect_success $PREREQ '--no-to overrides sendemail.to' '
git send-email \
--dry-run \
@@ -2092,6 +2102,18 @@ test_expect_success $PREREQ '--[no-]xmailer with sendemail.xmailer=true' '
do_xmailer_test 1 "--xmailer"
'
+test_expect_success $PREREQ '--[no-]xmailer with sendemail.xmailer' '
+ test_when_finished "test_unconfig sendemail.xmailer" &&
+ cat >>.git/config <<-\EOF &&
+ [sendemail]
+ xmailer
+ EOF
+ test_config sendemail.xmailer true &&
+ do_xmailer_test 1 "" &&
+ do_xmailer_test 0 "--no-xmailer" &&
+ do_xmailer_test 1 "--xmailer"
+'
+
test_expect_success $PREREQ '--[no-]xmailer with sendemail.xmailer=false' '
test_config sendemail.xmailer false &&
do_xmailer_test 0 "" &&
@@ -2099,6 +2121,13 @@ test_expect_success $PREREQ '--[no-]xmailer with sendemail.xmailer=false' '
do_xmailer_test 1 "--xmailer"
'
+test_expect_success $PREREQ '--[no-]xmailer with sendemail.xmailer=' '
+ test_config sendemail.xmailer "" &&
+ do_xmailer_test 0 "" &&
+ do_xmailer_test 0 "--no-xmailer" &&
+ do_xmailer_test 1 "--xmailer"
+'
+
test_expect_success $PREREQ 'setup expected-list' '
git send-email \
--dry-run \