File: 81-2000.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 (31 lines) | stat: -rw-r--r-- 581 bytes parent folder | download | duplicates (6)
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
#!/usr/bin/env perl
# check access to old schema types

use warnings;
use strict;

use File::Spec;

use lib 'lib', 't';
use TestTools;
use XML::Compile::Schema;
use XML::Compile::Tester;

use Test::More tests => 9;

set_compile_defaults
    elements_qualified => 'NONE';

my $oldns  = 'http://www.w3.org/2000/10/XMLSchema';

my $schema = XML::Compile::Schema->new( <<__SCHEMA );
<schema xmlns="$oldns" targetNamespace="$TestNS"
   xmlns:x="$TestNS">

<element name="test1" type="int" />

</schema>
__SCHEMA
ok(defined $schema);

test_rw($schema, test1 => '<test1>42</test1>', 42);