Created
February 13, 2018 20:23
-
-
Save Fang-/a585bd75eabda765d49c5bfa8baadd59 to your computer and use it in GitHub Desktop.
Terrible beginnings of a neat clay testing lib
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: | |
:::: /lib/test/clay/hoon | |
:: | |
// /===/sys/vane/clay | |
=+ cloy=(. !>(..zuse)) | |
:: | |
|% | |
++ core cloy | |
++ work | |
|_ cor/_core | |
++ do-task | |
|= a/task:able:clay | |
^- {(each (list move:cor) tang) _core} | |
=/ try | |
=+ coy=(cor ~2017.12.15..23.02.18..f874 `@e`'totally-eny' _~) | |
(mule |.(~|(task+a (call:coy [/test-clay]~ %noun %soft a)))) | |
?. ?=($& -.try) | |
[|+p.try cor] | |
=^ mos cor p.try | |
[&+mos cor] | |
-- | |
:: | |
++ test | |
|= $: cor/_core | |
tak/task:able:clay | |
wan/(list gift:able:clay) | |
== | |
^- (pair ? _core) | |
=^ res cor (~(do-task work cor) tak) | |
:_ cor | |
?: ?=($| -.res) ~&([%got-error p.res] |) | |
~& [%got p.res] | |
.= wan | |
%+ turn p.res | |
|= a/move:cor | |
^- gift:able:clay | |
?: ?=($give -.q.a) p.q.a | |
*gift:able:clay | |
:: | |
++ run | |
~& %starting | |
=+ cor=core | |
=^ res cor | |
%^ test cor | |
`task:able:clay`[%cred ~zod %motley [~bud ~ ~]] | |
[%mack ~]~ | |
~&(%done ~) | |
-- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment