diff options
author | Nicholas Clark <nick@ccl4.org> | 2011-02-23 11:06:46 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2011-02-23 11:06:46 +0000 |
commit | a552ba59669ed0172db3240722c573b7ce317e7b (patch) | |
tree | 42133b0b8e0c810f17cd03d7dcb81d7f1bd258f9 /t | |
parent | c8c139910f0949c2e0a1fa2819c15d4c834fa5cd (diff) | |
download | perl-a552ba59669ed0172db3240722c573b7ce317e7b.tar.gz |
Test that perl.c reports {non_,}bincompat_options in sorted order.
Whilst the actual order doesn't matter semantically, ensuring that they are
always in a sorted order means that string comparison can be used to validate
that two sets of options are identical. This will be useful in the near future
for improved load-time extension compatibility checking.
Diffstat (limited to 't')
-rw-r--r-- | t/porting/bincompat.t | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/t/porting/bincompat.t b/t/porting/bincompat.t new file mode 100644 index 0000000000..f65fe3782f --- /dev/null +++ b/t/porting/bincompat.t @@ -0,0 +1,18 @@ +#!./perl -w +use strict; +require './test.pl'; + +use Config; + +plan(2); + +# Defiantely a white box test... + +# As we need to call it direct, we'll take advantage of its result ordering: +my @to_check = qw(bincompat_options non_bincompat_options); +my @V = map {s/^ //r} Internals::V(); + +while (my ($index, $sub) = each @to_check) { + my $got = join ' ', &{Config->can($sub)}(); + is($got, $V[$index], "C source code has $sub in sorted order"); +} |