xref: /openbsd-src/gnu/usr.bin/perl/cpan/Text-Tabs/t/wrap_separator2.t (revision 256a93a44f36679bee503f12e49566c2183f6181)
1*256a93a4Safresh1use strict; use warnings;
2b39c5158Smillert
3*256a93a4Safresh1#Author: Dan Dascalescu
4*256a93a4Safresh1
5*256a93a4Safresh1BEGIN { require './t/lib/ok.pl' }
6b39c5158Smillertuse Text::Wrap;
7b39c5158Smillert
8*256a93a4Safresh1print "1..1\n";
9*256a93a4Safresh1
10b39c5158Smillertlocal $Text::Wrap::columns = 15;
11b39c5158Smillertlocal $Text::Wrap::separator2 = '[N]';
12b39c5158Smillert
13*256a93a4Safresh1ok(wrap('','','some long text here that should be wrapped on at least three lines') eq
14b39c5158Smillert"some long text[N]here that[N]should be[N]wrapped on at[N]least three[N]lines",
15b39c5158Smillert'If you just to preserve existing newlines but add new breaks with something else, set $Text::Wrap::separator2 instead.');
16