diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/spec/lux/world/program.lux | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/stdlib/source/spec/lux/world/program.lux b/stdlib/source/spec/lux/world/program.lux new file mode 100644 index 000000000..1d09908bf --- /dev/null +++ b/stdlib/source/spec/lux/world/program.lux @@ -0,0 +1,31 @@ +(.module: + [lux #* + ["_" test (#+ Test)] + [abstract + [monad (#+ do)]] + [control + ["." try] + [concurrency + ["." promise (#+ Promise)]]] + [data + ["." text] + [collection + ["." dictionary] + ["." list]]] + [math + ["." random]]] + {1 + ["." /]}) + +(def: #export (spec subject) + (-> (/.Program Promise) Test) + (do random.monad + [exit random.int] + (wrap (do promise.monad + [environment (\ subject environment []) + directory (\ subject directory [])] + (_.cover' [/.Program] + (and (not (dictionary.empty? environment)) + (list.every? (|>> text.empty? not) + (dictionary.keys environment)) + (not (text.empty? directory)))))))) |