home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / perl560.zip / t / lib / texttabs.t < prev    next >
Text File  |  1999-07-20  |  413b  |  29 lines

  1. #!./perl
  2.  
  3. BEGIN {
  4.     chdir 't' if -d 't';
  5.     unshift @INC, '../lib';
  6. }
  7.  
  8. print "1..3\n";
  9.  
  10. use Text::Tabs;
  11.  
  12. $tabstop = 4;
  13.  
  14. $s1 = "foo\tbar\tb\tb";
  15. $s2 = expand $s1;
  16. $s3 = unexpand $s2;
  17.  
  18. print "not " unless $s2 eq "foo bar b   b";
  19. print "ok 1\n";
  20.  
  21. print "not " unless $s3 eq "foo bar b\tb";
  22. print "ok 2\n";
  23.  
  24.  
  25. $tabstop = 8;
  26.  
  27. print "not " unless unexpand("                    foo") eq "\t\t    foo";
  28. print "ok 3\n";
  29.