diff --git a/libs/httpd/load.factor b/libs/httpd/load.factor index 0764011d4c..1f27e14cfe 100644 --- a/libs/httpd/load.factor +++ b/libs/httpd/load.factor @@ -20,6 +20,7 @@ PROVIDE: libs/httpd "test/html.factor" "test/httpd.factor" "test/url-encoding.factor" + "test/embedded.factor" } } ; USE: httpd diff --git a/libs/httpd/test/embedded.factor b/libs/httpd/test/embedded.factor new file mode 100644 index 0000000000..d85845edfa --- /dev/null +++ b/libs/httpd/test/embedded.factor @@ -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 contents + = +] unit-test diff --git a/libs/httpd/test/example.fhtml b/libs/httpd/test/example.fhtml new file mode 100644 index 0000000000..211f44af9a --- /dev/null +++ b/libs/httpd/test/example.fhtml @@ -0,0 +1,8 @@ +<% USING: math ; %> + + + Simple Embedded Factor Example + + <% 5 [ %>

I like repetition

<% ] times %> + + diff --git a/libs/httpd/test/example.html b/libs/httpd/test/example.html new file mode 100644 index 0000000000..33829bf84c --- /dev/null +++ b/libs/httpd/test/example.html @@ -0,0 +1,8 @@ + + + + Simple Embedded Factor Example + +

I like repetition

I like repetition

I like repetition

I like repetition

I like repetition

+ +