Commit 9008666b authored by Julien Lopez's avatar Julien Lopez

Fixes some broken tests

parent 9062d6f1
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="empty">
<xsd:complexType>
<xsd:choice/>
</xsd:complexType>
</xsd:element>
</xsd:schema>
......@@ -35,28 +35,45 @@ EOF
EOF
}
if (-f "$1.xml") {
if ($1 ne "po2") {
if ($1 ne "po2" && $1 ne "regtest/mails_tns" && $1 ne "regtest/model_group") {
print CD <<EOF;
let x = load_xml "$1.xml";;
let y = validate x with X . $root;;
print_xml y;;
EOF
}
else {
elsif ($1 eq "po2") {
print CD <<EOF;
let x = load_xml "$1.xml";;
let _ =
namespace po = "http://www.example.com/PO1" in
let y = validate x with X . po:purchaseOrder in
let y = validate x with X . po:$root in
print_xml y;;
EOF
}
elsif ($1 eq "regtest/mails_tns") {
print CD <<EOF;
let x = load_xml "$1.xml";;
let _ =
namespace cd = "http://www.cduce.org/2003/tests/mails" in
let y = validate x with X . cd:$root in
print_xml y;;
EOF
}
elsif ($1 eq "regtest/model_group") {
print CD <<EOF;
let x = load_xml "$1.xml";;
let content = match x with <_ ..>cont -> cont;;
let y = validate content with X . group1;;
EOF
}
}
close CD;
my $retval = system "$cduce $testfile >> $logfile 2>&1";
if ($? == -1) {
die "Can't execute CDuce (tried $cduce)\n";
} elsif ($? != 0) {
} elsif (($? != 0 && $1 ne "regtest/simple_type_recursion") ||
($? = 0 && $1 eq "regtest/simple_type_recursion")) {
print "E: test failed on $s\n";
$failed_tests .= " $s";
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment