ph: port all azimuth tests to imps

This commit is contained in:
Philip Monk 2019-10-01 20:25:19 -07:00
parent 01c120e8de
commit aaf21f1f99
No known key found for this signature in database
GPG Key ID: B66E1F02604E44EC
8 changed files with 164 additions and 0 deletions

View File

@ -0,0 +1,22 @@
/- spider
/+ ph-io
=, thread=thread:spider
^- imp:spider
|= =bowl:mall
=/ m (thread ,~)
;< ~ bind:m start-azimuth:ph-io
;< ~ bind:m (spawn:ph-io ~bud)
;< ~ bind:m (spawn:ph-io ~dev)
;< ~ bind:m (spawn:ph-io ~marbud)
;< ~ bind:m (spawn:ph-io ~mardev)
;< ~ bind:m (real-ship:ph-io ~bud)
;< ~ bind:m (real-ship:ph-io ~dev)
;< ~ bind:m (real-ship:ph-io ~marbud)
;< ~ bind:m (real-ship:ph-io ~mardev)
;< ~ bind:m (send-hi:ph-io ~marbud ~mardev)
;< ~ bind:m (breach-and-hear:ph-io ~mardev ~marbud)
;< ~ bind:m (send-hi-not-responding:ph-io ~marbud ~mardev)
;< ~ bind:m (real-ship:ph-io ~mardev)
;< ~ bind:m (wait-for-output:ph-io ~marbud "hi ~mardev successful")
;< ~ bind:m end-azimuth:ph-io
(pure:m ~)

View File

@ -0,0 +1,18 @@
/- spider
/+ ph-io
=, thread=thread:spider
^- imp:spider
|= =bowl:mall
=/ m (thread ,~)
;< ~ bind:m start-azimuth:ph-io
;< ~ bind:m (spawn:ph-io ~bud)
;< ~ bind:m (spawn:ph-io ~dev)
;< ~ bind:m (real-ship:ph-io ~bud)
;< ~ bind:m (real-ship:ph-io ~dev)
;< ~ bind:m (send-hi:ph-io ~bud ~dev)
;< ~ bind:m (breach-and-hear:ph-io ~dev ~bud)
;< ~ bind:m (send-hi-not-responding:ph-io ~bud ~dev)
;< ~ bind:m (real-ship:ph-io ~dev)
;< ~ bind:m (wait-for-output:ph-io ~bud "hi ~dev successful")
;< ~ bind:m end-azimuth:ph-io
(pure:m ~)

View File

@ -0,0 +1,22 @@
/- spider
/+ ph-io
=, thread=thread:spider
^- imp:spider
|= =bowl:mall
=/ m (thread ,~)
;< ~ bind:m start-azimuth:ph-io
;< ~ bind:m (spawn:ph-io ~bud)
;< ~ bind:m (spawn:ph-io ~marbud)
;< ~ bind:m (real-ship:ph-io ~bud)
;< ~ bind:m (real-ship:ph-io ~marbud)
;< file=@t bind:m (touch-file:ph-io ~bud %base)
;< ~ bind:m (check-file-touched:ph-io ~marbud %home file)
;< ~ bind:m (breach-and-hear:ph-io ~bud ~marbud)
;< ~ bind:m (real-ship:ph-io ~bud)
;< ~ bind:m (breach-and-hear:ph-io ~marbud ~bud)
;< ~ bind:m (real-ship:ph-io ~marbud)
;< file=@t bind:m (touch-file:ph-io ~bud %base)
;< file=@t bind:m (touch-file:ph-io ~bud %base)
;< ~ bind:m (check-file-touched:ph-io ~marbud %home file)
;< ~ bind:m end-azimuth:ph-io
(pure:m ~)

View File

@ -0,0 +1,21 @@
/- spider
/+ ph-io
=, thread=thread:spider
^- imp:spider
|= =bowl:mall
=/ m (thread ,~)
;< ~ bind:m start-azimuth:ph-io
;< ~ bind:m (spawn:ph-io ~bud)
;< ~ bind:m (spawn:ph-io ~marbud)
;< ~ bind:m (real-ship:ph-io ~bud)
;< ~ bind:m (real-ship:ph-io ~marbud)
;< file=@t bind:m (touch-file:ph-io ~bud %base)
;< ~ bind:m (check-file-touched:ph-io ~marbud %home file)
;< ~ bind:m (breach:ph-io ~bud)
;< ~ bind:m (real-ship:ph-io ~bud)
;< ~ bind:m (dojo:ph-io ~bud "|merge %base ~marbud %kids, =gem %this")
;< file=@t bind:m (touch-file:ph-io ~bud %base)
;< file=@t bind:m (touch-file:ph-io ~bud %base)
;< ~ bind:m (check-file-touched:ph-io ~marbud %home file)
;< ~ bind:m end-azimuth:ph-io
(pure:m ~)

