]> git.sesse.net Git - xml-template/commitdiff
Add reference files, and fix a few bugs in the test harness.
authorsgunderson@bigfoot.com <>
Wed, 6 Sep 2006 14:14:34 +0000 (16:14 +0200)
committersgunderson@bigfoot.com <>
Wed, 6 Sep 2006 14:14:34 +0000 (16:14 +0200)
tests/reference/attribute.xml [new file with mode: 0644]
tests/reference/attribute2.xml [new file with mode: 0644]
tests/reference/clone.xml [new file with mode: 0644]
tests/reference/include.xml [new file with mode: 0644]
tests/reference/simple.xml [new file with mode: 0644]
tests/test.sh

diff --git a/tests/reference/attribute.xml b/tests/reference/attribute.xml
new file mode 100644 (file)
index 0000000..ac199bf
--- /dev/null
@@ -0,0 +1,16 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+  <head>
+    <title>Cloning test</title>
+  </head>
+  <body>
+     <p>My favourite color is red; I like that very much.
+       All my favourite things:</p>
+    <ul>
+      <li class="odd">Raindrops on roses</li>
+      <li class="even">Whiskers on kittens</li>
+      <li class="odd">Bright copper kettles</li>
+      <li class="even">Warm, woolen mittens</li>
+    </ul>
+  </body>
+</html>
diff --git a/tests/reference/attribute2.xml b/tests/reference/attribute2.xml
new file mode 100644 (file)
index 0000000..d972834
--- /dev/null
@@ -0,0 +1,16 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+  <head>
+    <title>Cloning test</title>
+  </head>
+  <body>
+     <p>My favourite color is blue; I like that very much.
+       All my favourite things:</p>
+    <ul>
+      <li class="odd">Raindrops on roses</li>
+      <li class="even">Whiskers on kittens</li>
+      <li class="odd">Bright copper kettles</li>
+      <li class="even">Warm, woolen mittens</li>
+    </ul>
+  </body>
+</html>
diff --git a/tests/reference/clone.xml b/tests/reference/clone.xml
new file mode 100644 (file)
index 0000000..9fca40b
--- /dev/null
@@ -0,0 +1,16 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+  <head>
+    <title>Cloning test</title>
+  </head>
+  <body>
+     <p>My favourite color is blue; I like that very much.
+       All my favourite things:</p>
+    <ul>
+      <li>Raindrops on roses</li>
+      <li>Whiskers on kittens</li>
+      <li>Bright copper kettles</li>
+      <li>Warm, woolen mittens</li>
+    </ul>
+  </body>
+</html>
diff --git a/tests/reference/include.xml b/tests/reference/include.xml
new file mode 100644 (file)
index 0000000..0bd8a4c
--- /dev/null
@@ -0,0 +1,19 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+  <head>
+    <title>Main HTML title</title>
+  </head>
+  <body>
+     <h1>Nice heading here</h1>
+     
+     <p>This document is simply being included into another document by
+       means of attaching DOM nodes together. My favourite color is now
+       red.</p>
+
+     <p>Here is a second paragraph.</p>
+
+     <hr />
+
+     <p>Copyright information goes here.</p>
+  </body>
+</html>
diff --git a/tests/reference/simple.xml b/tests/reference/simple.xml
new file mode 100644 (file)
index 0000000..c79813e
--- /dev/null
@@ -0,0 +1,9 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+  <head>
+    <title>A very basic example</title>
+  </head>
+  <body>
+    <p>Hello world!</p>
+  </body>
+</html>
index fb31c5f2de1d12e3d3401085304bcdfc95c13a7d..bbd9ccf4b15993968c69a3d169328db91def4fa0 100755 (executable)
@@ -18,7 +18,7 @@ for L in $LANGUAGES; do
                        python ../python/$T.py > $TEMPFILE
                fi
 
-               ./xml-diff.pl reference/$T.xml 2>/dev/null
+               perl ./xml-diff.pl $TEMPFILE reference/$T.xml 2>/dev/null
                if [ $? = 0 ]; then     
                        echo "passed."
                else