Skip to content

Commit

Permalink
Move to Test2::V0
Browse files Browse the repository at this point in the history
  • Loading branch information
sanko committed Mar 17, 2024
1 parent 574fb5e commit 8a0c581
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Build.PL
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ my %args = (

test_requires => {
'File::Temp' => '0',
'Test::More' => '0.98',
'Test2::V0' => '0',
},

name => 'Alien-xmake',
Expand Down
1 change: 1 addition & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Revision history for Perl extension Alien::xmake
{{$NEXT}}

- Minor documentation changes
- Move to Test2::V0

0.01 2023-10-02T22:07:51Z

Expand Down
2 changes: 1 addition & 1 deletion META.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"test" : {
"requires" : {
"File::Temp" : "0",
"Test::More" : "0.98"
"Test2::V0" : "0"
}
}
},
Expand Down
3 changes: 2 additions & 1 deletion builder/xmake.pm
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,8 @@ package builder::xmake {
chdir $projectdir;
`./configure` unless -f "$projectdir/makefile";
chdir $cwd; # I really should go to dist base dir
warn 'Building with ' . $make;

#~ warn 'Building with ' . $make;
`$make -C $projectdir`;
`$make -C $projectdir install PREFIX=$share`;
return $share;
Expand Down
2 changes: 1 addition & 1 deletion cpanfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ requires 'File::ShareDir';
requires 'File::Which';
requires 'Module::Build';
on 'test' => sub {
requires 'Test::More', '0.98';
requires 'Test2::V0';
requires 'File::Temp';
};
on 'configure' => sub {
Expand Down
5 changes: 3 additions & 2 deletions t/00_compile.t
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
use strict;
use warnings;
use lib 'lib', '../blib/lib', '../lib';
use Test::More 0.98;
use Test2::V0;
use Env qw[@PATH];
#
use Alien::xmake;
#
diag 'Alien::xmake is a ' . Alien::xmake->install_type . ' install';
diag 'Install type: ' . Alien::xmake->install_type;
unshift @PATH, Alien::xmake->bin_dir;
my $exe = Alien::xmake->exe;
diag 'Path to exe: ' . $exe;
ok $exe, 'xmake is installed as ' . $exe;
diag 'Running `xmake --version`';
my $run = `$exe --version`;
Expand Down
6 changes: 3 additions & 3 deletions t/01_build_cpp.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use strict;
use warnings;
use lib 'lib', '../blib/lib', '../lib';
use Test::More 0.98;
use Test2::V0;
use File::Temp qw[tempdir];
use Env qw[@PATH];
#
Expand All @@ -16,8 +16,8 @@ use Alien::xmake;
system $exe, qw[create --quiet --project=test_cpp --language=c++ --template=console];
ok( ( -d 'test_cpp' ), 'project created' );
chdir 'test_cpp';
TODO: {
local $TODO = 'Require a working compiler'; # outside the scope of Alien::xmake
subtest compile => sub {
my $todo = todo 'Require a working compiler'; # outside the scope of Alien::xmake
diag 'Building project..';
ok !system( $exe, '--quiet' ), 'project built';
my $greeting = `$exe run`;
Expand Down

0 comments on commit 8a0c581

Please sign in to comment.