diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/Chmod.py | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/test/Chmod.py b/test/Chmod.py index c00aea0..c5b2a8d 100644 --- a/test/Chmod.py +++ b/test/Chmod.py @@ -64,6 +64,11 @@ env.Command('f7.out', 'f7.in', [Cat, env = Environment(FILE = 'f9') env.Command('f8.out', 'f8.in', [Chmod(['$FILE', File('f10')], 0666), Cat]) Execute(Chmod(['d11', Dir('d12')], 0777)) +Execute(Chmod('f13', "a=r")) +Execute(Chmod('f14', "ogu+w")) +Execute(Chmod('f15', "ug=rw, go+ rw")) +Execute(Chmod('d16', "0777")) +Execute(Chmod(['d17', 'd18'], "ogu = rwx")) """) test.write('f1', "f1\n") @@ -86,6 +91,12 @@ test.write('f9', "f9\n") test.write('f10', "f10\n") test.subdir('d11') test.subdir('d12') +test.write('f13', "f13\n") +test.write('f14', "f14\n") +test.write('f15', "f15\n") +test.subdir('d16') +test.subdir('d17') +test.subdir('d18') os.chmod(test.workpath('f1'), 0444) os.chmod(test.workpath('f1-File'), 0444) @@ -100,6 +111,12 @@ os.chmod(test.workpath('f9'), 0444) os.chmod(test.workpath('f10'), 0444) os.chmod(test.workpath('d11'), 0555) os.chmod(test.workpath('d12'), 0555) +os.chmod(test.workpath('f13'), 0444) +os.chmod(test.workpath('f14'), 0444) +os.chmod(test.workpath('f15'), 0444) +os.chmod(test.workpath('d16'), 0555) +os.chmod(test.workpath('d17'), 0555) +os.chmod(test.workpath('d18'), 0555) expect = test.wrap_stdout(read_str = """\ Chmod("f1", 0666) @@ -107,6 +124,11 @@ Chmod("f1-File", 0666) Chmod("d2", 0777) Chmod("d2-Dir", 0777) Chmod(["d11", "d12"], 0777) +Chmod("f13", "a=r") +Chmod("f14", "ogu+w") +Chmod("f15", "ug=rw, go+ rw") +Chmod("d16", "0777") +Chmod(["d17", "d18"], "ogu = rwx") """, build_str = """\ cat(["bar.out"], ["bar.in"]) @@ -152,6 +174,18 @@ s = stat.S_IMODE(os.stat(test.workpath('d11'))[stat.ST_MODE]) test.fail_test(s != 0555) s = stat.S_IMODE(os.stat(test.workpath('d12'))[stat.ST_MODE]) test.fail_test(s != 0555) +s = stat.S_IMODE(os.stat(test.workpath('f13'))[stat.ST_MODE]) +test.fail_test(s != 0444) +s = stat.S_IMODE(os.stat(test.workpath('f14'))[stat.ST_MODE]) +test.fail_test(s != 0444) +s = stat.S_IMODE(os.stat(test.workpath('f15'))[stat.ST_MODE]) +test.fail_test(s != 0444) +s = stat.S_IMODE(os.stat(test.workpath('d16'))[stat.ST_MODE]) +test.fail_test(s != 0555) +s = stat.S_IMODE(os.stat(test.workpath('d17'))[stat.ST_MODE]) +test.fail_test(s != 0555) +s = stat.S_IMODE(os.stat(test.workpath('d18'))[stat.ST_MODE]) +test.fail_test(s != 0555) test.run() @@ -185,6 +219,18 @@ s = stat.S_IMODE(os.stat(test.workpath('d11'))[stat.ST_MODE]) test.fail_test(s != 0777) s = stat.S_IMODE(os.stat(test.workpath('d12'))[stat.ST_MODE]) test.fail_test(s != 0777) +s = stat.S_IMODE(os.stat(test.workpath('f13'))[stat.ST_MODE]) +test.fail_test(s != 0444) +s = stat.S_IMODE(os.stat(test.workpath('f14'))[stat.ST_MODE]) +test.fail_test(s != 0666) +s = stat.S_IMODE(os.stat(test.workpath('f15'))[stat.ST_MODE]) +test.fail_test(s != 0666) +s = stat.S_IMODE(os.stat(test.workpath('d16'))[stat.ST_MODE]) +test.fail_test(s != 0777) +s = stat.S_IMODE(os.stat(test.workpath('d17'))[stat.ST_MODE]) +test.fail_test(s != 0777) +s = stat.S_IMODE(os.stat(test.workpath('d18'))[stat.ST_MODE]) +test.fail_test(s != 0777) test.pass_test() |