   (:import java.io.File))
 
 (def path (str "test/templates" File/separator))
+
+(defn fix-line-sep [s] (clojure.string/replace s "\n" (System/lineSeparator)))
 
 (deftest dev-error-handling
   (is (= "No filter defined with the name 'woot'"


(deftest if-tag-test
  (is
    (= "\n\n\n\n<h1>NOT BAR!</h1>\n\n\n\n\"bar\"\n\n\n\n\t\n\tinner\n\t\n"
       (render-template (parse parse-input (str path "if.html")) {:nested "x" :inner "y"})))
  (is
    (= "\n\n\n\n<h1>NOT BAR!</h1>\n\n\n\n\"foo\"\n\n\n"
       (render-template (parse parse-input (str path "if.html")) {:user-id "bob"})))
  (is
    (= "\n\n\n\n<h1>NOT BAR!</h1>\n\n\n\n\"bar\"\n\n\n"
       (render-template (parse parse-input (str path "if.html")) {:foo false})))
  (is
    (= "\n<h1>FOO!</h1>\n\n\n\n\n<h1>NOT BAR!</h1>\n\n\n\n\"bar\"\n\n\n"
       (render-template (parse parse-input (str path "if.html")) {:foo true})))
  (is
    (= "\n<h1>FOO!</h1>\n\n\n\n\n<h1>BAR!</h1>\n\n\n\n\"bar\"\n\n\n"
       (render-template (parse parse-input (str path "if.html")) {:foo true :bar "test"})))
  (is
    (= ""

(deftest custom-resource-path-setting-url
  (set-resource-path! (clojure.java.io/resource "templates/inheritance"))
  (is (string? @custom-resource-path))
  (is (= (fix-line-sep "Hello, World!\n")  (render-file "foo.html" {:name "World"})))
  (set-resource-path! nil))

(deftest safe-filter
