mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-18 20:31:40 +03:00
48 lines
982 B
Plaintext
48 lines
982 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/now/~1234.5.6
|
||
|
%- ames-call
|
||
|
:* ames-gate
|
||
|
now=~1234.5.6
|
||
|
call-args=[hen type=*type %soft %init ~nul]
|
||
|
[hen %pass wir %j %vein ~nul]~
|
||
|
==
|
||
|
::
|
||
|
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]
|
||
|
--
|