hara.seedgen.common-infile
seedgen-list
added in 4.1
(seedgen-list ns params lookup project)returns an empty list when a test file only declares the seedgen root (project/in-context (seed-infile/seedgen-list ’xt.sample.train-001-test {})) => []
(let tmp (java.io.File/createTempFile “seedgen-infile” “.clj”) path (.getAbsolutePath tmp) lookup {’sample.multi-test path} (try (spit path (str “(ns sample.multi-test\n” " (:use code.test)\n" " (:require hara.lang :as l))\n\n" “^{:seedgen/root {:all true}}\n” “(l/script- :js {:runtime :basic})\n\n” “(l/script- :lua {:runtime :basic})\n\n” “(l/script- :python {:runtime :basic})\n”)) (seed-infile/seedgen-list ’sample.multi-test {} lookup nil) (finally (.delete tmp)))) => :lua :python
seedgen-root
added in 4.1
(seedgen-root ns params lookup project)returns an explicit error result when the test file is missing (project/in-context (seed-infile/seedgen-root ’xt.sample.train-001-test {})) => :js
(project/in-context (seed-infile/seedgen-root ’xt.sample.missing-test {})) => (contains {:status :error :data :no-test-file})