View File

@ -0,0 +1,21 @@
/- spider
/+ ph-io
=, thread=thread:spider
^- imp:spider
|= =bowl:mall
=/ m (thread ,~)
;< ~ bind:m start-azimuth:ph-io
;< ~ bind:m (spawn:ph-io ~bud)
;< ~ bind:m (spawn:ph-io ~marbud)
;< ~ bind:m (real-ship:ph-io ~bud)
;< ~ bind:m (real-ship:ph-io ~marbud)
;< file=@t bind:m (touch-file:ph-io ~bud %base)
;< ~ bind:m (check-file-touched:ph-io ~marbud %home file)
;< ~ bind:m (breach-and-hear:ph-io ~bud ~marbud)
;< ~ bind:m (real-ship:ph-io ~bud)
;< ~ bind:m (dojo:ph-io ~bud "|merge %base ~marbud %kids, =gem %this")
;< file=@t bind:m (touch-file:ph-io ~bud %base)
;< file=@t bind:m (touch-file:ph-io ~bud %base)
;< ~ bind:m (check-file-touched:ph-io ~marbud %home file)
;< ~ bind:m end-azimuth:ph-io
(pure:m ~)

View File

@ -0,0 +1,14 @@
/- spider
/+ ph-io
=, thread=thread:spider
^- imp:spider
|= =bowl:mall
=/ m (thread ,~)
;< ~ bind:m start-azimuth:ph-io
;< ~ bind:m (spawn:ph-io ~bud)
;< ~ bind:m (spawn:ph-io ~dev)
;< ~ bind:m (real-ship:ph-io ~bud)
;< ~ bind:m (real-ship:ph-io ~dev)
;< ~ bind:m (send-hi:ph-io ~bud ~dev)
;< ~ bind:m end-azimuth:ph-io
(pure:m ~)

View File

@ -0,0 +1,22 @@
/- spider
/+ ph-io
=, thread=thread:spider
^- imp:spider
|= =bowl:mall
=/ m (thread ,~)
;< ~ bind:m start-azimuth:ph-io
;< ~ bind:m (spawn:ph-io ~bud)
;< ~ bind:m (spawn:ph-io ~marbud)
;< ~ bind:m (spawn:ph-io ~linnup-torsyx)
;< ~ bind:m (spawn:ph-io ~dev)
;< ~ bind:m (real-ship:ph-io ~bud)
;< ~ bind:m (real-ship:ph-io ~marbud)
;< ~ bind:m (real-ship:ph-io ~linnup-torsyx)
;< ~ bind:m (real-ship:ph-io ~linnup-torsyx-linnup-torsyx)
;< ~ bind:m (send-hi:ph-io ~bud ~linnup-torsyx-linnup-torsyx)
;< ~ bind:m (send-hi:ph-io ~linnup-torsyx-linnup-torsyx ~marbud)
;< ~ bind:m (real-ship:ph-io ~dev)
;< ~ bind:m (send-hi:ph-io ~linnup-torsyx-linnup-torsyx ~dev)
;< ~ bind:m (send-hi:ph-io ~dev ~linnup-torsyx-linnup-torsyx)
;< ~ bind:m end-azimuth:ph-io
(pure:m ~)

View File

@ -96,6 +96,22 @@
=/ =vase !>([%aqua-eyre-azimuth %azimuth-command !>([%spawn ship])])
(poke-our %spider %spider-imput vase)
::
++ breach
|= who=ship
=/ m (thread ,~)
~& > "breaching {<who>}"
=/ =vase
!>([%aqua-eyre-azimuth %azimuth-command !>([%breach who])])
(poke-our %spider %spider-imput vase)
::
++ breach-and-hear
|= [who=ship her=ship]
=/ m (thread ,~)
~& > "breaching {<who>} for {<her>}"
=/ =vase
!>([%aqua-eyre-azimuth %azimuth-command !>([%breach-and-hear who her])])
(poke-our %spider %spider-imput vase)
::
++ real-ship
|= =ship
=/ m (thread ,~)
@ -156,6 +172,14 @@
;< ~ bind:m (dojo from "|hi {(scow %p to)}")
(wait-for-output from "hi {(scow %p to)} successful")
::
:: Send "|hi" and wait for "not responding" message
::
++ send-hi-not-responding
|= [from=@p to=@p]
=/ m (thread ,~)
;< ~ bind:m (dojo from "|hi {(scow %p to)}")
(wait-for-output from "{(scow %p to)} not responding still trying")
::
:: Mount a desk.
::
++ mount