diff --git a/gen/ford-turbo.hoon b/gen/ford-turbo.hoon index 8d0150430..2afa6ccd1 100644 --- a/gen/ford-turbo.hoon +++ b/gen/ford-turbo.hoon @@ -87,6 +87,7 @@ test-core-fsts-fssg test-core-fsdt-fskt test-core-fskt-nest-fail + test-core-fssm == ++ test-tear ~& %test-tear @@ -4220,6 +4221,63 @@ (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 diff --git a/lib/ford-turbo.hoon b/lib/ford-turbo.hoon index 2f292a596..1b86370b0 100644 --- a/lib/ford-turbo.hoon +++ b/lib/ford-turbo.hoon @@ -3113,6 +3113,7 @@ %fssg (run-fssg +.crane) %fsts (run-fsts +.crane) %fsdt (run-fsdt +.crane) + %fssm (run-fssm +.crane) %fskt (run-fskt +.crane) == :: +run-fssg: runs the `/~` rune @@ -3192,6 +3193,26 @@ (slop subject.i.list-results $(list-results t.list-results)) :: [[%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