aboutsummaryrefslogtreecommitdiff
path: root/tests/runner.py
diff options
context:
space:
mode:
authorAnthony Pesch <inolen@gmail.com>2013-07-15 23:44:38 -0700
committerAnthony Pesch <inolen@gmail.com>2013-08-05 12:36:46 -0700
commit0ddff9d01bb77f7cbcb054b23cb86fc0c2bd18d5 (patch)
treeb957d24e4de9e59c3e42925aeaabc603dad0899c /tests/runner.py
parent4b4ca9844a7ee8e40e3effd9ca5b3d7e279a12d7 (diff)
Updated rename tests
Diffstat (limited to 'tests/runner.py')
-rwxr-xr-xtests/runner.py30
1 files changed, 3 insertions, 27 deletions
diff --git a/tests/runner.py b/tests/runner.py
index 84e8b69e..b57b209a 100755
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -3591,33 +3591,9 @@ Exiting setjmp function, level: 0, prev_jmp: -1
self.do_run(src, 'z:1*', force_c=True)
def test_rename(self):
- src = '''
- #include <stdio.h>
- #include <sys/stat.h>
- #include <sys/types.h>
- #include <assert.h>
-
- int main() {
- int err;
- FILE* fid;
-
- err = mkdir("/foo", 0777);
- err = mkdir("/bar", 0777);
- fid = fopen("/foo/bar", "w+");
- fclose(fid);
-
- err = rename("/foo/bar", "/foo/bar2");
- printf("%d\\n", err);
-
- err = rename("/foo", "/foo/foo");
- printf("%d\\n", err);
-
- err = rename("/foo", "/bar/foo");
- printf("%d\\n", err);
- return 0;
- }
- '''
- self.do_run(src, '0\n-1\n0\n', force_c=True)
+ Building.COMPILER_TEST_OPTS += ['-DUSE_OLD_FS='+str(Settings.USE_OLD_FS)]
+ src = open(path_from_root('tests', 'stdio', 'test_rename.c'), 'r').read()
+ self.do_run(src, 'success', force_c=True)
def test_alloca_stack(self):
if self.emcc_args is None: return # too slow in other modes