summaryrefslogtreecommitdiff
path: root/t/porting/regen.t
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2010-09-28 16:50:26 +0100
committerNicholas Clark <nick@ccl4.org>2010-09-28 16:50:26 +0100
commit3879ea51d63e30f393172fcd711bc89f88997019 (patch)
tree53e01b81dbbff025a2182461c86ac0dc443aa37e /t/porting/regen.t
parentbd6920d7fd435edce8cd45d53f46b2a0ca0f5663 (diff)
downloadperl-3879ea51d63e30f393172fcd711bc89f88997019.tar.gz
A test to check that regen.pl doesn't need running.
We can't run regen.pl as part of the build, as we'd end up with a circular dependency between the headers and miniperl.
Diffstat (limited to 't/porting/regen.t')
-rw-r--r--t/porting/regen.t23
1 files changed, 23 insertions, 0 deletions
diff --git a/t/porting/regen.t b/t/porting/regen.t
new file mode 100644
index 0000000000..9699d5571a
--- /dev/null
+++ b/t/porting/regen.t
@@ -0,0 +1,23 @@
+#!./perl -w
+
+# Verify that all files generated by perl scripts are up to date.
+
+my ($in_t, $lib);
+
+BEGIN {
+ $in_t = -f 'TEST' && -f '../regen.pl';
+ $lib = $in_t ? '../lib' : 'lib';
+ unshift @INC, $lib;
+}
+
+use strict;
+
+use File::Spec::Functions 'rel2abs';
+$^X = rel2abs($^X);
+$ENV{PERL5LIB} = rel2abs($lib);
+
+chdir '..' if $in_t;
+
+print "1..17\n"; # I can't see a clean way to calculate this automatically.
+
+system "$^X regen.pl --tap";