Add unit test for embedded.factor
parent
7327255050
commit
8f931eae56
|
@ -20,6 +20,7 @@ PROVIDE: libs/httpd
|
|||
"test/html.factor"
|
||||
"test/httpd.factor"
|
||||
"test/url-encoding.factor"
|
||||
"test/embedded.factor"
|
||||
} } ;
|
||||
|
||||
USE: httpd
|
||||
|
|
|
@ -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
|
|
@ -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>
|
|
@ -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>
|
Loading…
Reference in New Issue