File: scalar.t

package info (click to toggle)
libautobox-core-perl 1.2-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 328 kB
  • ctags: 161
  • sloc: perl: 567; makefile: 2
file content (28 lines) | stat: -rw-r--r-- 852 bytes parent folder | download | duplicates (5)
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

use Test::More 'no_plan';
use autobox::Core;

is( "this is a test"->title_case, 'This Is A Test');
is( "this is a test"->lc->title_case, 'This Is A Test');

is( "thIS is a teST"->title_case, 'ThIS Is A TeST');
is( "thIS is a teST"->lc->title_case, 'This Is A Test');

is( '    testme'->ltrim, 'testme' );
is( '    testme'->rtrim, '    testme' );
is( '    testme'->trim,  'testme' );

is( 'testme    '->ltrim, 'testme    ' );
is( 'testme    '->rtrim, 'testme' );
is( 'testme    '->trim,  'testme' );

is( '    testme    '->ltrim, 'testme    ' );
is( '    testme    '->rtrim, '    testme' );
is( '    testme    '->trim,  'testme' );

is( '--> testme <--'->ltrim("-><"), ' testme <--' );
is( '--> testme <--'->rtrim("-><"), '--> testme ' );
is( '--> testme <--'->trim("-><"),  ' testme ' );

is( ' --> testme <--'->trim("-><"),  ' --> testme ' );