This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
A typemap is a file, not a directory.
[perl5.git] / dist / ExtUtils-ParseXS / t / 102-trim_whitespace.t
CommitLineData
1d40e528
JK
1#!/usr/bin/perl
2use strict;
3use warnings;
4use Test::More tests => 5;
5use lib qw( lib );
6use ExtUtils::ParseXS::Utilities qw(
7 trim_whitespace
8);
9
10my $str;
11
12$str = 'overworked';
13trim_whitespace($str);
14is( $str, 'overworked', "Got expected value" );
15
16$str = ' overworked';
17trim_whitespace($str);
18is( $str, 'overworked', "Got expected value" );
19
20$str = 'overworked ';
21trim_whitespace($str);
22is( $str, 'overworked', "Got expected value" );
23
24$str = ' overworked ';
25trim_whitespace($str);
26is( $str, 'overworked', "Got expected value" );
27
28$str = "\toverworked";
29trim_whitespace($str);
30is( $str, 'overworked', "Got expected value" );