diff options
Diffstat (limited to 't/plugins.t')
-rw-r--r-- | t/plugins.t | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/t/plugins.t b/t/plugins.t new file mode 100644 index 0000000..828ad5c --- /dev/null +++ b/t/plugins.t @@ -0,0 +1,23 @@ +#!perl -w + +use strict; + +use Data::Compare; + +print "1..1\n"; + +my $test = 0; + +# Scalar::Properties is the only plugin we know will be present. The plugin +# will even be present if S::P itself isn't installed. +my $plugins = Data::Compare::plugins(); +my %pairs = (); +foreach my $key (keys %{$plugins}) { + foreach(@{$plugins->{$key}}) { + $pairs{"$key <-> $_"} = 1; + $pairs{"$_ <-> $key"} = 1 if($key ne $_); + } +} + +print 'not ' unless($pairs{'[scalar] <-> Scalar::Properties'} && $pairs{'Scalar::Properties <-> Scalar::Properties'} && $pairs{'Scalar::Properties <-> [scalar]'}); +print 'ok '.(++$test)." plugins() function\n"; |