##// END OF EJS Templates
update test_cd with pushd/popd
vivainio -
Show More
@@ -1,6 +1,18 b''
1 # assumes there is /tmp and /opt
2
3 def curpath():
4 cwd = os.path.splitdrive(os.getcwd())[1].replace('\\','/')
5 print cwd
6 return cwd
7
1 import os
8 import os
2 cd /
9 cd /
3 assert os.getcwd() == '/'
10 assert curpath() == '/'
4 %cd /tmp
11 %cd /tmp
12 assert curpath() == '/tmp'
13 pushd /opt
14 assert curpath() == '/opt'
15 popd
16 assert curpath() == '/tmp'
17
5
18
6 assert os.getcwd() == '/tmp'
General Comments 0
You need to be logged in to leave comments. Login now