From 8829a2755096b018531a1d939e61b6a75d3be8a7 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Wed, 4 Oct 2006 01:56:04 +0200 Subject: [PATCH] Add a new "attribute-empty" test. --- perl/attribute-empty.pl | 9 +++++++++ tests/reference/attribute-empty.xml | 11 +++++++++++ tests/test.sh | 2 +- 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 perl/attribute-empty.pl create mode 100644 tests/reference/attribute-empty.xml diff --git a/perl/attribute-empty.pl b/perl/attribute-empty.pl new file mode 100644 index 0000000..2183a40 --- /dev/null +++ b/perl/attribute-empty.pl @@ -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 index 0000000..657095a --- /dev/null +++ b/tests/reference/attribute-empty.xml @@ -0,0 +1,11 @@ + + + + Cloning test + + +

My favourite color is blue; I like that very much. + All my favourite things:

+