mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-01 11:33:41 +03:00
Execute /; in scaffolds
This commit is contained in:
parent
2df0b8b863
commit
6f8ea7918e
@ -87,6 +87,7 @@
|
|||||||
test-core-fsts-fssg
|
test-core-fsts-fssg
|
||||||
test-core-fsdt-fskt
|
test-core-fsdt-fskt
|
||||||
test-core-fskt-nest-fail
|
test-core-fskt-nest-fail
|
||||||
|
test-core-fssm
|
||||||
==
|
==
|
||||||
++ test-tear
|
++ test-tear
|
||||||
~& %test-tear
|
~& %test-tear
|
||||||
@ -4220,6 +4221,63 @@
|
|||||||
(expect-ford-empty ford ~nul)
|
(expect-ford-empty ford ~nul)
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
|
++ test-core-fssm
|
||||||
|
~& %test-core-fssm
|
||||||
|
::
|
||||||
|
=/ ford *ford-gate
|
||||||
|
::
|
||||||
|
=/ hoon-src-type=type [%atom %$ ~]
|
||||||
|
=/ scry-results=(map [term beam] cage)
|
||||||
|
%- my :~
|
||||||
|
:- [%cx [[~nul %home %da ~1234.5.6] /hoon/program/gen]]
|
||||||
|
:- %hoon
|
||||||
|
:- hoon-src-type
|
||||||
|
'''
|
||||||
|
/= data /; |=(a=@u [a a ~])
|
||||||
|
/~ 5
|
||||||
|
data
|
||||||
|
'''
|
||||||
|
==
|
||||||
|
::
|
||||||
|
=^ results1 ford
|
||||||
|
%- test-ford-call-with-comparator :*
|
||||||
|
ford
|
||||||
|
now=~1234.5.6
|
||||||
|
scry=(scry-with-results scry-results)
|
||||||
|
::
|
||||||
|
^= call-args
|
||||||
|
:* duct=~[/path] type=~ %make ~nul
|
||||||
|
%pin ~1234.5.6
|
||||||
|
[%core source-path=`rail:ford-gate`[[~nul %home] /hoon/program/gen]]
|
||||||
|
==
|
||||||
|
::
|
||||||
|
^= comparator
|
||||||
|
|= moves=(list move:ford-gate)
|
||||||
|
::
|
||||||
|
?> =(1 (lent moves))
|
||||||
|
?> ?=(^ moves)
|
||||||
|
?> ?=([* %give %made @da %complete %success %pin *] i.moves)
|
||||||
|
=/ result result.p.card.i.moves
|
||||||
|
=/ pin-result build-result.result
|
||||||
|
?> ?=([%success %core *] build-result.pin-result)
|
||||||
|
::
|
||||||
|
=/ =vase vase.build-result.pin-result
|
||||||
|
::
|
||||||
|
%+ weld
|
||||||
|
%- expect-eq !>
|
||||||
|
:- [5 5 ~]
|
||||||
|
q.vase
|
||||||
|
::
|
||||||
|
%- expect-eq !>
|
||||||
|
:- &
|
||||||
|
(~(nest ut p.vase) | -:!>([5 5 ~]))
|
||||||
|
==
|
||||||
|
::
|
||||||
|
;: weld
|
||||||
|
results1
|
||||||
|
(expect-ford-empty ford ~nul)
|
||||||
|
==
|
||||||
|
::
|
||||||
:: |utilities: helper arms
|
:: |utilities: helper arms
|
||||||
::
|
::
|
||||||
::+| utilities
|
::+| utilities
|
||||||
|
@ -3113,6 +3113,7 @@
|
|||||||
%fssg (run-fssg +.crane)
|
%fssg (run-fssg +.crane)
|
||||||
%fsts (run-fsts +.crane)
|
%fsts (run-fsts +.crane)
|
||||||
%fsdt (run-fsdt +.crane)
|
%fsdt (run-fsdt +.crane)
|
||||||
|
%fssm (run-fssm +.crane)
|
||||||
%fskt (run-fskt +.crane)
|
%fskt (run-fskt +.crane)
|
||||||
==
|
==
|
||||||
:: +run-fssg: runs the `/~` rune
|
:: +run-fssg: runs the `/~` rune
|
||||||
@ -3192,6 +3193,26 @@
|
|||||||
(slop subject.i.list-results $(list-results t.list-results))
|
(slop subject.i.list-results $(list-results t.list-results))
|
||||||
::
|
::
|
||||||
[[%subject final-result] ..run-crane]
|
[[%subject final-result] ..run-crane]
|
||||||
|
:: +run-fssm: runs the `/;` rune
|
||||||
|
::
|
||||||
|
++ run-fssm
|
||||||
|
|= [=hoon sub-crane=^crane]
|
||||||
|
^- compose-cranes
|
||||||
|
::
|
||||||
|
=^ child ..run-crane (run-crane subject sub-crane)
|
||||||
|
?. ?=([%subject *] child)
|
||||||
|
[child ..run-crane]
|
||||||
|
::
|
||||||
|
=/ call-build=^build
|
||||||
|
[date.build [%call [%ride hoon [%$ %noun subject]] [%$ %noun subject.child]]]
|
||||||
|
=^ call-result accessed-builds (depend-on call-build)
|
||||||
|
?~ call-result
|
||||||
|
[[%block [call-build]~] ..run-crane]
|
||||||
|
?: ?=([~ %error *] call-result)
|
||||||
|
[[%error [leaf+"/; failed: " message.u.call-result]] ..run-crane]
|
||||||
|
?> ?=([~ %success %call *] call-result)
|
||||||
|
::
|
||||||
|
[[%subject vase.u.call-result] ..run-crane]
|
||||||
:: +run-fskt: runs the `/^` rune
|
:: +run-fskt: runs the `/^` rune
|
||||||
::
|
::
|
||||||
++ run-fskt
|
++ run-fskt
|
||||||
|
Loading…
Reference in New Issue
Block a user