# Copyright (C) 2023  Alex Schroeder <alex@gnu.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

use Modern::Perl;
use Test::More;
use App::news qw(html_unwrap);

my $wrapped = <<EOT;
Alex wrote:
> I'm once again writing haikus for my unit tests. I'm unsure of I could
> add a season word to this one. Any suggestions?
>
> Short lines drum along
> and fret and shove and push me
> to just shut my mouth

Maybe the short lines push me "to just keep running"?
https://example.poetry.slam is a site that looks interesting.
EOT

my $html = <<EOT;

Alex wrote:
<blockquote>I'm once again writing haikus for my unit tests. I'm unsure of I could
add a season word to this one. Any suggestions?

Short lines drum along
and fret and shove and push me
to just shut my mouth</blockquote>
Maybe the short lines push me "to just keep running"?
<a href="https://example.poetry.slam">https://example.poetry.slam</a> is a site that looks interesting.
EOT

is(html_unwrap($wrapped) . "\n", $html, "mail with quotes");

done_testing;
