[z3-checkins] r44983 - z3/deliverance/trunk/deliverance/test-data
ianb at codespeak.net
ianb at codespeak.net
Thu Jul 12 22:49:00 CEST 2007
Author: ianb
Date: Thu Jul 12 22:48:58 2007
New Revision: 44983
Added:
z3/deliverance/trunk/deliverance/test-data/test_xpath_rules.xml
Log:
Added a test that I think should show the problem in #429, that | picks up elements outside of the document
Added: z3/deliverance/trunk/deliverance/test-data/test_xpath_rules.xml
==============================================================================
--- (empty file)
+++ z3/deliverance/trunk/deliverance/test-data/test_xpath_rules.xml Thu Jul 12 22:48:58 2007
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<deliverance-test-suite>
+
+<!-- This tests | in xpath rules, as well as the not-really-xpath ||
+ operator -->
+
+<deliverance-test>
+ <rules xmlns="http://www.plone.org/deliverance">
+ <copy theme=".//div[@id='foo']"
+ content=".//span[@class='bar'] | .//div[@class='foo']" />
+ </rules>
+
+ <theme base="http://example.com">
+ <html><head><title>Blah</title></head>
+ <body>
+ <div></div>
+ <div id="foo">Dummy Content</div>
+ <div class="foo">More Dummy</div>
+ </body></html>
+ </theme>
+
+ <content>
+ <html><body>
+ <div class="bar">Real Content</div>
+ <span class="bar">1</span>
+ <span class="quux">2</span>
+ <p>zzz</p>
+ <div class="foo">3</div>
+ <div class="bar">4</div>
+ </body></html>
+ </content>
+
+ <output>
+ <html><head><title>Blah</title></head><body>
+ <div></div>
+ <div id="foo">
+ <span class="bar">1</span>
+ <div class="foo">3</div>
+ </div>
+ <div class="foo">More Dummy</div>
+ </body></html>
+ </output>
+</deliverance-test>
+
+
+</deliverance-test-suite>
More information about the z3-checkins
mailing list