Add unit test for embedded.factor

darcs
slava 2006-12-18 07:26:54 +00:00
parent 7327255050
commit 8f931eae56
4 changed files with 28 additions and 0 deletions

View File

@ -20,6 +20,7 @@ PROVIDE: libs/httpd
"test/html.factor"
"test/httpd.factor"
"test/url-encoding.factor"
"test/embedded.factor"
} } ;
USE: httpd

View File

@ -0,0 +1,11 @@
IN: temporary
USING: io embedded kernel test ;
[ t ] [
"libs/httpd/test/example.fhtml" resource-path
[ run-embedded-file ] string-out
"libs/httpd/test/example.html"
resource-path <file-reader> contents
=
] unit-test

View File

@ -0,0 +1,8 @@
<% USING: math ; %>
<html>
<head><title>Simple Embedded Factor Example</title></head>
<body>
<% 5 [ %><p>I like repetition</p><% ] times %>
</body>
</html>

View File

@ -0,0 +1,8 @@
<html>
<head><title>Simple Embedded Factor Example</title></head>
<body>
<p>I like repetition</p><p>I like repetition</p><p>I like repetition</p><p>I like repetition</p><p>I like repetition</p>
</body>
</html>