summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/perl/t/lib/texttabs.t
blob: ea9012c6526e6b6e3c7af225a405778e45b72a72 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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";