Please note that the CVS and issue trackers have moved to GitHub. These Trac pages are no longer kept up-to-date.

root/seattle/branches/nacl_repy/seattlelib/tests/ut_lind_fs_dir_chdir.py

Revision 5140, 0.7 KB (checked in by justinc, 6 years ago)

removed circular imports and created a new Python testing mechanism called
lind_test_server. This removes the need for wrappers, etc.

Line 
1from lind_fs_constants import *
2import lind_test_server
3
4# Let's add a few directories to the system and see if it works...
5lind_test_server._blank_fs_init()
6
7lind_test_server.mkdir_syscall('/bar',S_IRWXA)
8
9lind_test_server.mkdir_syscall('/bar/baz',S_IRWXA)
10
11lind_test_server.mkdir_syscall('/bar/baz/yaargh',0)
12
13lind_test_server.access_syscall('bar',F_OK)
14
15# go to bar and look for baz...
16lind_test_server.chdir_syscall('bar')
17
18lind_test_server.access_syscall('baz',F_OK)
19
20# go to back up and look bar...
21lind_test_server.chdir_syscall('..')
22
23lind_test_server.access_syscall('bar',F_OK)
24
25# go to the yaargh dir
26lind_test_server.chdir_syscall('/bar/baz/yaargh')
27
28lind_test_server.access_syscall('../../baz',F_OK)
Note: See TracBrowser for help on using the browser.