diff options
author | Stavros Ntentos <stdedos@gmail.com> | 2021-03-26 18:31:46 +0200 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-03-26 21:20:38 +0000 |
commit | 90ca1ac28edb2e8a64c30bb4be723643c646df89 (patch) | |
tree | b67ee541428e1f719b0e0929af447dd29a9e4520 /t | |
parent | 43c43f785aa53607a0dd050989da5d7fd0dcfff4 (diff) | |
download | public-inbox-90ca1ac28edb2e8a64c30bb4be723643c646df89.tar.gz |
I keep copy-pasting the addresses provided, I keep writing my plaintext reply in a file, and I keep forgetting to add a subject (because I am "just" writing a plaintext file) Teach `git-send-email-reply` to append a `--subject` line. [ew: avoid URI-encoded subject on command-line, adjust t/reply.t] Signed-off-by: Stavros Ntentos <133706+stdedos@users.noreply.github.com>
Diffstat (limited to 't')
-rw-r--r-- | t/reply.t | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -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'); |