mirror of
https://github.com/urbit/shrub.git
synced 2024-09-11 20:27:19 +03:00
tests: make /ted/test compile again
It appears that bb8ba24
merged changes to /ted/test from #6790 and #6896
incorrectly, as the thread no longer compiled.
Because the former PR included the change made to the latter (printing
with slog priority 3 in case of failure), the minimum viable fix is
taking the contents of /ted/test from #6790 and using those as-is.
However, that had hidden success prints behind a "quiet" flag, and
provided no way of configuring that from outside the thread. So
additionally, we expand the ""vase parsing"" performed on the thread's
argument, such that an optional _first_ parameter of a quiet=? may be
passed.
This commit is contained in:
parent
2af43c2219
commit
51ec49f980
@ -10,7 +10,7 @@
|
|||||||
+$ test [=beam func=test-func]
|
+$ test [=beam func=test-func]
|
||||||
+$ test-arm [name=term func=test-func]
|
+$ test-arm [name=term func=test-func]
|
||||||
+$ test-func (trap tang)
|
+$ test-func (trap tang)
|
||||||
+$ args quiet=_&
|
+$ args quiet=?
|
||||||
--
|
--
|
||||||
=>
|
=>
|
||||||
|_ =args
|
|_ =args
|
||||||
@ -18,7 +18,7 @@
|
|||||||
|= =beam
|
|= =beam
|
||||||
=/ m (strand ,[(unit vase) tang])
|
=/ m (strand ,[(unit vase) tang])
|
||||||
^- form:m
|
^- form:m
|
||||||
;< res=(unit vase) bind:m
|
;< res=(unit vase) bind:m
|
||||||
(build-file:strandio beam)
|
(build-file:strandio beam)
|
||||||
%+ pure:m res
|
%+ pure:m res
|
||||||
?. =(res ~)
|
?. =(res ~)
|
||||||
@ -117,16 +117,20 @@
|
|||||||
=/ m (strand ,vase)
|
=/ m (strand ,vase)
|
||||||
^- form:m
|
^- form:m
|
||||||
;< =bowl:strand bind:m get-bowl:strandio
|
;< =bowl:strand bind:m get-bowl:strandio
|
||||||
=/ paz=(list path)
|
=/ [quiet=? paz=(list path)]
|
||||||
:: if no args, test everything under /=base=/tests
|
:: if no args, test everything under /=base=/tests
|
||||||
::
|
::
|
||||||
?~ q.arg
|
=* default-tests
|
||||||
~[/(scot %p our.bowl)/[q.byk.bowl]/(scot %da now.bowl)/tests]
|
~[/(scot %p our.bowl)/[q.byk.bowl]/(scot %da now.bowl)/tests]
|
||||||
:: else cast path to ~[path] if needed
|
?+ q.arg !!
|
||||||
::
|
~ [& default-tests]
|
||||||
?@ +<.q.arg
|
[~ ?] =+ !<([~ quiet=?] arg) [quiet default-tests]
|
||||||
[(tail !<([~ path] arg)) ~]
|
[~ ? ^ *] =+ !<([~ quiet=? paz=(list path)] arg) [quiet paz]
|
||||||
(tail !<([~ (list path)] arg))
|
[~ ? ^] =+ !<([~ quiet=? pax=path] arg) [quiet pax ~]
|
||||||
|
[~ ^ *] =+ !<([~ paz=(list path)] arg) [& paz]
|
||||||
|
[~ *] =+ !<([~ pax=path] arg) [& pax ~]
|
||||||
|
==
|
||||||
|
=. quiet.args quiet
|
||||||
=/ bez=(list beam)
|
=/ bez=(list beam)
|
||||||
(turn paz |=(p=path ~|([%test-not-beam p] (need (de-beam p)))))
|
(turn paz |=(p=path ~|([%test-not-beam p] (need (de-beam p)))))
|
||||||
;< fiz=(set [=beam test=(unit term)]) bind:m (find-test-files bez)
|
;< fiz=(set [=beam test=(unit term)]) bind:m (find-test-files bez)
|
||||||
|
Loading…
Reference in New Issue
Block a user