RIP .travis.yml
[p5sagit/Sub-Name.git] / t / quotes-bug.t
CommitLineData
4cd62f77 1use strict;
2use warnings;
3
4d0e6f3d 4use Test::More;
5use if $ENV{AUTHOR_TESTING}, 'Test::Warnings';
4cd62f77 6use Sub::Name;
7
f9cd47d0 8plan skip_all => 'single quote as a package separator has been removed'
0429db7f 9 if "$]" > 5.041001;
f9cd47d0 10plan skip_all => 'single quote as a package separator has been deprecated'
0429db7f 11 if "$]" > 5.037009;
f9cd47d0 12
4cd62f77 13my $sub = sub { (caller(0))[3] };
14subname "foo::quz'bar::baz", $sub;
15
16# in 0.16, this was foo::quz::ba::baz
17is(
18 $sub->(),
19 "foo::quz::bar::baz",
20 'correctly parsed single quote from name where the last separator is ::',
21);
4d0e6f3d 22
23done_testing;