Commit | Line | Data |
---|---|---|
bb5e8eb4 JK |
1 | #!/usr/bin/perl |
2 | use strict; | |
3 | use warnings; | |
9c45d80d | 4 | use Test::More tests => 6; |
bb5e8eb4 JK |
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>" ); | |
9c45d80d S |
30 | |
31 | $input = '[_]'; | |
32 | $output = valid_proto_string($input); | |
33 | is( $output, $input, "Got expected value for <$input>" ); | |
34 |