shrub/pkg/arvo/tests/sys/zuse/balk.hoon
Liam Fitzgerald e621744169 zuse: add +balk core for remote scry path format
+balk defines a datastructure for a parsed remote scry path format in
addition to conversion gates to and from paths.

The new scry path format is /~ship/rift/life/vane/care/spur. Note that
desk no longer appears in the scry path format and should instead be
encoded as the first item of the spur.
2022-03-08 15:11:25 -06:00

18 lines
431 B
Plaintext

/+ *test
|%
++ hastuc-dibtux [~hastuc-dibtux 15 22]
++ clay-x [%c %x %ud 3]
++ test-en-path
%+ expect-eq
!>(`path`/cx/~hastuc-dibtux/base/3/sys/hoon/hoon)
!> %- en-path:balk
[hastuc-dibtux clay-x /base/sys/hoon/hoon]
++ test-de-path
=/ bal=balk
(de-path:balk 15 22 /cx/~hastuc-dibtux/base/3/sys/hoon/hoon)
%+ expect-eq !>(bal)
!> ^- balk
[hastuc-dibtux clay-x /base/sys/hoon/hoon]
--