clay: fix +grow in mark casting

This commit is contained in:
Ted Blackman 2021-01-26 20:43:23 -05:00
parent 6be1ebc41a
commit ce9f1eb3da
3 changed files with 23 additions and 10 deletions

View File

@ -6,7 +6,6 @@
:::: compute
::
=, html
^|
|_ htm=@t
++ grow :: convert to
^?

View File

@ -685,7 +685,7 @@
:_ nub
%+ slap (with-faces cor+old ~)
^- hoon
:+ %brcl tsgr/[limb/%cor limb/%bunt]
:+ %brcl !,(*hoon v=+<.cor)
:+ %tsgl limb/b
!,(*hoon ~(grow cor v))
:: try direct +grab

View File

@ -5,6 +5,7 @@
/* lib-strand %hoon /lib/strand/hoon
/* sur-spider %hoon /sur/spider/hoon
/* mar-mime %hoon /mar/mime/hoon
/* mar-html %hoon /mar/html/hoon
::
!:
=, format
@ -91,17 +92,10 @@
|. (parse-pile:(ford):fusion /sur/foo/hoon "[")
::
++ test-mar-mime ^- tang
=/ =ankh:clay
:- fil=~
%- ~(gas by *(map @tas ankh:clay))
:~ :+ %mar fil=~
%- ~(gas by *(map @tas ankh:clay))
:~ :+ %hoon fil=`[*lobe:clay hoon+!>(mar-mime)] dir=~
== ==
=/ ford
%: ford:fusion
bud
ankh
*ankh:clay
deletes=~
changes=(my [/mar/mime/hoon &+hoon+mar-mime]~)
file-store=~
@ -118,6 +112,26 @@
!> dez:(~(got by vases.cache.nub) /mar/mime/hoon)
==
::
++ test-cast-html-mime ^- tang
=/ changes
%- my
:~ [/mar/mime/hoon &+hoon+mar-mime]
[/mar/html/hoon &+hoon+mar-html]
==
=/ ford
%: ford:fusion
bud
*ankh:clay
deletes=~
changes
file-store=~
*ford-cache:fusion
==
=/ [res=vase nub=state:ford:fusion] (get-cast:ford %html %mime)
%+ expect-eq
(slam res !>('<html></html>'))
!> `mime`[/text/html 13 '<html></html>']
::
++ test-gen-hello ^- tang
=/ =ankh:clay
:- fil=~