diff --git a/test/test_cd.ipy b/test/test_cd.ipy index 2214c1b..eee6ace 100644 --- a/test/test_cd.ipy +++ b/test/test_cd.ipy @@ -1,6 +1,18 @@ +# assumes there is /tmp and /opt + +def curpath(): + cwd = os.path.splitdrive(os.getcwd())[1].replace('\\','/') + print cwd + return cwd + import os cd / -assert os.getcwd() == '/' +assert curpath() == '/' %cd /tmp +assert curpath() == '/tmp' +pushd /opt +assert curpath() == '/opt' +popd +assert curpath() == '/tmp' + -assert os.getcwd() == '/tmp'