Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 26 lines (19 sloc) 0.593 kB
01476ea @semifor Plugins: SquashWhiteSpace, BangCommands, SecondaryAccount
authored
1 #!perl
2 use warnings;
3 use strict;
4 use Test::More tests => 6;
5
6 BEGIN { use_ok 'App::Twirc::Plugin::SquashWhiteSpace' }
7
8 BEGIN {
9 my $plugin = App::Twirc::Plugin::SquashWhiteSpace->new;
10
11 sub call {
12 my $text = shift;
13
14 $plugin->cmd_post((undef) x 3, \$text);
15 return $text;
16 }
17 }
18
19 is call('foo bar'), 'foo bar', 'extra space';
20 is call('foo bar baz'), 'foo bar baz', 'multiple squash';
21 is call('foo bar baz '), 'foo bar baz ', 'unchanghed';
22 is call("foo\tbar"), 'foo bar', 'tab';
23 is call("foo\nbar"), 'foo bar', 'newline';
24
25 exit 0;
Something went wrong with that request. Please try again.