diff options
Diffstat (limited to 'contrib/perl5/t/lib/texttabs.t')
-rwxr-xr-x | contrib/perl5/t/lib/texttabs.t | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/contrib/perl5/t/lib/texttabs.t b/contrib/perl5/t/lib/texttabs.t new file mode 100755 index 000000000000..ea9012c6526e --- /dev/null +++ b/contrib/perl5/t/lib/texttabs.t @@ -0,0 +1,28 @@ +#!./perl + +BEGIN { + chdir 't' if -d 't'; + @INC = '../lib'; +} + +print "1..3\n"; + +use Text::Tabs; + +$tabstop = 4; + +$s1 = "foo\tbar\tb\tb"; +$s2 = expand $s1; +$s3 = unexpand $s2; + +print "not " unless $s2 eq "foo bar b b"; +print "ok 1\n"; + +print "not " unless $s3 eq "foo bar b\tb"; +print "ok 2\n"; + + +$tabstop = 8; + +print "not " unless unexpand(" foo") eq "\t\t foo"; +print "ok 3\n"; |