diff --git a/flake.nix b/flake.nix index de4f29c5..08783bbc 100644 --- a/flake.nix +++ b/flake.nix @@ -126,6 +126,7 @@ EmailMIME EmailSender FileSlurp + FileWhich IOCompress IPCRun JSON @@ -145,6 +146,7 @@ TermSizeAny TestMore TextDiff + Test2Harness TextTable XMLSimple YAML diff --git a/tests/Makefile.am b/tests/Makefile.am index b0881bce..f5a92239 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -26,7 +26,7 @@ EXTRA_DIST = \ TESTS = \ set-up.pl \ - evaluation-tests.pl \ + test.pl \ tear-down.pl check_SCRIPTS = repos diff --git a/tests/evaluation-tests.pl b/tests/evaluation.t similarity index 100% rename from tests/evaluation-tests.pl rename to tests/evaluation.t diff --git a/tests/Setup.pm b/tests/lib/Setup.pm similarity index 100% rename from tests/Setup.pm rename to tests/lib/Setup.pm diff --git a/tests/test.pl b/tests/test.pl new file mode 100644 index 00000000..fc5b215a --- /dev/null +++ b/tests/test.pl @@ -0,0 +1,24 @@ +#!/usr/bin/env perl +# HARNESS-NO-PRELOAD +# HARNESS-CAT-LONG +# THIS IS A GENERATED YATH RUNNER TEST +use strict; +use warnings; + +use lib 'lib'; +BEGIN { + use File::Which qw(which); + $App::Yath::Script::SCRIPT = which 'yath'; +} +use App::Yath::Util qw/find_yath/; + +system($^X, find_yath(), '-D', 'test', '--default-search' => './', @ARGV); +my $exit = $?; + +# This makes sure it works with prove. +print "1..1\n"; +print "not " if $exit; +print "ok 1 - Passed tests when run by yath\n"; +print STDERR "yath exited with $exit" if $exit; + +exit($exit ? 255 : 0);