This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
ParseXS - better support for duplicate ALIASes
[perl5.git] / dist / ExtUtils-ParseXS / t / 105-valid_proto_string.t
CommitLineData
bb5e8eb4
JK
1#!/usr/bin/perl
2use strict;
3use warnings;
9c45d80d 4use Test::More tests => 6;
bb5e8eb4
JK
5use ExtUtils::ParseXS::Utilities qw(
6 valid_proto_string
7);
8
9my ($input, $output);
10
11$input = '[\$]';
12$output = valid_proto_string($input);
13is( $output, $input, "Got expected value for <$input>" );
14
15$input = '[$]';
16$output = valid_proto_string($input);
17is( $output, $input, "Got expected value for <$input>" );
18
19$input = '[\$\@]';
20$output = valid_proto_string($input);
21is( $output, $input, "Got expected value for <$input>" );
22
23$input = '[\$alpha]';
24$output = valid_proto_string($input);
25is( $output, 0, "Got expected value for <$input>" );
26
27$input = '[alpha]';
28$output = valid_proto_string($input);
29is( $output, 0, "Got expected value for <$input>" );
9c45d80d
S
30
31$input = '[_]';
32$output = valid_proto_string($input);
33is( $output, $input, "Got expected value for <$input>" );
34