From: sgunderson@bigfoot.com <> Date: Thu, 22 Sep 2011 21:11:12 +0000 (+0200) Subject: Add most of the remaining php5-swig tests. Most succeed, but not all. X-Git-Url: https://git.sesse.net/?p=xml-template;a=commitdiff_plain;h=933565bfd7b14e26bf9dbc2afc7271e28ec34398 Add most of the remaining php5-swig tests. Most succeed, but not all. --- diff --git a/php5-swig/attribute-empty.php b/php5-swig/attribute-empty.php new file mode 100644 index 0000000..5a33f63 --- /dev/null +++ b/php5-swig/attribute-empty.php @@ -0,0 +1,13 @@ + 'blue', + '#things' => array(NULL) +), true); +output_to_fd_and_free($doc, 1); +?> diff --git a/php5-swig/attribute.php b/php5-swig/attribute.php new file mode 100644 index 0000000..fa5a0df --- /dev/null +++ b/php5-swig/attribute.php @@ -0,0 +1,14 @@ + 'red', + '#things' => array( + array( 'li' => 'Raindrops on roses', 'li/class' => 'odd' ), + array( 'li' => 'Whiskers on kittens', 'li/class' => 'even' ), + array( 'li' => 'Bright copper kettles', 'li/class' => 'odd' ), + array( 'li' => 'Warm, woolen mittens', 'li/class' => 'even' ) + ) +), true); +output_to_fd_and_free($doc, 1); +?> diff --git a/php5-swig/attribute2.php b/php5-swig/attribute2.php new file mode 100644 index 0000000..adcad31 --- /dev/null +++ b/php5-swig/attribute2.php @@ -0,0 +1,14 @@ + 'blue', + '#things' => XML_Template_alternate('li/class', array( + array( 'li' => 'Raindrops on roses' ), + array( 'li' => 'Whiskers on kittens' ), + array( 'li' => 'Bright copper kettles' ), + array( 'li' => 'Warm, woolen mittens' ), + ), array('odd', 'even')) +), true); +output_to_fd_and_free($doc, 1); +?> diff --git a/php5-swig/attribute3.php b/php5-swig/attribute3.php new file mode 100644 index 0000000..8b84e7d --- /dev/null +++ b/php5-swig/attribute3.php @@ -0,0 +1,15 @@ + 'blue', + '#things' => XML_Template_alternate('li/class', array( + array( 'li' => 'Raindrops on roses' ), + array( 'li' => 'Whiskers on kittens' ), + NULL, + array( 'li' => 'Bright copper kettles' ), + array( 'li' => 'Warm, woolen mittens' ), + ), array('odd', 'even')) +), true); +output_to_fd_and_free($doc, 1); +?> diff --git a/php5-swig/include.php b/php5-swig/include.php new file mode 100644 index 0000000..5e3ff4e --- /dev/null +++ b/php5-swig/include.php @@ -0,0 +1,13 @@ + 'red' +), 0); +$master = process_file('../xml/master.xml', array( + 'title' => 'Main HTML title', + 'h1' => 'Nice heading here', + 'contents' => $doc +), true); +output_to_fd_and_free($doc, 1); +?> diff --git a/php5-swig/namespace.php b/php5-swig/namespace.php new file mode 100644 index 0000000..1dfc9b9 --- /dev/null +++ b/php5-swig/namespace.php @@ -0,0 +1,12 @@ + 'Namespace tests', + '#hello' => 'Hello world!', + '#test' => 'Replaced.', + 'tagname' => 'foo', + '#moretest' => 'bar' +), true); +output_to_fd_and_free($doc, 1); +?> diff --git a/php5-swig/namespace2.php b/php5-swig/namespace2.php new file mode 100644 index 0000000..a4c4426 --- /dev/null +++ b/php5-swig/namespace2.php @@ -0,0 +1,9 @@ + 'Namespace tests', + '#hello' => 'Replaced.', +), true); +output_to_fd_and_free($doc, 1); +?> diff --git a/php5-swig/structure.php b/php5-swig/structure.php new file mode 100644 index 0000000..c3a684e --- /dev/null +++ b/php5-swig/structure.php @@ -0,0 +1,12 @@ + array( + array( '#inner' => 'One' ), + array( '#inner' => 'Two' ), + array( '#inner' => 'Three' ), + ) +), true); +output_to_fd_and_free($doc, 1); +?>