Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
42c157b9
Commit
42c157b9
authored
Apr 09, 2001
by
Evan Simpson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tests to match new TAL default of omitting attribute languages
parent
51d88f6d
Changes
17
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
110 additions
and
91 deletions
+110
-91
lib/python/Products/PageTemplates/tests/framework.py
lib/python/Products/PageTemplates/tests/framework.py
+21
-9
lib/python/Products/PageTemplates/tests/output/CheckNotExpression.html
...oducts/PageTemplates/tests/output/CheckNotExpression.html
+4
-4
lib/python/Products/PageTemplates/tests/output/CheckNothing.html
...hon/Products/PageTemplates/tests/output/CheckNothing.html
+1
-1
lib/python/Products/PageTemplates/tests/output/CheckPathNothing.html
...Products/PageTemplates/tests/output/CheckPathNothing.html
+1
-1
lib/python/Products/PageTemplates/tests/output/CheckWithXMLHeader.html
...oducts/PageTemplates/tests/output/CheckWithXMLHeader.html
+1
-1
lib/python/Products/PageTemplates/tests/output/DTML1a.html
lib/python/Products/PageTemplates/tests/output/DTML1a.html
+8
-8
lib/python/Products/PageTemplates/tests/output/DTML1b.html
lib/python/Products/PageTemplates/tests/output/DTML1b.html
+2
-2
lib/python/Products/PageTemplates/tests/output/DTML3.html
lib/python/Products/PageTemplates/tests/output/DTML3.html
+7
-7
lib/python/Products/PageTemplates/tests/output/GlobalsShadowLocals.html
...ducts/PageTemplates/tests/output/GlobalsShadowLocals.html
+6
-6
lib/python/Products/PageTemplates/tests/output/Loop1.html
lib/python/Products/PageTemplates/tests/output/Loop1.html
+6
-12
lib/python/Products/PageTemplates/tests/output/StringExpression.html
...Products/PageTemplates/tests/output/StringExpression.html
+1
-1
lib/python/Products/PageTemplates/tests/output/TeeShop1.html
lib/python/Products/PageTemplates/tests/output/TeeShop1.html
+6
-8
lib/python/Products/PageTemplates/tests/output/TeeShop2.html
lib/python/Products/PageTemplates/tests/output/TeeShop2.html
+2
-2
lib/python/Products/PageTemplates/tests/output/TeeShopLAF.html
...ython/Products/PageTemplates/tests/output/TeeShopLAF.html
+2
-2
lib/python/Products/PageTemplates/tests/run.py
lib/python/Products/PageTemplates/tests/run.py
+15
-0
lib/python/Products/PageTemplates/tests/testDTMLTests.py
lib/python/Products/PageTemplates/tests/testDTMLTests.py
+5
-5
lib/python/Products/PageTemplates/tests/testHTMLTests.py
lib/python/Products/PageTemplates/tests/testHTMLTests.py
+22
-22
No files found.
lib/python/Products/PageTemplates/tests/framework.py
View file @
42c157b9
...
@@ -98,12 +98,13 @@
...
@@ -98,12 +98,13 @@
import
string
import
string
if
sys
.
modules
.
has_key
(
'unittest'
):
scriptdir
=
sys
.
path
[
0
]
# The framework should already be set up
input_dir
=
os
.
path
.
join
(
scriptdir
,
'input'
)
pass
output_dir
=
os
.
path
.
join
(
scriptdir
,
'output'
)
else
:
scriptdir
=
sys
.
path
[
0
]
if
not
sys
.
modules
.
has_key
(
'unittest'
):
if
scriptdir
==
''
:
if
os
.
path
.
abspath
(
scriptdir
)
==
os
.
path
.
abspath
(
'.'
):
# We're in the tests directory, and need to find unittest.
cwd
=
os
.
getcwd
()
cwd
=
os
.
getcwd
()
while
1
:
while
1
:
for
ext
in
'py'
,
'pyc'
,
'pyo'
,
'pyd'
:
for
ext
in
'py'
,
'pyc'
,
'pyo'
,
'pyd'
:
...
@@ -116,16 +117,27 @@ else:
...
@@ -116,16 +117,27 @@ else:
break
break
sys
.
path
.
insert
(
1
,
cwd
)
sys
.
path
.
insert
(
1
,
cwd
)
else
:
else
:
# We must be in the same directory as unittest
sys
.
path
.
insert
(
1
,
''
)
sys
.
path
.
insert
(
1
,
''
)
import
unittest
import
unittest
TestRunner
=
unittest
.
TextTestRunner
TestRunner
=
unittest
.
TextTestRunner
def
read_input
(
filename
):
filename
=
os
.
path
.
join
(
input_dir
,
filename
)
return
open
(
filename
,
'r'
).
read
()
def
read_output
(
filename
):
filename
=
os
.
path
.
join
(
output_dir
,
filename
)
return
open
(
filename
,
'r'
).
read
()
def
main
():
def
main
():
if
len
(
sys
.
argv
)
>
1
:
if
len
(
sys
.
argv
)
>
1
:
globals
()[
sys
.
argv
[
1
]]()
errs
=
globals
()[
sys
.
argv
[
1
]]()
else
:
else
:
TestRunner
().
run
(
test_suite
())
errs
=
TestRunner
().
run
(
test_suite
())
sys
.
exit
(
errs
and
1
or
0
)
def
debug
():
def
debug
():
test_suite
().
debug
()
test_suite
().
debug
()
...
...
lib/python/Products/PageTemplates/tests/output/CheckNotExpression.html
View file @
42c157b9
<html>
<html>
<head></head>
<head></head>
<body>
<body>
<div
tal:content=
"not:python:0"
>
1
</div>
<div>
1
</div>
<div
tal:content=
"not:python:1"
>
0
</div>
<div>
0
</div>
<div
tal:content=
"not: python:1"
>
0
</div>
<div>
0
</div>
<div
tal:content=
"not:python:range(1,20)"
>
0
</div>
<div>
0
</div>
</body>
</body>
</html>
</html>
lib/python/Products/PageTemplates/tests/output/CheckNothing.html
View file @
42c157b9
<html>
<html>
<body>
<body>
<head>
<head>
<title
tal:content=
"nothing"
></title>
<title></title>
</head>
</head>
</body>
</body>
</html>
</html>
lib/python/Products/PageTemplates/tests/output/CheckPathNothing.html
View file @
42c157b9
<html>
<html>
<body>
<body>
<head>
<head>
<title
tal:content=
"path:nothing"
></title>
<title></title>
</head>
</head>
</body>
</body>
</html>
</html>
lib/python/Products/PageTemplates/tests/output/CheckWithXMLHeader.html
View file @
42c157b9
<?xml version="1.0" ?>
<?xml version="1.0" ?>
<html>
<html>
<body
tal:content=
"string:Hello!"
>
Hello!
</body>
<body>
Hello!
</body>
</html>
</html>
lib/python/Products/PageTemplates/tests/output/DTML1a.html
View file @
42c157b9
<html
xmlns:tal=
"http://xml.zope.org/namespaces/tal"
>
<html>
<head><title>
Test of documentation templates
</title></head>
<head><title>
Test of documentation templates
</title></head>
<body>
<body>
<dl
tal:condition=
"here/args"
>
<dl>
<dt>
The arguments to this test program were:
</dt>
<dt>
The arguments to this test program were:
</dt>
<dd>
<dd>
<ul>
<ul>
<li
tal:repeat=
"arg here/args"
>
<li>
Argument number 1
Argument number 1
is one
is one
</li><li
tal:repeat=
"arg here/args"
>
</li><li>
Argument number 2
Argument number 2
is two
is two
</li><li
tal:repeat=
"arg here/args"
>
</li><li>
Argument number 3
Argument number 3
is three
is three
</li><li
tal:repeat=
"arg here/args"
>
</li><li>
Argument number 4
Argument number 4
is cha
is cha
</li><li
tal:repeat=
"arg here/args"
>
</li><li>
Argument number 5
Argument number 5
is cha
is cha
</li><li
tal:repeat=
"arg here/args"
>
</li><li>
Argument number 6
Argument number 6
is cha
is cha
</li>
</li>
...
...
lib/python/Products/PageTemplates/tests/output/DTML1b.html
View file @
42c157b9
<html
xmlns:tal=
"http://xml.zope.org/namespaces/tal"
>
<html>
<head><title>
Test of documentation templates
</title></head>
<head><title>
Test of documentation templates
</title></head>
<body>
<body>
<p
tal:condition=
"not:here/args"
>
No arguments were given.
</p>
<p>
No arguments were given.
</p>
And thats da trooth.
And thats da trooth.
</body>
</body>
</html>
</html>
lib/python/Products/PageTemplates/tests/output/DTML3.html
View file @
42c157b9
<head><title>
Test of documentation templates
</title></head>
<head><title>
Test of documentation templates
</title></head>
<body>
<body>
<div
tal:condition=
"here/args"
>
<div>
The arguments were:
The arguments were:
<dl>
<dl>
<span
tal:repeat=
"arg options/batch"
>
<span>
<dt>
one.
</dt>
<dt>
one.
</dt>
<dd>
Argument 1 was one
</dd>
<dd>
Argument 1 was one
</dd>
</span><span
tal:repeat=
"arg options/batch"
>
</span><span>
<dt>
two.
</dt>
<dt>
two.
</dt>
<dd>
Argument 2 was two
</dd>
<dd>
Argument 2 was two
</dd>
</span><span
tal:repeat=
"arg options/batch"
>
</span><span>
<dt>
three.
</dt>
<dt>
three.
</dt>
<dd>
Argument 3 was three
</dd>
<dd>
Argument 3 was three
</dd>
</span><span
tal:repeat=
"arg options/batch"
>
</span><span>
<dt>
four.
</dt>
<dt>
four.
</dt>
<dd>
Argument 4 was four
</dd>
<dd>
Argument 4 was four
</dd>
</span><span
tal:repeat=
"arg options/batch"
>
</span><span>
<dt>
five.
</dt>
<dt>
five.
</dt>
<dd>
Argument 5 was five
</dd>
<dd>
Argument 5 was five
</dd>
</span>
</span>
</dl>
</dl>
<span
tal:condition=
"options/batch/next_sequence"
>
<span>
(six-ten)
(six-ten)
</span>
</span>
</div>
</div>
...
...
lib/python/Products/PageTemplates/tests/output/GlobalsShadowLocals.html
View file @
42c157b9
<html
tal:define=
"global x python:1"
>
<html>
<head></head>
<head></head>
<body>
<body>
<div
tal:define=
"x python:2"
>
<div>
<span
tal:content=
"x"
>
2
</span>
<span>
2
</span>
</div>
</div>
<div>
<div>
<span
tal:content=
"x"
>
1
</span>
<span>
1
</span>
</div>
</div>
<div
tal:define=
"global x python:3"
>
<div>
<span
tal:content=
"x"
>
3
</span>
<span>
3
</span>
</div>
</div>
</body>
</body>
</html>
</html>
lib/python/Products/PageTemplates/tests/output/Loop1.html
View file @
42c157b9
...
@@ -5,20 +5,14 @@
...
@@ -5,20 +5,14 @@
<body>
<body>
<p>
Choose your type:
</p>
<p>
Choose your type:
</p>
<ul>
<ul>
<li
tal:repeat=
"type python:'digital', 'analog', 'organic'"
>
<li>
<a
href=
"/mach/digital"
<a
href=
"/mach/digital"
>
digital
</a>
tal:attributes=
"href string:/mach/$type"
tal:content=
"type"
>
digital
</a>
</li>
</li>
<li
tal:repeat=
"type python:'digital', 'analog', 'organic'"
>
<li>
<a
href=
"/mach/analog"
<a
href=
"/mach/analog"
>
analog
</a>
tal:attributes=
"href string:/mach/$type"
tal:content=
"type"
>
analog
</a>
</li>
</li>
<li
tal:repeat=
"type python:'digital', 'analog', 'organic'"
>
<li>
<a
href=
"/mach/organic"
<a
href=
"/mach/organic"
>
organic
</a>
tal:attributes=
"href string:/mach/$type"
tal:content=
"type"
>
organic
</a>
</li>
</li>
</ul>
</ul>
</body>
</body>
...
...
lib/python/Products/PageTemplates/tests/output/StringExpression.html
View file @
42c157b9
<html>
<html>
<body>
<body>
<head>
<head>
<title
tal:content=
"string:Hello World!"
>
Hello World!
</title>
<title>
Hello World!
</title>
</head>
</head>
</body>
</body>
</html>
</html>
lib/python/Products/PageTemplates/tests/output/TeeShop1.html
View file @
42c157b9
<html
metal:use-macro=
"container/laf/macros/page"
>
<html>
<head>
<head>
<title>
Zope Stuff
</title>
<title>
Zope Stuff
</title>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=iso-8859-1"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=iso-8859-1"
>
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
</table>
</table>
<br>
<br>
<br>
<br>
<div
metal:fill-slot=
"body"
>
<div>
<table
width=
"500"
border=
"0"
cellspacing=
"0"
cellpadding=
"0"
align=
"center"
>
<table
width=
"500"
border=
"0"
cellspacing=
"0"
cellpadding=
"0"
align=
"center"
>
<tr>
<tr>
<td
bgcolor=
"#0000CC"
>
<td
bgcolor=
"#0000CC"
>
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
<tr
bgcolor=
"#FFFFFF"
align=
"center"
>
<tr
bgcolor=
"#FFFFFF"
align=
"center"
>
<td><img
src=
"/images/welcome.gif"
width=
"293"
height=
"28"
></td>
<td><img
src=
"/images/welcome.gif"
width=
"293"
height=
"28"
></td>
</tr>
</tr>
<tr
bgcolor=
"#FFFFFF"
align=
"center"
valign=
"top"
tal:repeat=
"product options/getProducts"
>
<tr
bgcolor=
"#FFFFFF"
align=
"center"
valign=
"top"
>
<td>
<td>
<table
width=
"100%"
border=
"0"
cellspacing=
"0"
cellpadding=
"6"
>
<table
width=
"100%"
border=
"0"
cellspacing=
"0"
cellpadding=
"6"
>
<tr>
<tr>
...
@@ -44,8 +44,7 @@
...
@@ -44,8 +44,7 @@
</b>
This is the tee for those who LOVE Zope. Show your heart on your tee.
</td>
</b>
This is the tee for those who LOVE Zope. Show your heart on your tee.
</td>
<td
align=
"right"
width=
"1%"
rowspan=
"2"
>
<td
align=
"right"
width=
"1%"
rowspan=
"2"
>
<p><img
src=
"/images/smlatee.jpg"
<p><img
src=
"/images/smlatee.jpg"
width=
"200"
height=
"200"
width=
"200"
height=
"200"
></p>
tal:attributes=
"src string:/images/${product/image}"
></p>
</td>
</td>
</tr>
</tr>
<tr>
<tr>
...
@@ -55,7 +54,7 @@
...
@@ -55,7 +54,7 @@
</table>
</table>
</td>
</td>
</tr>
</tr>
<tr
bgcolor=
"#FFFFFF"
align=
"center"
valign=
"top"
tal:repeat=
"product options/getProducts"
>
<tr
bgcolor=
"#FFFFFF"
align=
"center"
valign=
"top"
>
<td>
<td>
<table
width=
"100%"
border=
"0"
cellspacing=
"0"
cellpadding=
"6"
>
<table
width=
"100%"
border=
"0"
cellspacing=
"0"
cellpadding=
"6"
>
<tr>
<tr>
...
@@ -63,8 +62,7 @@
...
@@ -63,8 +62,7 @@
</b>
This is the tee for Jim Fulton. He's the Zope Pope!
</td>
</b>
This is the tee for Jim Fulton. He's the Zope Pope!
</td>
<td
align=
"right"
width=
"1%"
rowspan=
"2"
>
<td
align=
"right"
width=
"1%"
rowspan=
"2"
>
<p><img
src=
"/images/smpztee.jpg"
<p><img
src=
"/images/smpztee.jpg"
width=
"200"
height=
"200"
width=
"200"
height=
"200"
></p>
tal:attributes=
"src string:/images/${product/image}"
></p>
</td>
</td>
</tr>
</tr>
<tr>
<tr>
...
...
lib/python/Products/PageTemplates/tests/output/TeeShop2.html
View file @
42c157b9
<html
metal:use-macro=
"container/laf/macros/page"
>
<html>
<head>
<head>
<title>
Zope Stuff
</title>
<title>
Zope Stuff
</title>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=iso-8859-1"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=iso-8859-1"
>
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
</table>
</table>
<br>
<br>
<br>
<br>
<div
metal:fill-slot=
"body"
>
<div>
Body
Body
</div>
</div>
<br><br>
<br><br>
...
...
lib/python/Products/PageTemplates/tests/output/TeeShopLAF.html
View file @
42c157b9
<html
metal:define-macro=
"page"
>
<html>
<head>
<head>
<title>
Zope Stuff
</title>
<title>
Zope Stuff
</title>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=iso-8859-1"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=iso-8859-1"
>
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
</table>
</table>
<br>
<br>
<br>
<br>
<div
metal:define-slot=
"body"
>
<div>
<table
width=
"500"
border=
"0"
cellspacing=
"0"
cellpadding=
"0"
align=
"center"
>
<table
width=
"500"
border=
"0"
cellspacing=
"0"
cellpadding=
"0"
align=
"center"
>
<tr>
<tr>
<td
bgcolor=
"#0000CC"
>
<td
bgcolor=
"#0000CC"
>
...
...
lib/python/Products/PageTemplates/tests/run.py
0 → 100755
View file @
42c157b9
#! /usr/bin/env python1.5
"""Run all tests."""
import
os
,
sys
execfile
(
os
.
path
.
join
(
sys
.
path
[
0
],
'framework.py'
))
def
test_suite
():
suite
=
unittest
.
TestSuite
()
for
mname
in
(
'DTMLTests'
,
'HTMLTests'
,
'Expressions'
,
'TALES'
):
m
=
__import__
(
'test'
+
mname
)
suite
.
addTest
(
m
.
test_suite
())
return
suite
if
__name__
==
"__main__"
:
main
()
lib/python/Products/PageTemplates/tests/testDTMLTests.py
View file @
42c157b9
...
@@ -120,18 +120,18 @@ class DTMLTests(unittest.TestCase):
...
@@ -120,18 +120,18 @@ class DTMLTests(unittest.TestCase):
</body></html>
</body></html>
"""
"""
tal
=
open
(
'input/DTML1.html'
).
read
(
)
tal
=
read_input
(
'DTML1.html'
)
self
.
t
.
write
(
tal
)
self
.
t
.
write
(
tal
)
aa
=
util
.
argv
((
'one'
,
'two'
,
'three'
,
'cha'
,
'cha'
,
'cha'
))
aa
=
util
.
argv
((
'one'
,
'two'
,
'three'
,
'cha'
,
'cha'
,
'cha'
))
o
=
self
.
t
.
__of__
(
aa
)()
o
=
self
.
t
.
__of__
(
aa
)()
expect
=
open
(
'output/DTML1a.html'
).
read
(
)
expect
=
read_output
(
'DTML1a.html'
)
util
.
check_xml
(
expect
,
o
)
util
.
check_xml
(
expect
,
o
)
aa
=
util
.
argv
(())
aa
=
util
.
argv
(())
o
=
self
.
t
.
__of__
(
aa
)()
o
=
self
.
t
.
__of__
(
aa
)()
expect
=
open
(
'output/DTML1b.html'
).
read
(
)
expect
=
read_output
(
'DTML1b.html'
)
util
.
check_xml
(
expect
,
o
)
util
.
check_xml
(
expect
,
o
)
def
check3
(
self
):
def
check3
(
self
):
...
@@ -164,7 +164,7 @@ class DTMLTests(unittest.TestCase):
...
@@ -164,7 +164,7 @@ class DTMLTests(unittest.TestCase):
</body></html>
</body></html>
"""
"""
tal
=
open
(
'input/DTML3.html'
).
read
(
)
tal
=
read_input
(
'DTML3.html'
)
self
.
t
.
write
(
tal
)
self
.
t
.
write
(
tal
)
aa
=
util
.
argv
((
'one'
,
'two'
,
'three'
,
'four'
,
'five'
,
aa
=
util
.
argv
((
'one'
,
'two'
,
'three'
,
'four'
,
'five'
,
...
@@ -175,7 +175,7 @@ class DTMLTests(unittest.TestCase):
...
@@ -175,7 +175,7 @@ class DTMLTests(unittest.TestCase):
import
batch
import
batch
o
=
self
.
t
.
__of__
(
aa
)(
batch
=
batch
.
batch
(
aa
.
args
,
5
))
o
=
self
.
t
.
__of__
(
aa
)(
batch
=
batch
.
batch
(
aa
.
args
,
5
))
expect
=
open
(
'output/DTML3.html'
).
read
(
)
expect
=
read_output
(
'DTML3.html'
)
util
.
check_xml
(
expect
,
o
)
util
.
check_xml
(
expect
,
o
)
def
test_suite
():
def
test_suite
():
...
...
lib/python/Products/PageTemplates/tests/testHTMLTests.py
View file @
42c157b9
...
@@ -117,75 +117,75 @@ class HTMLTests(unittest.TestCase):
...
@@ -117,75 +117,75 @@ class HTMLTests(unittest.TestCase):
def
check1
(
self
):
def
check1
(
self
):
laf
=
self
.
folder
.
laf
laf
=
self
.
folder
.
laf
laf
.
write
(
open
(
'input/TeeShopLAF.html'
).
read
(
))
laf
.
write
(
read_input
(
'TeeShopLAF.html'
))
expect
=
open
(
'output/TeeShopLAF.html'
).
read
(
)
expect
=
read_output
(
'TeeShopLAF.html'
)
util
.
check_html
(
expect
,
laf
())
util
.
check_html
(
expect
,
laf
())
def
check2
(
self
):
def
check2
(
self
):
self
.
folder
.
laf
.
write
(
open
(
'input/TeeShopLAF.html'
).
read
(
))
self
.
folder
.
laf
.
write
(
read_input
(
'TeeShopLAF.html'
))
t
=
self
.
folder
.
t
t
=
self
.
folder
.
t
t
.
write
(
open
(
'input/TeeShop2.html'
).
read
(
))
t
.
write
(
read_input
(
'TeeShop2.html'
))
expect
=
open
(
'output/TeeShop2.html'
).
read
(
)
expect
=
read_output
(
'TeeShop2.html'
)
out
=
t
(
getProducts
=
self
.
getProducts
)
out
=
t
(
getProducts
=
self
.
getProducts
)
util
.
check_html
(
expect
,
out
)
util
.
check_html
(
expect
,
out
)
def
check3
(
self
):
def
check3
(
self
):
self
.
folder
.
laf
.
write
(
open
(
'input/TeeShopLAF.html'
).
read
(
))
self
.
folder
.
laf
.
write
(
read_input
(
'TeeShopLAF.html'
))
t
=
self
.
folder
.
t
t
=
self
.
folder
.
t
t
.
write
(
open
(
'input/TeeShop1.html'
).
read
(
))
t
.
write
(
read_input
(
'TeeShop1.html'
))
expect
=
open
(
'output/TeeShop1.html'
).
read
(
)
expect
=
read_output
(
'TeeShop1.html'
)
out
=
t
(
getProducts
=
self
.
getProducts
)
out
=
t
(
getProducts
=
self
.
getProducts
)
util
.
check_html
(
expect
,
out
)
util
.
check_html
(
expect
,
out
)
def
checkSimpleLoop
(
self
):
def
checkSimpleLoop
(
self
):
t
=
self
.
folder
.
t
t
=
self
.
folder
.
t
t
.
write
(
open
(
'input/Loop1.html'
).
read
(
))
t
.
write
(
read_input
(
'Loop1.html'
))
expect
=
open
(
'output/Loop1.html'
).
read
(
)
expect
=
read_output
(
'Loop1.html'
)
out
=
t
()
out
=
t
()
util
.
check_html
(
expect
,
out
)
util
.
check_html
(
expect
,
out
)
def
checkGlobalsShadowLocals
(
self
):
def
checkGlobalsShadowLocals
(
self
):
t
=
self
.
folder
.
t
t
=
self
.
folder
.
t
t
.
write
(
open
(
'input/GlobalsShadowLocals.html'
).
read
(
))
t
.
write
(
read_input
(
'GlobalsShadowLocals.html'
))
expect
=
open
(
'output/GlobalsShadowLocals.html'
).
read
(
)
expect
=
read_output
(
'GlobalsShadowLocals.html'
)
out
=
t
()
out
=
t
()
util
.
check_html
(
expect
,
out
)
util
.
check_html
(
expect
,
out
)
def
checkStringExpressions
(
self
):
def
checkStringExpressions
(
self
):
t
=
self
.
folder
.
t
t
=
self
.
folder
.
t
t
.
write
(
open
(
'input/StringExpression.html'
).
read
(
))
t
.
write
(
read_input
(
'StringExpression.html'
))
expect
=
open
(
'output/StringExpression.html'
).
read
(
)
expect
=
read_output
(
'StringExpression.html'
)
out
=
t
()
out
=
t
()
util
.
check_html
(
expect
,
out
)
util
.
check_html
(
expect
,
out
)
def
checkReplaceWithNothing
(
self
):
def
checkReplaceWithNothing
(
self
):
t
=
self
.
folder
.
t
t
=
self
.
folder
.
t
t
.
write
(
open
(
'input/CheckNothing.html'
).
read
(
))
t
.
write
(
read_input
(
'CheckNothing.html'
))
expect
=
open
(
'output/CheckNothing.html'
).
read
(
)
expect
=
read_output
(
'CheckNothing.html'
)
out
=
t
()
out
=
t
()
util
.
check_html
(
expect
,
out
)
util
.
check_html
(
expect
,
out
)
def
checkWithXMLHeader
(
self
):
def
checkWithXMLHeader
(
self
):
t
=
self
.
folder
.
t
t
=
self
.
folder
.
t
t
.
write
(
open
(
'input/CheckWithXMLHeader.html'
).
read
(
))
t
.
write
(
read_input
(
'CheckWithXMLHeader.html'
))
expect
=
open
(
'output/CheckWithXMLHeader.html'
).
read
(
)
expect
=
read_output
(
'CheckWithXMLHeader.html'
)
out
=
t
()
out
=
t
()
util
.
check_html
(
expect
,
out
)
util
.
check_html
(
expect
,
out
)
def
checkNotExpression
(
self
):
def
checkNotExpression
(
self
):
t
=
self
.
folder
.
t
t
=
self
.
folder
.
t
t
.
write
(
open
(
'input/CheckNotExpression.html'
).
read
(
))
t
.
write
(
read_input
(
'CheckNotExpression.html'
))
expect
=
open
(
'output/CheckNotExpression.html'
).
read
(
)
expect
=
read_output
(
'CheckNotExpression.html'
)
out
=
t
()
out
=
t
()
util
.
check_html
(
expect
,
out
)
util
.
check_html
(
expect
,
out
)
def
checkPathNothing
(
self
):
def
checkPathNothing
(
self
):
t
=
self
.
folder
.
t
t
=
self
.
folder
.
t
t
.
write
(
open
(
'input/CheckPathNothing.html'
).
read
(
))
t
.
write
(
read_input
(
'CheckPathNothing.html'
))
expect
=
open
(
'output/CheckPathNothing.html'
).
read
(
)
expect
=
read_output
(
'CheckPathNothing.html'
)
out
=
t
()
out
=
t
()
util
.
check_html
(
expect
,
out
)
util
.
check_html
(
expect
,
out
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment