summaryrefslogtreecommitdiffstats
path: root/t/keyword-name.t
diff options
context:
space:
mode:
Diffstat (limited to 't/keyword-name.t')
-rw-r--r--t/keyword-name.t25
1 files changed, 25 insertions, 0 deletions
diff --git a/t/keyword-name.t b/t/keyword-name.t
new file mode 100644
index 0000000..8ab2f44
--- /dev/null
+++ b/t/keyword-name.t
@@ -0,0 +1,25 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use Test::More;
+
+BEGIN {
+ package My::Parser;
+ use Exporter 'import';
+ our @EXPORT = 'foo';
+
+ use Parse::Keyword { foo => \&parse_foo };
+
+ sub foo { $_[0] }
+ sub parse_foo {
+ my ($keyword) = @_;
+ return sub { uc($keyword) };
+ }
+
+ $INC{'My/Parser.pm'} = __FILE__;
+}
+
+use My::Parser;
+is(foo, 'FOO');
+
+done_testing;