diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-03-02 14:52:37 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-03-02 14:52:37 -0800 |
commit | 214fbe8e092b88573fcb3cadec886127ec87d701 (patch) | |
tree | 5281206293c7ba2dcb2d98929c37d3ef4130e563 /tests | |
parent | ab74dbd46dad7a726a817f97d9c4a548e657f168 (diff) | |
parent | 6ba1c5d72bcbbbb8a0dd8100384a367a4c3683f4 (diff) |
Merge pull request #883 from MichaelRiss/perrorFix
Perror formatting fix
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/runner.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/runner.py b/tests/runner.py index 1f4f67d7..8b6e54af 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -5085,6 +5085,22 @@ at function.:blag } ''' self.do_run(src, '22 : me and myself 25 1.34\n21 waka 95\n') + + def test_perror(self): + src = r''' + #include <sys/types.h> + #include <sys/stat.h> + #include <fcntl.h> + #include <stdio.h> + + 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') def test_atoX(self): if self.emcc_args is None: return self.skip('requires ta2') |