This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Update Test-Simple to CPAN version 1.001009
[perl5.git] / cpan / Test-Simple / t / subtest / do.t
diff --git a/cpan/Test-Simple/t/subtest/do.t b/cpan/Test-Simple/t/subtest/do.t
new file mode 100644 (file)
index 0000000..40b9501
--- /dev/null
@@ -0,0 +1,17 @@
+#!/usr/bin/perl -w
+
+# Test the idiom of running another test file as a subtest.
+
+use strict;
+use Test::More;
+
+pass("First");
+
+my $file = "t/subtest/for_do_t.test";
+ok -e $file, "subtest test file exists";
+
+subtest $file => sub { do $file };
+
+pass("Last");
+
+done_testing(4);