diff options
author | Vasilis Kalintiris <ehostunreach@gmail.com> | 2013-12-07 15:13:10 +0200 |
---|---|---|
committer | Vasilis Kalintiris <ehostunreach@gmail.com> | 2013-12-07 19:35:59 +0200 |
commit | 88cde68ca050588cad25f0eaa84ab99057f5044b (patch) | |
tree | 6e0acf5c1333c0c576838fddf99f63aeef5d831a /tests/test_core.py | |
parent | 0f29e3b614008e8c1e3fe1caa146b086485efbf7 (diff) |
Use do_run_from_file() for test_perrar
Diffstat (limited to 'tests/test_core.py')
-rw-r--r-- | tests/test_core.py | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/tests/test_core.py b/tests/test_core.py index 20d79a47..b04ea5a8 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -3614,20 +3614,10 @@ ok self.do_run_from_file(src, output) def test_perrar(self): - src = r''' - #include <sys/types.h> - #include <sys/stat.h> - #include <fcntl.h> - #include <stdio.h> + test_path = path_from_root('tests', 'core', 'test_perrar') + src, output = (test_path + s for s in ('.in', '.out')) - int main( int argc, char** argv ){ - int retval = open( "NonExistingFile", O_RDONLY ); - if( retval == -1 ) - perror( "Cannot open NonExistingFile" ); - return 0; - } - ''' - self.do_run(src, 'Cannot open NonExistingFile: No such file or directory\n') + self.do_run_from_file(src, output) def test_atoX(self): if self.emcc_args is None: return self.skip('requires ta2') |