]> diplodocus.org Git - nmh/blobdiff - test/repl/test-repl
Added oauth switch to whatnow.
[nmh] / test / repl / test-repl
index 0b5b4839f6fa0c3eba5b4e852301fae31df4f82a..20bb96d79e2a12ba4080946925b4db855f3fe0bb 100755 (executable)
@@ -29,13 +29,13 @@ Usage: repl: [+folder] [msg] [switches]
   switches are:
   -[no]group
   -[no]annotate
   switches are:
   -[no]group
   -[no]annotate
-  -cc all|to|cc|me
-  -nocc type
+  -[no]cc all|to|cc|me
   -draftfolder +folder
   -draftmessage msg
   -nodraftfolder
   -editor editor
   -noedit
   -draftfolder +folder
   -draftmessage msg
   -nodraftfolder
   -editor editor
   -noedit
+  -convertargs type argstring
   -fcc folder
   -filter filterfile
   -form formfile
   -fcc folder
   -filter filterfile
   -form formfile
@@ -55,7 +55,7 @@ Usage: repl: [+folder] [msg] [switches]
   -nofmtproc
 EOF
 
   -nofmtproc
 EOF
 
-repl -help >$actual 2>&1
+run_prog repl -help >$actual 2>&1
 check $expected $actual
 
 # check -version
 check $expected $actual
 
 # check -version
@@ -72,7 +72,7 @@ run_test "repl -nonexistent" 'repl: -nonexistent unknown'
 run_test "repl" 'repl: no cur message'
 
 
 run_test "repl" 'repl: no cur message'
 
 
-printf 'Local-Mailbox: mymailbox@localhost\n' >> $MH
+printf 'Local-Mailbox: mymailbox@localhost\n' >> "$MH"
 
 # check -cc me
 cat >$expected <<EOF
 
 # check -cc me
 cat >$expected <<EOF
@@ -81,12 +81,14 @@ To: Test1 <test1@example.com>
 cc: mymailbox@localhost
 Fcc: +outbox
 Subject: Re: Testing message 1
 cc: mymailbox@localhost
 Fcc: +outbox
 Subject: Re: Testing message 1
+In-reply-to: 1@test.nmh
+References: 1@test.nmh
 Comments: In-reply-to Test1 <test1@example.com>
    message dated "Fri, 29 Sep 2006 00:00:00."
 --------
 EOF
 
 Comments: In-reply-to Test1 <test1@example.com>
    message dated "Fri, 29 Sep 2006 00:00:00."
 --------
 EOF
 
-repl -cc me -editor true -nowhatnowproc 1
+run_prog repl -cc me -editor true -nowhatnowproc 1
 check $expected $actual
 
 # check -nocc me
 check $expected $actual
 
 # check -nocc me
@@ -96,17 +98,19 @@ To: Test1 <test1@example.com>
 cc: 
 Fcc: +outbox
 Subject: Re: Testing message 1
 cc: 
 Fcc: +outbox
 Subject: Re: Testing message 1
+In-reply-to: 1@test.nmh
+References: 1@test.nmh
 Comments: In-reply-to Test1 <test1@example.com>
    message dated "Fri, 29 Sep 2006 00:00:00."
 --------
 EOF
 
 Comments: In-reply-to Test1 <test1@example.com>
    message dated "Fri, 29 Sep 2006 00:00:00."
 --------
 EOF
 
-repl -cc me -nocc me -editor true -nowhatnowproc 1
+run_prog repl -cc me -nocc me -editor true -nowhatnowproc 1
 check $expected $actual
 
 # check -cc me with Local- and Alternate-Mailbox addtions, Bug #36635:
 # -nocc me doesn't account for Alternate-Mailboxes.
 check $expected $actual
 
 # check -cc me with Local- and Alternate-Mailbox addtions, Bug #36635:
 # -nocc me doesn't account for Alternate-Mailboxes.
-printf 'Alternate-Mailboxes: user@example.com\n' >> $MH
+printf 'Alternate-Mailboxes: user@example.com\n' >> "$MH"
 
 cat >$expected <<EOF
 From: mymailbox@localhost
 
 cat >$expected <<EOF
 From: mymailbox@localhost
@@ -114,12 +118,14 @@ To: Test1 <test1@example.com>
 cc: mymailbox@localhost
 Fcc: +outbox
 Subject: Re: Testing message 1
 cc: mymailbox@localhost
 Fcc: +outbox
 Subject: Re: Testing message 1
+In-reply-to: 1@test.nmh
+References: 1@test.nmh
 Comments: In-reply-to Test1 <test1@example.com>
    message dated "Fri, 29 Sep 2006 00:00:00."
 --------
 EOF
 
 Comments: In-reply-to Test1 <test1@example.com>
    message dated "Fri, 29 Sep 2006 00:00:00."
 --------
 EOF
 
-repl -cc me -editor true -nowhatnowproc 1
+run_prog repl -cc me -editor true -nowhatnowproc 1
 check $expected $actual
 
 
 check $expected $actual
 
 
@@ -131,12 +137,45 @@ To: Test1 <test1@example.com>
 cc: 
 Fcc: +outbox
 Subject: Re: Testing message 1
 cc: 
 Fcc: +outbox
 Subject: Re: Testing message 1
+In-reply-to: 1@test.nmh
+References: 1@test.nmh
 Comments: In-reply-to Test1 <test1@example.com>
    message dated "Fri, 29 Sep 2006 00:00:00."
 --------
 EOF
 
 Comments: In-reply-to Test1 <test1@example.com>
    message dated "Fri, 29 Sep 2006 00:00:00."
 --------
 EOF
 
-repl -cc me -nocc me -editor true -nowhatnowproc 1
+run_prog repl -cc me -nocc me -editor true -nowhatnowproc 1
+check $expected $actual
+
+
+# check quoting of local part of invalid address, Bug #26780
+cat >`mhpath new` <<EOF
+From: Test11 <test11@example.com>
+To: before_auser@example.com, A. User <auser@example.com>,
+ after_user@example.com
+Date: Fri, 29 Sep 2006 00:00:11
+Message-Id: 11@test.nmh
+Subject: Testing message 11
+
+This is message number 11
+
+EOF
+
+cat >$expected <<EOF
+From: mymailbox@localhost
+To: Test11 <test11@example.com>
+cc: before_auser@example.com, "A. User" <auser@example.com>,
+    after_user@example.com
+Fcc: +outbox
+Subject: Re: Testing message 11
+In-reply-to: 11@test.nmh
+References: 11@test.nmh
+Comments: In-reply-to Test11 <test11@example.com>
+   message dated "Fri, 29 Sep 2006 00:00:11."
+--------
+EOF
+
+run_prog repl -cc to -editor true -nowhatnowproc 11
 check $expected $actual
 
 
 check $expected $actual