Test for precenting state.relpath fix.
This commit is contained in:
parent
705722d612
commit
fb20652d04
3 changed files with 12 additions and 1 deletions
2
t/pytest.do
Normal file
2
t/pytest.do
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
exec >&2
|
||||
python tstate.py
|
||||
|
|
@ -4,4 +4,4 @@ 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
|
||||
unicode blank/blank vartest atime autosubdir/test pytest
|
||||
|
|
|
|||
9
t/tstate.py
Normal file
9
t/tstate.py
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
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