shrub/tests/sys/vane/ames.hoon
Joe Bryan 535ab6e90b updates %jael to save and %ames to give domains (on boot/startup)
also defers initial clay merge,
renames +turf (utf8 to utf32) to +taft,
and removes duplicate +turf (domain) declarations,
and updates pinned vere to use them
2018-10-16 21:02:41 -04:00

48 lines
996 B
Plaintext

/+ *test
::
/= ames-raw /: /===/sys/vane/ames
/!noun/
=/ type-spear -:!>(ames-raw)
::
=/ test-pit=vase !>(.)
=/ ames-gate (ames-raw test-pit)
::
|%
:: tests that %ames asks for private keys on %init
::
++ test-init
=^ results1 ames-gate
=/ hen=duct
[/ /term/1 / ~]
=/ wir=wire
/our/~nul
%- ames-call
:* ames-gate
now=~1234.5.6
call-args=[hen type=*type %soft %init ~nul]
[[hen %pass wir %j %vein ~nul] [hen %pass / %j %turf ~] ~]
==
::
results1
::
++ ames-call
|= $: ames-gate=_ames-gate
now=@da
call-args=[=duct wrapped-task=(hypo (hobo task:able:ames-gate))]
expected-moves=(list move:ames-gate)
==
^- [tang _ames-gate]
::
=/ ames (ames-gate now=now eny=`@e`0xdead.beef scry=*sley)
::
=^ moves ames-gate
%- call:ames call-args
::
=/ output=tang
%+ expect-eq
!> expected-moves
!> moves
::
[output ames-gate]
--