summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruen@suse.de>2006-01-29 22:19:40 +0000
committerAndreas Gruenbacher <agruen@suse.de>2006-01-29 22:19:40 +0000
commit3a595aa79ae4d4d2239ac0a596abe88c863f0289 (patch)
tree3cc3f4b0b4d91288b075dd0c838aab47c3db047c /test
parentf2be7b42347b1a1f83a1c827831df13cc2532c8e (diff)
downloadquilt-3a595aa79ae4d4d2239ac0a596abe88c863f0289.tar.gz
- quilt/mail.in:
+ Add -m and --prefix options so that the mail command can be used without invoking an editor. + Verify that each message generated will have a unique subject. + Verify that the introduction has a subject header. + Fix a bug in the heuristic for adding recipients. + Add a heuristic for extracting subject headers + Clarify some messages. + Add a test case. + Update the documentation.
Diffstat (limited to 'test')
-rw-r--r--test/mail.test85
1 files changed, 85 insertions, 0 deletions
diff --git a/test/mail.test b/test/mail.test
new file mode 100644
index 0000000..a8eaf6b
--- /dev/null
+++ b/test/mail.test
@@ -0,0 +1,85 @@
+ $ rm -rf d
+ $ mkdir -p d/patches
+ $ cd d
+
+ $ cat > no-subject
+ < Here goes a longer description of the patch, which is
+ < totally useless except as a test case for the quilt mail
+ < command. This paragraph is longer than 150 characters so
+ < that it won't be taken for a subject header itself.
+ <
+ < Index: anything
+
+ $ cat no-subject > patches/1.diff
+ $ ls patches/ > series
+ $ quilt mail --mbox mbox --prefix "test" --subject "This is a test" -m "Message"
+ > Unable to extract a subject header from patches/1.diff
+
+ $ cat /dev/stdin no-subject > patches/1.diff
+ < Subject: Subject of 1.diff
+ <
+ < Acked-by: Dummy <dummy@some.where>
+ <
+
+ $ quilt mail --mbox mbox --prefix "test" -m "Message"
+ > Introduction has no subject header
+
+ $ cat /dev/stdin no-subject > patches/2.diff
+ < DESC
+ < Subject of 2.diff
+ < is: split
+ < into multiple
+ < lines
+ < EDESC
+ <
+ < Signed-off-by: Dummy <dummy@some.where>
+ <
+
+ $ cat /dev/stdin no-subject > patches/3.diff
+ < Subject of 3.diff
+ <
+ < To: Dummy <dummy@some.where>
+ <
+
+ $ cat /dev/stdin no-subject > patches/4.diff
+ < First paragraph used as
+ < subject of 4.diff.
+ <
+ < Cc: Dummy <dummy@some.where>
+ <
+
+ $ cat /dev/stdin no-subject > patches/5.diff
+ < Subject of 1.diff
+ <
+
+ $ ls patches/ > series
+ $ quilt mail --mbox mbox --prefix "test" --subject "This is a test" -m "Message"
+ > Patches 1.diff, 5.diff have duplicate subject headers.
+
+ $ cat /dev/stdin no-subject > patches/5.diff
+ < Subject of 5.diff
+ <
+
+ $ quilt mail --mbox mbox --prefix "test" --subject "This is a test" -m "Message"
+ $ grep -e '^Subject:' -e '^To:' -e '^Cc:' -e '^--$' mbox
+ > Subject: [test 0/5] This is a test
+ > --
+ > Cc: Dummy <dummy@some.where>
+ > Subject: [test 1/5] Subject of 1.diff
+ > --
+ > Cc: Dummy <dummy@some.where>
+ > Subject: [test 2/5] Subject of 2.diff is: split into multiple lines
+ > --
+ > To: Dummy <dummy@some.where>
+ > Subject: [test 3/5] Subject of 3.diff
+ > To: Dummy <dummy@some.where>
+ > --
+ > Cc: Dummy <dummy@some.where>
+ > Subject: [test 4/5] First paragraph used as subject of 4.diff.
+ > Cc: Dummy <dummy@some.where>
+ > --
+ > Subject: [test 5/5] Subject of 5.diff
+ > --
+
+ $ cd ..
+ $ rm -rf d