Debian Codegraph @

dist/ExtUtils-ParseXS/t/105-valid_proto_string.t

raw
1 #!/usr/bin/perl
2 use strict;
3 use warnings;
4 use Test::More tests => 6;
5 use ExtUtils::ParseXS::Utilities qw(
6 valid_proto_string
7 );
8
9 my ($input, $output);
10
11 $input = '[\$]';
12 $output = valid_proto_string($input);
13 is( $output, $input, "Got expected value for <$input>" );
14
15 $input = '[$]';
16 $output = valid_proto_string($input);
17 is( $output, $input, "Got expected value for <$input>" );
18
19 $input = '[\$\@]';
20 $output = valid_proto_string($input);
21 is( $output, $input, "Got expected value for <$input>" );
22
23 $input = '[\$alpha]';
24 $output = valid_proto_string($input);
25 is( $output, 0, "Got expected value for <$input>" );
26
27 $input = '[alpha]';
28 $output = valid_proto_string($input);
29 is( $output, 0, "Got expected value for <$input>" );
30
31 $input = '[_]';
32 $output = valid_proto_string($input);
33 is( $output, $input, "Got expected value for <$input>" );
34