misaki.tester documentation

Compiler Testing Utilities

base-path

(base-path & paths)
Combine paths based on _test_base_dir_

bind-config

macro

(bind-config bind-vec & body)
Binding config value.

(bind-config [:post-dir "foo/bar"]
  (println (:post-dir *config*)))

defcompilertest

macro

(defcompilertest name & body)
Define test macro for using compiler.

deftest*

macro

(deftest* name & body)
Define test macro for using test base directory and config.

get-base-config

(get-base-config)
Get basic config map. Basically you should use `get-config`.

get-base-dir

(get-base-dir)(get-base-dir default-dir)
Get base directory for testing.
Default base directory is "test/".

get-config

(get-config & {:keys [merge?], :or {merge? false}})
Get compiler config map.

If config has two or more maps and `:merge? true` option is specified,
this function returns merged config map.

ex) (get-config)
    (get-config :merge? true)

post-file

(post-file filename)
Return java.io.File in post directory.

public-file

Return java.io.File in pulbic directory.

set-base-dir!

(set-base-dir! base-dir)
Set base directory for testing.
Base directory is saved in each namespaces.

template-file

(template-file filename)
Return java.io.File in template directory.

test-compile

(test-compile file)
Run test compile.

with-test-base-dir

macro

(with-test-base-dir & body)
Bind test base directory to `*base-dir*`.