File: elide.t

package info (click to toggle)
libstring-escape-perl 2002.001-8
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 76 kB
  • ctags: 23
  • sloc: perl: 187; makefile: 45
file content (19 lines) | stat: -rwxr-xr-x 409 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/perl

use strict;
use Test;
BEGIN { plan tests => 4, todo => [] }

use String::Escape qw( elide );

my ( $original, $altered, $comparison );

$original = "Now is the time for all good folk to party.";

ok( elide( $original, 10 ) eq 'Now is...');

ok( elide( $original, 15 ) eq 'Now is the...');

ok( elide( $original, 10, 0 ) eq 'Now is ...');

ok( elide( $original, 15, 0 ) eq 'Now is the t...');