aboutsummaryrefslogtreecommitdiff
path: root/t/t9001-send-email.sh
Commit message (Collapse)AuthorAge
* tests: use "git xyzzy" form (t7200 - t9001)Nanako Shiraishi2008-09-03
| | | | | | | Converts tests between t7201-t9001. Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* t9001 (send-email): Do not use hardcoded /bin/sh in testJunio C Hamano2008-07-19
| | | | | | | | | | | | 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>
* t/: Use "test_must_fail git" instead of "! git"Stephan Beyer2008-07-13
| | | | | | | | | | | | | | | This patch changes every occurrence of "! git" -- with the meaning that a git call has to gracefully fail -- into "test_must_fail git". This is useful to - make sure the test does not fail because of a signal, e.g. SIGSEGV, and - advertise the use of "test_must_fail" for new tests. Signed-off-by: Stephan Beyer <s-beyer@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'jk/maint-send-email-compose'Junio C Hamano2008-05-21
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jk/maint-send-email-compose: send-email: rfc2047-quote subject lines with non-ascii characters send-email: specify content-type of --compose body Conflicts: t/t9001-send-email.sh Due to 065096c (git-send-email.perl: Handle shell metacharacters in $EDITOR properly, 2008-05-04) which is a backward incompatible change (but it makes handling of EDITOR consistent with other parts of the system), the test script t9001 had to be adjusted. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * send-email: rfc2047-quote subject lines with non-ascii charactersJeff King2008-05-21
| | | | | | | | | | | | | | | | | | | | | | We always use 'utf-8' as the encoding, since we currently have no way of getting the information from the user. This also refactors the quoting of recipient names, since both processes can share the rfc2047 quoting code. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * send-email: specify content-type of --compose bodyJeff King2008-05-21
| | | | | | | | | | | | | | | | | | | | | | If the compose message contains non-ascii characters, then we assume it is in utf-8 and include the appropriate MIME headers. If the user has already included a MIME-Version header, then we assume they know what they are doing and don't add any headers. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'bd/tests'Junio C Hamano2008-05-14
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bd/tests: Rename the test trash directory to contain spaces. Fix tests breaking when checkout path contains shell metacharacters Don't use the 'export NAME=value' in the test scripts. lib-git-svn.sh: Fix quoting issues with paths containing shell metacharacters test-lib.sh: Fix some missing path quoting Use test_set_editor in t9001-send-email.sh test-lib.sh: Add a test_set_editor function to safely set $VISUAL git-send-email.perl: Handle shell metacharacters in $EDITOR properly config.c: Escape backslashes in section names properly git-rebase.sh: Fix --merge --abort failures when path contains whitespace Conflicts: t/t9115-git-svn-dcommit-funky-renames.sh
| * | Use test_set_editor in t9001-send-email.shBryan Donlan2008-05-05
| | | | | | | | | | | | | | | Signed-off-by: Bryan Donlan <bdonlan@fushizen.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | git-send-email.perl: Handle shell metacharacters in $EDITOR properlyBryan Donlan2008-05-05
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the git-send-perl semantics for launching an editor when $GIT_EDITOR (or friends) contains shell metacharacters to match launch_editor() in builtin-tag.c. If we use the current approach (sh -c '$0 $@' "$EDITOR" files ...), we see it fails when $EDITOR has shell metacharacters: $ sh -x -c '$0 $@' "$VISUAL" "foo" + "$FAKE_EDITOR" foo "$FAKE_EDITOR": 1: "$FAKE_EDITOR": not found Whereas builtin-tag.c will invoke sh -c "$EDITOR \"$@\"". Thus, this patch changes git-send-email.perl to use the same method as the C utilities, and additionally updates t/t9001-send-email.sh to test for this bug. Signed-off-by: Bryan Donlan <bdonlan@fushizen.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Add tests for sendemail.cc configuration variableMiklos Vajna2008-04-29
|/ | | | | Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* add test_cmp function for test scriptsJeff King2008-03-13
| | | | | | | | | | | | | | | | | | | Many scripts compare actual and expected output using "diff -u". This is nicer than "cmp" because the output shows how the two differ. However, not all versions of diff understand -u, leading to unnecessary test failure. This adds a test_cmp function to the test scripts and switches all "diff -u" invocations to use it. The function uses the contents of "$GIT_TEST_CMP" to compare its arguments; the default is "diff -u". On systems with a less-capable diff, you can do: GIT_TEST_CMP=cmp make test Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* send-email: test compose functionalityJeff King2008-02-24
| | | | | | | | This is just a basic sanity check that --compose works at all. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* t9001: enhance fake sendmail test harnessJeff King2008-02-24
| | | | | | | | | | | Previously, the fake.sendmail test harness would write its output to a hardcoded file, allowing only a single message to be tested. Instead, let's have it save the messages for all of its invocations so that we can see which messages were sent, and in which order. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* send-email: fix In-Reply-To regressionJay Soffian2008-02-21
| | | | | | | | | | | | | | | | | Fix a regression introduced by 1ca3d6e (send-email: squelch warning due to comparing undefined $_ to "") where if the user was prompted for an initial In-Reply-To and didn't provide one, messages would be sent out with an invalid In-Reply-To of "<>" Also add test cases for the regression and the fix. A small modification was needed to allow send-email to take its replies from stdin if the environment variable GIT_SEND_EMAIL_NOTTY is set. Signed-off-by: Jay Soffian <jaysoffian@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* t9001: add missing && operatorsJeff King2008-01-28
| | | | | | | | The exit value of some commands was not being used for the test output. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* send-email: add no-validate optionJeff King2008-01-18
| | | | | | | | | | Since we are now sanity-checking the contents of patches and refusing to send ones with long lines, this knob provides a way for the user to override the new behavior (if, e.g., he knows his SMTP path will handle it). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* send-email: validate patches before sending anythingJeff King2008-01-18
| | | | | | | | | | | | | | We try to catch errors early so that we don't end up sending half of a broken patch series. Right now the only validation is checking that line-lengths are under the SMTP-mandated limit of 998. The validation parsing is very crude (it just checks each line length without understanding the mailbox format) but should work fine for this simple check. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git-send-email: show all headers when sending mailDavid D. Kilzer2007-11-19
| | | | | | | | | | | | | | As a git newbie, it was confusing to set an In-Reply-To header but then not see it printed when the git-send-email command was run. This patch prints all headers that would be sent to sendmail or an SMTP server instead of only printing From, Subject, Cc, To. It also removes the now-extraneous Date header after the "Log says" line. Added test to t/t9001-send-email.sh. Signed-off-by: David D. Kilzer <ddkilzer@kilzer.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Fixed minor typo in t/t9001-send-email.sh test command line.Glenn Rempe2007-09-24
| | | | | | | The git-send-email command line in the test was missing a single hyphen. Signed-off-by: Glenn Rempe <glenn@rempe.us> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* send-email: do not barf when Term::ReadLine does not like your terminalJunio C Hamano2006-07-03
| | | | | | | | | | | | | 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>
* send-email: do not pass bogus address to local sendmail binaryJunio C Hamano2006-05-30
| | | | | | | This makes t9001 test happy. Also fixes the warning on uninitialized $references variable again. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Add a basic test case for git send-email, and fix some real bugs discovered.Ryan Anderson2006-05-29
Signed-off-by: Ryan Anderson <rda@google.com> Signed-off-by: Junio C Hamano <junkio@cox.net>