]> git.sesse.net Git - xml-template/commitdiff
Add a trivial new “pass through” test.
authorsgunderson@bigfoot.com <>
Wed, 6 Sep 2006 14:45:12 +0000 (16:45 +0200)
committersgunderson@bigfoot.com <>
Wed, 6 Sep 2006 14:45:12 +0000 (16:45 +0200)
perl/passthru.pl [new file with mode: 0644]
php/passthru.php [new file with mode: 0644]
python/passthru.py [new file with mode: 0644]
tests/reference/passthru.xml [new file with mode: 0644]
tests/test.sh
xml/passthru.xml [new file with mode: 0644]

diff --git a/perl/passthru.pl b/perl/passthru.pl
new file mode 100644 (file)
index 0000000..2143306
--- /dev/null
@@ -0,0 +1,5 @@
+#! /usr/bin/perl
+use XML::Template;
+
+my $doc = XML::Template::process_file('../xml/passthru.xml', {});
+print $doc->toString;
diff --git a/php/passthru.php b/php/passthru.php
new file mode 100644 (file)
index 0000000..95dd1be
--- /dev/null
@@ -0,0 +1,6 @@
+<?php
+require('xml-template.php');
+
+$doc = XML_Template_process_file('../xml/passthru.xml', array()); 
+print $doc->dump_mem();
+?>
diff --git a/python/passthru.py b/python/passthru.py
new file mode 100644 (file)
index 0000000..1d7dd81
--- /dev/null
@@ -0,0 +1,5 @@
+#! /usr/bin/python
+import xmltemplate
+
+doc = xmltemplate.process_file("../xml/passthru.xml", {})
+print doc.toxml()
diff --git a/tests/reference/passthru.xml b/tests/reference/passthru.xml
new file mode 100644 (file)
index 0000000..69d0bfb
--- /dev/null
@@ -0,0 +1,11 @@
+<!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>An extremely simple test</title>
+  </head>
+  <body>
+    <p>This should just pass through without any errors at all.</p>
+  </body>
+</html>
index 14f26a9bacc7b2520b19db4c7ad2d1da5f49f2d3..2587b4451646bc1c8e564abae8323572222ed2b0 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
 
-TESTS="simple clone include attribute attribute2"
+TESTS="passthru simple clone include attribute attribute2"
 LANGUAGES="perl php python"
 
 for L in $LANGUAGES; do
diff --git a/xml/passthru.xml b/xml/passthru.xml
new file mode 100644 (file)
index 0000000..69d0bfb
--- /dev/null
@@ -0,0 +1,11 @@
+<!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>An extremely simple test</title>
+  </head>
+  <body>
+    <p>This should just pass through without any errors at all.</p>
+  </body>
+</html>