Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tag: 0.10
Fetching contributors…

Cannot retrieve contributors at this time

26 lines (19 sloc) 0.593 kB
#!perl
use warnings;
use strict;
use Test::More tests => 6;
BEGIN { use_ok 'App::Twirc::Plugin::SquashWhiteSpace' }
BEGIN {
my $plugin = App::Twirc::Plugin::SquashWhiteSpace->new;
sub call {
my $text = shift;
$plugin->cmd_post((undef) x 3, \$text);
return $text;
}
}
is call('foo bar'), 'foo bar', 'extra space';
is call('foo bar baz'), 'foo bar baz', 'multiple squash';
is call('foo bar baz '), 'foo bar baz ', 'unchanghed';
is call("foo\tbar"), 'foo bar', 'tab';
is call("foo\nbar"), 'foo bar', 'newline';
exit 0;
Jump to Line
Something went wrong with that request. Please try again.