minimal/do: add redo-whichdo support and internal unit tests.
Adding redo-whichdo wasn't so hard, except that it exposed a bunch of mistakes in the way minimal/do was choosing .do files. Most of the wrong names it tried didn't matter (since they're very unlikely to exist) except that they produce the wrong redo-whichdo output. Debugging that took so much effort that I added unit tests for some functions to make it easier to find problems in the future. Note: this change apparently makes minimal/do about 50% slower than before, because the _find_dofiles algorithm got less optimized (but more readable). It's still not very slow, and anyway, since it's minimal/do, I figured readable/correct code probably outweighed a bit of speed. (Although if anyone can come up with an algorithm that's clear *and* works better, I won't turn it down :) I feel like I must be doing it the hard way...)
This commit is contained in:
parent
b0a6bd79f9
commit
7b8fda5e18
7 changed files with 351 additions and 39 deletions
2
test.do
2
test.do
|
|
@ -1,3 +1,3 @@
|
|||
redo-ifchange _all
|
||||
redo t/all
|
||||
redo minimal/test t/all
|
||||
[ -n "$DO_BUILT" ] || echo "Don't forget to test 'minimal/do -c test'" >&2
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue