git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Karl Hasselström" <kha@treskal.com>
To: Catalin Marinas <catalin.marinas@gmail.com>
Cc: git@vger.kernel.org
Subject: [StGIT PATCH 2/2] Regression test for "stg mail"
Date: Sun, 12 Nov 2006 22:15:57 +0100	[thread overview]
Message-ID: <20061112211556.19362.68287.stgit@localhost> (raw)
In-Reply-To: <20061112211434.19362.66077.stgit@localhost>

From: Karl Hasselström <kha@treskal.com>



Signed-off-by: Karl Hasselström <kha@treskal.com>
---

 t/t1900-mail.sh |   34 ++++++++++++++++++++++++++++++++++
 1 files changed, 34 insertions(+), 0 deletions(-)

diff --git a/t/t1900-mail.sh b/t/t1900-mail.sh
new file mode 100755
index 0000000..6a950b4
--- /dev/null
+++ b/t/t1900-mail.sh
@@ -0,0 +1,34 @@
+#!/bin/sh
+# Copyright (c) 2006 Karl Hasselström
+test_description='Test the mail command'
+. ./test-lib.sh
+
+test_expect_success \
+    'Initialize the StGIT repository' \
+    '
+    for i in 1 2 3 4 5; do
+      touch foo.txt &&
+      echo "line $i" >> foo.txt &&
+      git add foo.txt &&
+      git commit -a -m "Patch $i"
+    done &&
+    stg init &&
+    stg uncommit -n 5 foo
+    '
+
+test_expect_success \
+    'Put all the patches in an mbox' \
+    'stg mail --to="Inge Ström <inge@example.com>" -a -m \
+       -t ../../templates/patchmail.tmpl > mbox0'
+
+test_expect_success \
+    'Import the mbox and compare' \
+    '
+    t1=$(git cat-file -p $(stg id) | grep ^tree)
+    stg pop -a &&
+    stg import -M mbox0 &&
+    t2=$(git cat-file -p $(stg id) | grep ^tree) &&
+    [ "$t1" == "$t2" ]
+    '
+

  parent reply	other threads:[~2006-11-12 21:16 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-01  9:00 [PATCH] Allow hand-editing of patches before sending Karl Hasselström
2006-11-02 10:32 ` Catalin Marinas
2006-11-02 11:36   ` Karl Hasselström
2006-11-03  9:39     ` Catalin Marinas
2006-11-03  9:58       ` Karl Hasselström
2006-11-03 10:01         ` Karl Hasselström
2006-11-03 10:21           ` Petr Baudis
2006-11-03 10:31             ` Robin Rosenberg
2006-11-03 10:36             ` Andreas Ericsson
2006-11-03 10:53               ` Karl Hasselström
2006-11-03 11:21                 ` Junio C Hamano
2006-11-03 11:35                   ` Karl Hasselström
2006-11-03 12:56                   ` Catalin Marinas
2006-11-03 12:07           ` Andy Whitcroft
2006-11-03 12:36             ` Karl Hasselström
2006-11-03 14:03             ` Andy Whitcroft
2006-11-03 18:48               ` Linus Torvalds
2006-11-05 11:43                 ` Karl Hasselström
2006-11-05 16:44                   ` Linus Torvalds
2006-11-05 19:04                     ` Karl Hasselström
2006-11-05 19:29                       ` Jakub Narebski
2006-11-06  7:45                         ` [PATCH] Add a MIME-Version header to e-mails Karl Hasselström
2006-11-06  7:56                           ` Karl Hasselström
2006-11-07  9:53                           ` Catalin Marinas
2006-11-07 19:09                             ` Catalin Marinas
2006-11-08  8:40                               ` Karl Hasselström
2006-11-08  9:41                                 ` Catalin Marinas
2006-11-08 10:01                                   ` Karl Hasselström
2006-11-08 10:12                                     ` Catalin Marinas
2006-11-12 21:14                                       ` [StGIT PATCH 0/2] mail and import tests Karl Hasselström
2006-11-12 21:15                                         ` [StGIT PATCH 1/2] Regression test for "stg import" Karl Hasselström
2006-11-12 21:15                                         ` Karl Hasselström [this message]
2006-11-11 12:24                               ` [PATCH] Add a MIME-Version header to e-mails Karl Hasselström
2006-11-16 17:24                                 ` Catalin Marinas
2006-11-03 12:44         ` [PATCH] Allow hand-editing of patches before sending Catalin Marinas
2006-11-03 13:02           ` Karl Hasselström
2006-11-03 13:16             ` Catalin Marinas
2006-11-03 13:25               ` Karl Hasselström
2006-11-03 13:25             ` Catalin Marinas
2006-11-03 13:33               ` Karl Hasselström
2006-11-03 13:42                 ` Karl Hasselström
2006-11-03 13:56                 ` Catalin Marinas
2006-11-03 14:37                   ` Catalin Marinas
2006-11-03 13:39               ` Petr Baudis
2006-11-03 14:01                 ` Catalin Marinas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20061112211556.19362.68287.stgit@localhost \
    --to=kha@treskal.com \
    --cc=catalin.marinas@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).