]> git.sesse.net Git - xml-template/commitdiff
Add a new "attribute-empty" test.
authorSteinar H. Gunderson <sesse@debian.org>
Tue, 3 Oct 2006 23:56:04 +0000 (01:56 +0200)
committerSteinar H. Gunderson <sesse@debian.org>
Tue, 3 Oct 2006 23:56:04 +0000 (01:56 +0200)
perl/attribute-empty.pl [new file with mode: 0644]
tests/reference/attribute-empty.xml [new file with mode: 0644]
tests/test.sh

diff --git a/perl/attribute-empty.pl b/perl/attribute-empty.pl
new file mode 100644 (file)
index 0000000..2183a40
--- /dev/null
@@ -0,0 +1,9 @@
+#! /usr/bin/perl
+use XML::Template;
+
+my $doc = XML::Template::process_file('../xml/clone.xml', {
+       'color' => 'blue',
+       '#things' => XML::Template::alternate('li/class', [
+       ], 'odd', 'even')
+});
+print $doc->toString;
diff --git a/tests/reference/attribute-empty.xml b/tests/reference/attribute-empty.xml
new file mode 100644 (file)
index 0000000..657095a
--- /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>Cloning test</title>
+  </head>
+  <body>
+     <p>My favourite color is blue; I like that very much.
+       All my favourite things:</p>
+    <ul/>
+  </body>
+</html>
index dc166586723799a8af9f6f29c56d714760e53488..b03a657dd8aa076fb9193e2eff06873cbb804934 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 if [ -z "$TESTS" ]; then
-       TESTS="passthru simple clone include attribute attribute2"
+       TESTS="passthru simple clone include attribute attribute2 attribute-empty"
 fi
 if [ -z "$LANGUAGES" ]; then
        LANGUAGES="perl php python"