Execute /$ in scaffolds

This commit is contained in:
Elliot Glaysher 2018-05-21 15:48:45 -07:00
parent 4cbb057600
commit d8bb5906b4
2 changed files with 99 additions and 0 deletions

View File

@ -94,6 +94,7 @@
test-plan-fszp-as-noun
test-core-fscl-fszp
test-core-fscm
test-plan-fsbc
test-bunt
test-volt
test-vale
@ -4691,6 +4692,71 @@
(expect-ford-empty ford ~nul)
==
::
++ test-plan-fsbc
:- `tank`leaf+"test-plan-fsbc"
::
=/ ford *ford-gate
::
=/ hoon-src-type=type [%atom %$ ~]
=/ scry-results=(map [term beam] cage)
%- my :~
:- [%cx [[~nul %home %da ~1234.5.6] /hoon/other/lib]]
:- %hoon
:- hoon-src-type
'''
/= data /$ %+ cork fuel:html
|= gas/epic:eyre
[bem.gas (~(got by qix.gas) 'key')]
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
:* %plan [[~nul %home] /hoon/other/lib]
[%many [%blob *cred:eyre] [%$ [%t %key]] [%$ [%t %value]] [%$ %n ~] ~]
:* source-rail=[[~nul %home] /hoon/other/lib]
zuse-version=309
structures=~
libraries=~
cranes=[%fsts %data [%fszp %noun]]~
sources=[%direct %wing [%data]~]~
== == ==
::
^= 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 %plan *] build-result.pin-result)
::
=/ =vase vase.build-result.pin-result
::
%+ weld
%- expect-eq !>
:- [[[~nul %home [%da ~1234.5.6]] /hoon/other/lib] %value]
q.vase
::
%- expect-eq !>
:- &
(~(nest ut p.vase) | -:!>([*beam *@tas]))
==
::
;: weld
results1
(expect-ford-empty ford ~nul)
==
::
++ test-bunt
:- `tank`leaf+"test-bunt"
::

View File

@ -3155,6 +3155,7 @@
::
|^ ?+ -.crane !!
%fssg (run-fssg +.crane)
%fsbc (run-fsbc +.crane)
%fsbr (run-fsbr +.crane)
%fsts (run-fsts +.crane)
%fscm (run-fscm +.crane)
@ -3179,6 +3180,38 @@
[[%error [leaf+"/~ failed: " message.u.ride-result]] ..run-crane]
?> ?=([~ %success %ride *] ride-result)
[[%subject vase.u.ride-result] ..run-crane]
:: +run-fsbc: runes the `/$` rune
::
++ run-fsbc
|= =hoon
^- compose-cranes
::
=/ query-compile-build=^build
[date.build [%ride ((jock |) query-string) [%$ %noun !>(~)]]]
=^ query-compile-result accessed-builds (depend-on query-compile-build)
?~ query-compile-result
[[%block [query-compile-build]~] ..run-crane]
?: ?=([~ %error *] query-compile-result)
[[%error [leaf+"/; failed: " message.u.query-compile-result]] ..run-crane]
?> ?=([~ %success %ride *] query-compile-result)
:: TODO: if we had a slop build type, everything could be crammed
:: into one sub-build.
::
=/ =beam
=, path-to-render
[[ship.disc desk.disc [%da date.build]] spur]
=+ arguments=(slop !>(beam) vase.u.query-compile-result)
::
=/ call-build=^build
[date.build [%call [%ride hoon [%$ %noun subject]] [%$ %noun arguments]]]
=^ 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-fsbr: runes the `/|` rune
::
++ run-fsbr