summaryrefslogtreecommitdiff
path: root/src/zope/pagetemplate/tests/input
diff options
context:
space:
mode:
Diffstat (limited to 'src/zope/pagetemplate/tests/input')
-rw-r--r--src/zope/pagetemplate/tests/input/__init__.py2
-rw-r--r--src/zope/pagetemplate/tests/input/checknotexpression.html9
-rw-r--r--src/zope/pagetemplate/tests/input/checknothing.html7
-rw-r--r--src/zope/pagetemplate/tests/input/checkpathalt.html17
-rw-r--r--src/zope/pagetemplate/tests/input/checkpathnothing.html7
-rw-r--r--src/zope/pagetemplate/tests/input/checkwithxmlheader.html5
-rw-r--r--src/zope/pagetemplate/tests/input/dtml1.html19
-rw-r--r--src/zope/pagetemplate/tests/input/dtml3.html33
-rw-r--r--src/zope/pagetemplate/tests/input/globalsshadowlocals.html14
-rw-r--r--src/zope/pagetemplate/tests/input/loop1.html15
-rw-r--r--src/zope/pagetemplate/tests/input/stringexpression.html7
-rw-r--r--src/zope/pagetemplate/tests/input/teeshop1.html87
-rw-r--r--src/zope/pagetemplate/tests/input/teeshop2.html5
-rw-r--r--src/zope/pagetemplate/tests/input/teeshoplaf.html73
-rw-r--r--src/zope/pagetemplate/tests/input/translation.html2
15 files changed, 302 insertions, 0 deletions
diff --git a/src/zope/pagetemplate/tests/input/__init__.py b/src/zope/pagetemplate/tests/input/__init__.py
new file mode 100644
index 0000000..b711d36
--- /dev/null
+++ b/src/zope/pagetemplate/tests/input/__init__.py
@@ -0,0 +1,2 @@
+#
+# This file is necessary to make this directory a package.
diff --git a/src/zope/pagetemplate/tests/input/checknotexpression.html b/src/zope/pagetemplate/tests/input/checknotexpression.html
new file mode 100644
index 0000000..81f3735
--- /dev/null
+++ b/src/zope/pagetemplate/tests/input/checknotexpression.html
@@ -0,0 +1,9 @@
+<html>
+<head></head>
+<body>
+<div tal:condition="not:python:0">not:python:0</div>
+<div tal:condition="not:python:1">not:python:1</div>
+<div tal:condition="not: python:1">not: python:1</div>
+<div tal:condition="not:python:range(1,20)">not:python:range(1,20)</div>
+</body>
+</html>
diff --git a/src/zope/pagetemplate/tests/input/checknothing.html b/src/zope/pagetemplate/tests/input/checknothing.html
new file mode 100644
index 0000000..bb531ba
--- /dev/null
+++ b/src/zope/pagetemplate/tests/input/checknothing.html
@@ -0,0 +1,7 @@
+<html>
+<body>
+<head>
+ <title tal:content="nothing">Hello World!</title>
+</head>
+</body>
+</html>
diff --git a/src/zope/pagetemplate/tests/input/checkpathalt.html b/src/zope/pagetemplate/tests/input/checkpathalt.html
new file mode 100644
index 0000000..3026cda
--- /dev/null
+++ b/src/zope/pagetemplate/tests/input/checkpathalt.html
@@ -0,0 +1,17 @@
+<html>
+<body>
+ <div tal:define="x string:X;nil string:">
+ <p tal:content="x">1</p>
+ <p tal:content="x | nil">2</p>
+ <p tal:content="python:nil or x">3</p>
+ <p tal:content="y/z | x">4</p>
+ <p tal:content="y/z | x | nil">5</p>
+
+ <p tal:attributes="name nil">Z</p>
+ <p tal:attributes="name y/z | nil">Z</p>
+ <p tal:attributes="name y/z | nothing">Z</p>
+
+ <p tal:on-error="python:str(error.value[0])" tal:content="a/b | c/d">Z</p>
+ </div>
+</body>
+</html>
diff --git a/src/zope/pagetemplate/tests/input/checkpathnothing.html b/src/zope/pagetemplate/tests/input/checkpathnothing.html
new file mode 100644
index 0000000..99f88be
--- /dev/null
+++ b/src/zope/pagetemplate/tests/input/checkpathnothing.html
@@ -0,0 +1,7 @@
+<html>
+<body>
+<head>
+ <title tal:content="path:nothing">Hello World!</title>
+</head>
+</body>
+</html>
diff --git a/src/zope/pagetemplate/tests/input/checkwithxmlheader.html b/src/zope/pagetemplate/tests/input/checkwithxmlheader.html
new file mode 100644
index 0000000..c184b36
--- /dev/null
+++ b/src/zope/pagetemplate/tests/input/checkwithxmlheader.html
@@ -0,0 +1,5 @@
+<?xml version="1.0" ?>
+<html>
+<body tal:content="string:Hello!">
+</body>
+</html>
diff --git a/src/zope/pagetemplate/tests/input/dtml1.html b/src/zope/pagetemplate/tests/input/dtml1.html
new file mode 100644
index 0000000..421a1b1
--- /dev/null
+++ b/src/zope/pagetemplate/tests/input/dtml1.html
@@ -0,0 +1,19 @@
+<html xmlns:tal="http://xml.zope.org/namespaces/tal">
+ <head><title>Test of documentation templates</title></head>
+ <body>
+ <span tal:replace="nothing"> blah </span>
+ <dl tal:condition="options/content/args">
+ <dt>The arguments to this test program were:</dt>
+ <dd>
+ <ul>
+ <li tal:repeat="arg options/content/args">
+ Argument number <span tal:replace="arg/num">99</span>
+ is <span tal:replace="arg/arg">default</span>
+ </li>
+ </ul>
+ </dd>
+ </dl>
+ <p tal:condition="not:options/content/args">No arguments were given.</p>
+ And thats da trooth.
+ </body>
+</html>
diff --git a/src/zope/pagetemplate/tests/input/dtml3.html b/src/zope/pagetemplate/tests/input/dtml3.html
new file mode 100644
index 0000000..d3c84b2
--- /dev/null
+++ b/src/zope/pagetemplate/tests/input/dtml3.html
@@ -0,0 +1,33 @@
+<head><title>Test of documentation templates</title></head>
+<body>
+ <div tal:condition="options/content/args">
+ The arguments were:
+ <span tal:condition="options/batch/previous_sequence">
+ (<span
+ tal:replace="options/batch/previous_sequence_start_item"
+ >previous start item</span>-<span
+ tal:replace="options/batch/previous_sequence_end_item"
+ >previous end item</span>)
+ </span>
+ <dl>
+ <span tal:repeat="arg options/batch">
+ <dt><span tal:replace="arg">??</span>.</dt>
+ <dd>Argument <span tal:define="num arg/num"
+ tal:replace="string: $num"
+ >99</span> was <span tal:replace="arg"
+ >??</span></dd>
+ </span>
+ </dl>
+ <span tal:condition="options/batch/next_sequence">
+ (<span
+ tal:replace="options/batch/next_sequence_start_item"
+ >next start item</span>-<span
+ tal:replace="options/batch/next_sequence_end_item"
+ >next end item</span>)
+ </span>
+ </div>
+ <p tal:condition="not:options/content/args">
+ No arguments were given.
+ </p>
+ And I am 100% sure!
+</body>
diff --git a/src/zope/pagetemplate/tests/input/globalsshadowlocals.html b/src/zope/pagetemplate/tests/input/globalsshadowlocals.html
new file mode 100644
index 0000000..c3f99e7
--- /dev/null
+++ b/src/zope/pagetemplate/tests/input/globalsshadowlocals.html
@@ -0,0 +1,14 @@
+<html tal:define="global x python:1">
+<head></head>
+<body>
+ <div tal:define="x python:2">
+ <span tal:content="x">Should be 2 here!</span>
+ </div>
+ <div>
+ <span tal:content="x">Should be 1 here!</span>
+ </div>
+ <div tal:define="global x python:3">
+ <span tal:content="x">Should be 3 here!</span>
+ </div>
+</body>
+</html>
diff --git a/src/zope/pagetemplate/tests/input/loop1.html b/src/zope/pagetemplate/tests/input/loop1.html
new file mode 100644
index 0000000..a4d0118
--- /dev/null
+++ b/src/zope/pagetemplate/tests/input/loop1.html
@@ -0,0 +1,15 @@
+<html>
+<head>
+<title>Loop doc</title>
+</head>
+<body>
+<p>Choose your type:</p>
+<ul>
+ <li tal:repeat="type python:'digital', 'analog', 'organic'">
+ <a href="dummy" tal:attributes="href string:/mach/$type">
+ <span tal:replace="repeat/type/number">1</span>.
+ <span tal:replace="type">selection</span></a>
+ </li>
+</ul>
+</body>
+</html>
diff --git a/src/zope/pagetemplate/tests/input/stringexpression.html b/src/zope/pagetemplate/tests/input/stringexpression.html
new file mode 100644
index 0000000..a60e72d
--- /dev/null
+++ b/src/zope/pagetemplate/tests/input/stringexpression.html
@@ -0,0 +1,7 @@
+<html>
+<body>
+<head>
+ <title tal:content="string:Hello World!">This is the title</title>
+</head>
+</body>
+</html>
diff --git a/src/zope/pagetemplate/tests/input/teeshop1.html b/src/zope/pagetemplate/tests/input/teeshop1.html
new file mode 100644
index 0000000..111381b
--- /dev/null
+++ b/src/zope/pagetemplate/tests/input/teeshop1.html
@@ -0,0 +1,87 @@
+<html metal:use-macro="options/laf/macros/page">
+<head>
+<title>Zope Stuff</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<link rel="stylesheet" href="/common.css">
+</head>
+
+<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
+<table width="100%" border="0" cellspacing="0" cellpadding="0">
+ <tr bgcolor="#0000CC" align="center">
+ <td>
+ <table width="200" border="0" cellspacing="0" cellpadding="0">
+ <tr bgcolor="#FFFFFF">
+ <td><img src="/images/lside.gif" width="52" height="94"><img src="/images/swlogo.gif" width="150" height="89"><img src="/images/rside.gif" width="52" height="94"></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<br>
+<table width="300" border="0" cellspacing="0" cellpadding="0" align="center">
+ <tr align="center">
+ <td width="25%" class="boldbodylist">apparel</td>
+ <td width="25%" class="boldbodylist">mugs</td>
+ <td width="25%" class="boldbodylist">toys</td>
+ <td width="25%" class="boldbodylist">misc</td>
+ </tr>
+</table>
+<br>
+<br>
+<div metal:fill-slot="body">
+<table width="500" border="0" cellspacing="0" cellpadding="0" align="center">
+ <tr>
+ <td bgcolor="#0000CC">
+ <table width="100%" border="0" cellspacing="1" cellpadding="3">
+ <tr bgcolor="#FFFFFF" align="center">
+ <td><img src="/images/welcome.gif" width="293" height="28"></td>
+ </tr>
+ <tr bgcolor="#FFFFFF" align="center" valign="top"
+ tal:repeat="product options/getProducts">
+ <td>
+ <table width="100%" border="0" cellspacing="0" cellpadding="6">
+ <tr>
+ <td colspan="2" class="bodylist" height="200" valign="top"><b>Description:
+ </b><span tal:replace="product/description">This is the tee for those who LOVE Zope. Show your heart
+ on your tee.</span></td>
+ <td align="right" width="1%" rowspan="2">
+ <p><img src="/images/smlatee.jpg" width="200" height="200"
+ tal:attributes="src string:/images/${product/image}"></p>
+ </td>
+ </tr>
+ <tr>
+ <td class="bodylist"><img src="images/clear.gif" width="150" height="10"></td>
+ <td class="bodylist"><b>Price</b>:<span tal:replace="product/price">12.99</span></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr bgcolor="#FFFFFF" align="center" valign="top">
+ <td>
+ <table width="100%" border="0" cellspacing="0" cellpadding="6">
+ <tr>
+ <td align="center"><img src="images/buttons/submit.gif" width="87" height="30"></td>
+ <td align="center"><img src="images/buttons/cancel.gif" width="87" height="30"></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+</div>
+<p>&nbsp;</p><table width="100%" border="0" cellspacing="1" cellpadding="3" align="center">
+ <tr >
+ <td align="center" bgcolor="#FFFFFF" class="bodylist"> Copyright © 2000 <a href="http://www.4-am.com">4AM
+ Productions, Inc.</a>. All rights reserved. <br>
+ Questions or problems should be directed to <a href="mailto:webmaster@teamzonline.com">
+ the webmaster</a>, 254-412-0846. </td>
+ </tr>
+ <tr>
+ <td align="center"><img src="/images/zopelogos/buildzope.gif" width="54" height="54"></td>
+ </tr>
+</table>
+<p>&nbsp;</p>
+</body>
+</html>
diff --git a/src/zope/pagetemplate/tests/input/teeshop2.html b/src/zope/pagetemplate/tests/input/teeshop2.html
new file mode 100644
index 0000000..7ca0cf1
--- /dev/null
+++ b/src/zope/pagetemplate/tests/input/teeshop2.html
@@ -0,0 +1,5 @@
+<html metal:use-macro="options/laf/macros/page">
+<div metal:fill-slot="body">
+Body
+</div>
+</html>
diff --git a/src/zope/pagetemplate/tests/input/teeshoplaf.html b/src/zope/pagetemplate/tests/input/teeshoplaf.html
new file mode 100644
index 0000000..f9477c3
--- /dev/null
+++ b/src/zope/pagetemplate/tests/input/teeshoplaf.html
@@ -0,0 +1,73 @@
+<html metal:define-macro="page">
+<head>
+<title>Zope Stuff</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<link rel="stylesheet" href="/common.css">
+</head>
+
+<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
+<table width="100%" border="0" cellspacing="0" cellpadding="0">
+ <tr bgcolor="#0000CC" align="center">
+ <td>
+ <table width="200" border="0" cellspacing="0" cellpadding="0">
+ <tr bgcolor="#FFFFFF">
+ <td><img src="/images/lside.gif" width="52" height="94"><img src="/images/swlogo.gif" width="150" height="89"><img src="/images/rside.gif" width="52" height="94"></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<br>
+<table width="300" border="0" cellspacing="0" cellpadding="0" align="center">
+ <tr align="center">
+ <td width="25%" class="boldbodylist">apparel</td>
+ <td width="25%" class="boldbodylist">mugs</td>
+ <td width="25%" class="boldbodylist">toys</td>
+ <td width="25%" class="boldbodylist">misc</td>
+ </tr>
+</table>
+<br>
+<br>
+<div metal:define-slot="body">
+<table width="500" border="0" cellspacing="0" cellpadding="0" align="center">
+ <tr>
+ <td bgcolor="#0000CC">
+ <table width="100%" border="0" cellspacing="1" cellpadding="3">
+ <tr bgcolor="#FFFFFF" align="center">
+ <td><img src="/images/welcome.gif" width="293" height="28"></td>
+ </tr>
+ <tr bgcolor="#FFFFFF" align="center" valign="top">
+ <td> <br>
+ <table width="100%" border="0" cellspacing="0" cellpadding="6">
+ <tr>
+ <td>This is the tee for those who LOVE Zope. Show your heart on
+ your tee.</td>
+ <td align="right" width="1%">
+ <p><img src="/images/smlatee.jpg" width="200" height="200"></p>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+</div>
+<br><br>
+<table width="100%" border="0" cellspacing="1" cellpadding="3" align="center">
+ <tr>
+ <td align="center" bgcolor="#FFFFFF" class="bodylist">
+ Copyright &copy; 2000
+ <a href="http://www.4-am.com">4AM Productions, Inc.</a>.
+ All rights reserved. <br>
+ Questions or problems should be directed to
+ <a href="mailto:webmaster@teamzonline.com">the webmaster</a>,
+ 254-412-0846.</td>
+ </tr>
+ <tr>
+ <td align="center"><img src="/images/zopelogos/buildzope.gif" width="54" height="54"></td>
+ </tr>
+</table>
+</body>
+</html>
diff --git a/src/zope/pagetemplate/tests/input/translation.html b/src/zope/pagetemplate/tests/input/translation.html
new file mode 100644
index 0000000..1df9bd5
--- /dev/null
+++ b/src/zope/pagetemplate/tests/input/translation.html
@@ -0,0 +1,2 @@
+<p i18n:translate="">Define and translate message id in ZPT</p>
+<p tal:content="options/msg">Insert Message object here</p>