mirror of
https://github.com/urbit/shrub.git
synced 2025-01-03 01:54:43 +03:00
pkg: -test shouldn't require a list of paths
Changes the test command to check if args contains a single path and wraps it in a list. Now a test thread can be started without providing a list: -test %/tests/lib And passing a list still works: test %/tests/lib ~ One nit in this change is the lark expression to reach into args: if args is ~ then instead of getting a useful need/have error, the test ends in a "false-start". Perhaps this could be fixed by detecting ~ and setting it to %/tests.
This commit is contained in:
parent
5b773723b3
commit
09fdc43e6b
@ -109,6 +109,10 @@
|
||||
=/ m (strand ,vase)
|
||||
^- form:m
|
||||
=/ paz=(list path)
|
||||
:: promote path to ~[path] if needed
|
||||
::
|
||||
?@ +<.q.arg
|
||||
[(tail !<([~ path] arg)) ~]
|
||||
(tail !<([~ (list path)] arg))
|
||||
=/ bez=(list beam)
|
||||
(turn paz |=(p=path ~|([%test-not-beam p] (need (de-beam p)))))
|
||||
|
Loading…
Reference in New Issue
Block a user