File: 01use.t

package info (click to toggle)
libxml-compile-perl 1.64-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,304 kB
  • sloc: perl: 11,616; makefile: 7
file content (75 lines) | stat: -rw-r--r-- 1,955 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#!/usr/bin/env perl

use warnings;
use strict;

use lib 'lib';
use Test::More tests => 13;

# The versions of the following packages are reported to help understanding
# the environment in which the tests are run.  This is certainly not a
# full list of all installed modules.
my @show_versions =
 qw/Test::More
    Test::Deep
    Log::Report
    Math::BigInt
    String::Print
    XML::LibXML
    XML::Compile
    XML::Compile::SOAP
    XML::Compile::Tester
    XML::Compile::Dumper
    XML::Compile::Cache
   /;

foreach my $package (@show_versions)
{   eval "require $package";

    no strict 'refs';
    my $report
      = !$@    ? "version ". (${"$package\::VERSION"} || 'unknown')
      : $@ =~ m/^Can't locate/ ? "not installed"
      : "reports error";

    warn "$package $report\n";
}

my $xml2_version = XML::LibXML::LIBXML_DOTTED_VERSION();
warn "libxml2 $xml2_version\n";

my ($major,$minor,$rev) = split /\./, $xml2_version;
if(  $major < 2
 || ($major==2 && $minor < 6)
 || ($major==2 && $minor==6 && $rev < 23))
{   warn <<__WARN;

*
* WARNING:
* Your libxml2 version ($xml2_version) is quite old: you may
* have failing tests and poor functionality.
*
* Please install a new version of the library AND reinstall the
* XML::LibXML module.  Otherwise, you may need to install this
* module with force.
*

__WARN

    warn "Press enter to continue with the tests: \n";
    <STDIN>;
}

require_ok('XML::Compile');
require_ok('XML::Compile::Iterator');
require_ok('XML::Compile::Schema');
require_ok('XML::Compile::Schema::BuiltInFacets');
require_ok('XML::Compile::Schema::BuiltInTypes');
require_ok('XML::Compile::Schema::Instance');
require_ok('XML::Compile::Schema::NameSpaces');
require_ok('XML::Compile::Schema::Specs');
require_ok('XML::Compile::Translate');
require_ok('XML::Compile::Translate::Reader');
require_ok('XML::Compile::Translate::Writer');
require_ok('XML::Compile::Translate::Template');
require_ok('XML::Compile::Util');