Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
Revision history for Perl extension {{$dist->name}}

{{$NEXT}}
- Fix bug introduced in 1.30 where exports were not happening correctly
in legacy mode (gh#47)

1.30 2025-08-04 14:01:25 -0600
- Documentation improvements (#42)
Expand Down
3 changes: 3 additions & 0 deletions lib/Test/Script.pm
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ sub import {
$ctx->hub->plan('NO PLAN');
}
$ctx->release;
foreach ( @EXPORT ) {
$class->export_to_level(1, $class, $_);
}
}
else
{
Expand Down
31 changes: 31 additions & 0 deletions t/test_script__exports__gh47.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
use Test2::V0 -no_srand => 1;
use Test::Script tests => 1;

# replaces t/01_compile.t

subtest 'expected imports' => sub {
imported_ok $_ for qw(
script_compiles
script_compiles_ok
script_runs
script_stdout_is
script_stdout_isnt
script_stdout_like
script_stdout_unlike
script_stderr_is
script_stderr_isnt
script_stderr_like
script_stderr_unlike
program_runs
program_stdout_is
program_stdout_isnt
program_stdout_like
program_stdout_unlike
program_stderr_is
program_stderr_isnt
program_stderr_like
program_stderr_unlike
);
};

done_testing;
Loading