Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
philipcmonk committed May 14, 2019
1 parent 1aefafb commit 4a569c4
Show file tree
Hide file tree
Showing 2 changed files with 88 additions and 67 deletions.
2 changes: 1 addition & 1 deletion sys/vane/clay.hoon
Original file line number Diff line number Diff line change
Expand Up @@ -2261,7 +2261,7 @@
::
++ emil
|= mof/(list move)
%_(+> mow (weld mof mow))
%_(+> mow (weld (flop mof) mow))
::
:: Produce either null or a result along a subscription.
::
Expand Down
153 changes: 87 additions & 66 deletions tests/sys/vane/clay.hoon
Original file line number Diff line number Diff line change
Expand Up @@ -38,34 +38,15 @@
|= moves=(list move:clay-gate)
^- tang
::
?. ?=([* * * ~] moves)
?. ?=([* ~] moves)
[%leaf "wrong number of moves: {<(lent moves)>}"]~
::
^- tang
;: weld
%+ expect-eq
!> ^- move:clay-gate
:- duct=~[/info]
^- (wind note:clay-gate gift:able:clay)
:+ %pass /castifying/~nul/home/~1111.1.1
^- note:clay-gate
:- %f
[%build live=%.n [%pin ~1111.1.1 [%list ~]]]
!> i.moves
::
%+ expect-eq
!> ^- move:clay-gate
:- duct=~[/info]
^- (wind note:clay-gate gift:able:clay)
:+ %pass /diffing/~nul/home/~1111.1.1
^- note:clay-gate
:- %f
[%build live=%.n [%pin ~1111.1.1 [%list ~]]]
!> i.t.moves
::
^- tang
::
=/ move=move:clay-gate i.t.t.moves
=/ move=move:clay-gate i.moves
=/ =duct p.move
=/ card=(wind note:clay-gate gift:able:clay) q.move
::
Expand All @@ -78,7 +59,7 @@
=/ =wire p.card
::
%+ weld
(expect-eq !>(/inserting/~nul/home/~1111.1.1) !>(wire))
(expect-eq !>(/commit/home) !>(wire))
::
=/ note=note:clay-gate q.card
::
Expand All @@ -103,13 +84,87 @@
==
== ==
::
:: inserting
::
=^ results2 clay-gate
%- clay-take-with-comparator :*
clay-gate
now=~1111.1.1
scry=*sley
^= take-args
:* wire=/castifying/~nul/home/~1111.1.1
:* wire=/commit/home
duct=~[/info]
-:!>(*sign:clay-gate)
^- sign:clay-gate
:* %f %made ~1111.1.1 %complete %success %list
^- (list build-result:ford)
:~ :+ %success
[%success %$ %path -:!>(*path) /file1/noun]
[%success %cast %noun %noun 'file1']
::
:+ %success
[%success %$ %path -:!>(*path) /file2/noun]
[%success %cast %noun %noun 'file2']
== == ==
^= comparator
|= moves=(list move:clay-gate)
^- tang
::
?. ?=([* ~] moves)
[%leaf "wrong number of moves: {<(lent moves)>}"]~
::
%+ expect-eq
!> ^- move:clay-gate
:- duct=~[/info]
^- (wind note:clay-gate gift:able:clay)
:+ %pass /commit/home
^- note:clay-gate
:- %f
[%build live=%.n [%pin ~1111.1.1 [%list ~]]]
!> i.moves
== :: ==
::
:: diffing
::
=^ results3 clay-gate
%- clay-take-with-comparator :*
clay-gate
now=~1111.1.1
scry=*sley
^= take-args
:* wire=/commit/home
duct=~[/info]
-:!>(*sign:clay-gate)
^- sign:clay-gate
[%f %made ~1111.1.1 %complete %success %list ~]
==
^= move-comparator
|= moves=(list move:clay-gate)
^- tang
::
?. ?=([* ~] moves)
[%leaf "wrong number of moves: {<(lent moves)>}"]~
::
%+ expect-eq
!> ^- move:clay-gate
:- duct=~[/info]
^- (wind note:clay-gate gift:able:clay)
:+ %pass /commit/home
^- note:clay-gate
:- %f
[%build live=%.n [%pin ~1111.1.1 [%list ~]]]
!> i.moves
==
::
:: castifying
::
=^ results4 clay-gate
%- clay-take-with-comparator :*
clay-gate
now=~1111.1.1
scry=*sley
^= take-args
:* wire=/commit/home
duct=~[/info]
-:!>(*sign:clay-gate)
^- sign:clay-gate
Expand All @@ -135,7 +190,7 @@
=/ =wire p.card
::
%+ weld
(expect-eq !>(/mutating/~nul/home/~1111.1.1) !>(wire))
(expect-eq !>(/commit/home) !>(wire))
::
=/ note=note:clay-gate q.card
::
Expand All @@ -151,56 +206,20 @@
[%pin ~1111.1.1 %list ~]
==
::
=^ results3 clay-gate
%- clay-take :*
clay-gate
now=~1111.1.1
scry=*sley
^= take-args
:* wire=/mutating/~nul/home/~1111.1.1
duct=~[/info]
-:!>(*sign:clay-gate)
^- sign:clay-gate
[%f %made ~1111.1.1 %complete %success %list ~]
==
expected-moves=~
==
::
=^ results4 clay-gate
%- clay-take :*
clay-gate
now=~1111.1.1
scry=*sley
^= take-args
:* wire=/diffing/~nul/home/~1111.1.1
duct=~[/info]
-:!>(*sign:clay-gate)
^- sign:clay-gate
[%f %made ~1111.1.1 %complete %success %list ~]
==
expected-moves=~
==
:: mutating
::
=^ results5 clay-gate
%- clay-take-with-comparator :*
clay-gate
now=~1111.1.1
scry=*sley
^= take-args
:* wire=/inserting/~nul/home/~1111.1.1
:* wire=/commit/home
duct=~[/info]
-:!>(*sign:clay-gate)
^- sign:clay-gate
:* %f %made ~1111.1.1 %complete %success %list
^- (list build-result:ford)
:~ :+ %success
[%success %$ %path -:!>(*path) /file1/noun]
[%success %cast %noun %noun 'file1']
::
:+ %success
[%success %$ %path -:!>(*path) /file2/noun]
[%success %cast %noun %noun 'file2']
== == ==
[%f %made ~1111.1.1 %complete %success %list ~]
==
^= comparator
|= moves=(list move:clay-gate)
^- tang
Expand All @@ -221,7 +240,7 @@
=/ =wire p.card
::
%+ weld
(expect-eq !>(/patching/~nul/home) !>(wire))
(expect-eq !>(/commit/home) !>(wire))
::
=/ note=note:clay-gate q.card
::
Expand Down Expand Up @@ -249,13 +268,15 @@
[%volt [~nul %home] %noun 'file2']
== ==
::
:: patching
::
=^ results6 clay-gate
%- clay-take :*
clay-gate
now=~1111.1.1
scry=*sley
^= take-args
:* wire=/patching/~nul/home
:* wire=/commit/home
duct=~[/info]
-:!>(*sign:clay-gate)
^- sign:clay-gate
Expand Down

0 comments on commit 4a569c4

Please sign in to comment.