From 8a0c5810229d65054465b613253b900c93c5d38f Mon Sep 17 00:00:00 2001 From: Sanko Robinson Date: Sat, 16 Mar 2024 20:11:01 -0400 Subject: [PATCH] Move to Test2::V0 --- Build.PL | 2 +- Changes | 1 + META.json | 2 +- builder/xmake.pm | 3 ++- cpanfile | 2 +- t/00_compile.t | 5 +++-- t/01_build_cpp.t | 6 +++--- 7 files changed, 12 insertions(+), 9 deletions(-) diff --git a/Build.PL b/Build.PL index 691a8c1..0e6991b 100644 --- a/Build.PL +++ b/Build.PL @@ -40,7 +40,7 @@ my %args = ( test_requires => { 'File::Temp' => '0', - 'Test::More' => '0.98', + 'Test2::V0' => '0', }, name => 'Alien-xmake', diff --git a/Changes b/Changes index eeaa14b..3a414ef 100644 --- a/Changes +++ b/Changes @@ -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 diff --git a/META.json b/META.json index b0e1be9..caaf8d5 100644 --- a/META.json +++ b/META.json @@ -68,7 +68,7 @@ "test" : { "requires" : { "File::Temp" : "0", - "Test::More" : "0.98" + "Test2::V0" : "0" } } }, diff --git a/builder/xmake.pm b/builder/xmake.pm index f2822e1..99aa611 100644 --- a/builder/xmake.pm +++ b/builder/xmake.pm @@ -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; diff --git a/cpanfile b/cpanfile index 01621ad..57018da 100644 --- a/cpanfile +++ b/cpanfile @@ -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 { diff --git a/t/00_compile.t b/t/00_compile.t index 161d5d4..78eb6b9 100644 --- a/t/00_compile.t +++ b/t/00_compile.t @@ -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`; diff --git a/t/01_build_cpp.t b/t/01_build_cpp.t index 74b30d4..83b2d4a 100644 --- a/t/01_build_cpp.t +++ b/t/01_build_cpp.t @@ -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]; # @@ -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`;