]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/reply.t
git-send-email-reply: Append subject
[public-inbox.git] / t / reply.t
index 0b8e1f38f720b6c2e9d631df4c71878d80f2acbf..1e89973e0730c92d346b51f2c66cfda1c4245f32 100644 (file)
--- a/t/reply.t
+++ b/t/reply.t
@@ -36,7 +36,8 @@ my $exp = [
     '--in-reply-to=blah@example.com',
     '--to=from@example.com',
     '--cc=cc@example.com',
-    '--cc=to@example.com'
+    '--cc=to@example.com',
+    "--subject='Re: hihi'"
 ];
 
 is_deeply($arg, $exp, 'default reply is to :all');
@@ -44,7 +45,8 @@ $ibx->{replyto} = ':all';
 ($arg, $link) = PublicInbox::Reply::mailto_arg_link($ibx, $hdr);
 is_deeply($arg, $exp, '":all" also works');
 
-$exp = [ '--in-reply-to=blah@example.com', '--to=primary@example.com' ];
+$exp = [ '--in-reply-to=blah@example.com', '--to=primary@example.com',
+       "--subject='Re: hihi'" ];
 $ibx->{replyto} = ':list';
 ($arg, $link) = PublicInbox::Reply::mailto_arg_link($ibx, $hdr);
 is_deeply($arg, $exp, '":list" works for centralized lists');
@@ -53,7 +55,8 @@ $exp = [
         '--in-reply-to=blah@example.com',
         '--to=primary@example.com',
         '--cc=cc@example.com',
-        '--cc=to@example.com'
+        '--cc=to@example.com',
+       "--subject='Re: hihi'"
 ];
 $ibx->{replyto} = ':list,Cc,To';
 ($arg, $link) = PublicInbox::Reply::mailto_arg_link($ibx, $hdr);
@@ -61,7 +64,9 @@ is_deeply($arg, $exp, '":list,Cc,To" works for kinda centralized lists');
 
 $ibx->{replyto} = 'new@example.com';
 ($arg, $link) = PublicInbox::Reply::mailto_arg_link($ibx, $hdr);
-$exp = [ '--in-reply-to=blah@example.com', '--to=new@example.com' ];
+$exp = [ '--in-reply-to=blah@example.com', '--to=new@example.com',
+       "--subject='Re: hihi'"
+];
 is_deeply($arg, $exp, 'explicit address works, too');
 
 $ibx->{replyto} = ':all';
@@ -71,7 +76,8 @@ $exp = [
     '--in-reply-to=blah@example.com',
     '--to=from@example$(echo .)com',
     '--cc=cc@example$(echo .)com',
-    '--cc=to@example$(echo .)com'
+    '--cc=to@example$(echo .)com',
+    "--subject='Re: hihi'"
 ];
 is_deeply($arg, $exp, 'address obfuscation works');
 is($link, '', 'no mailto: link given');