From 8f931eae562e4b35b1b0df941215d9bc961fc645 Mon Sep 17 00:00:00 2001 From: slava Date: Mon, 18 Dec 2006 07:26:54 +0000 Subject: [PATCH] Add unit test for embedded.factor --- libs/httpd/load.factor | 1 + libs/httpd/test/embedded.factor | 11 +++++++++++ libs/httpd/test/example.fhtml | 8 ++++++++ libs/httpd/test/example.html | 8 ++++++++ 4 files changed, 28 insertions(+) create mode 100644 libs/httpd/test/embedded.factor create mode 100644 libs/httpd/test/example.fhtml create mode 100644 libs/httpd/test/example.html 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

+ +