t/*: update some tests from my rewrite branch.
Just some minor test fixes so that tests pass on both current redo and the upcoming rewritten one.
This commit is contained in:
parent
21f88094d5
commit
116c279e96
4 changed files with 11 additions and 18 deletions
|
|
@ -1,3 +0,0 @@
|
|||
exec >&2
|
||||
[ -n "$DO_BUILT" ] && exit 0 # not relevant in minimal/do
|
||||
python tstate.py
|
||||
|
|
@ -25,27 +25,32 @@ redo-ifchange usestamp
|
|||
[ "$(wc -l <usestamp.log)" -eq 1 ] || exit 42
|
||||
|
||||
# stampy depends on bob, so we'll have to rebuild stampy automatically. But
|
||||
# stampy's checksum will still be identical.
|
||||
# stampy's checksum will still be identical, so usestamp shouldn't rebuild.
|
||||
../flush-cache
|
||||
redo bob
|
||||
../flush-cache
|
||||
redo-ifchange usestamp
|
||||
[ "$(wc -l <stampy.log)" -eq 3 ] || exit 43
|
||||
[ "$(wc -l <usestamp.log)" -eq 1 ] || exit 44
|
||||
|
||||
# Make sure the previous step correctly marked stampy and usestamp as up-to-date
|
||||
# even though *neither* of them is newer than bob.
|
||||
# Make sure the previous step correctly marked stampy and usestamp as
|
||||
# up-to-date even though *neither* of them is newer than bob.
|
||||
../flush-cache
|
||||
redo-ifchange usestamp
|
||||
[ "$(wc -l <stampy.log)" -eq 3 ] || exit 45
|
||||
[ "$(wc -l <usestamp.log)" -eq 1 ] || exit 46
|
||||
|
||||
# now we're changing the contents of stampy.
|
||||
../flush-cache
|
||||
# now we're changing the contents of stampy. Thus usestamp will need to
|
||||
# be rebuilt, but not yet...
|
||||
echo two >inp
|
||||
../flush-cache
|
||||
redo stampy
|
||||
[ "$(wc -l <stampy.log)" -eq 4 ] || exit 51
|
||||
[ "$(wc -l <usestamp.log)" -eq 1 ] || exit 52
|
||||
|
||||
# let's see about usestamp. It needs to be rebuilt because stampy has changed,
|
||||
# but since stampy is *already* changed, stampy itself shouldn't be re-rebuilt.
|
||||
../flush-cache
|
||||
redo-ifchange usestamp usestamp2
|
||||
[ "$(wc -l <stampy.log)" -eq 4 ] || exit 61
|
||||
[ "$(wc -l <usestamp.log)" -eq 2 ] || exit 62
|
||||
|
|
|
|||
|
|
@ -4,6 +4,6 @@ redo nonshelltest shelltest \
|
|||
deltest deltest2 test.args test2.args passfailtest chdirtest \
|
||||
curse/test deps/test "space dir/test" modetest makedir2 \
|
||||
silencetest touchtest stamp/test alwaystest ifcreate-test \
|
||||
unicode blank/blank vartest atime autosubdir/test pytest \
|
||||
unicode blank/blank vartest atime autosubdir/test \
|
||||
fail/test
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +0,0 @@
|
|||
import sys
|
||||
sys.path.insert(0, '..')
|
||||
import state
|
||||
|
||||
assert(state.relpath('/a/b/c', '/a/b') == 'c')
|
||||
assert(state.relpath('/a/b/c/', '/a/b') == 'c')
|
||||
assert(state.relpath('/a/b/c', '/a/b/') == 'c')
|
||||
assert(state.relpath('/a/b/c//', '/a/b/') == 'c')
|
||||
assert(state.relpath('/a/b/c/../d', '/a/b/') == 'd')
|
||||
Loading…
Add table
Add a link
Reference in a new issue