diff options
author | YeZhongWen <linghuye2.0@gmail.com> | 2012-04-13 13:36:34 +0800 |
---|---|---|
committer | YeZhongWen <linghuye2.0@gmail.com> | 2012-04-13 13:36:34 +0800 |
commit | 336f05f36991de6e3650d0af9822d9a78918bcfb (patch) | |
tree | c9b10a97b9b147bde12fd981d044a253e4a97577 /tests | |
parent | a78926a883c5a3747e5684c23637e33c45f5bbe2 (diff) |
Add test case for strlwr/strupr
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 38c79751..673193c5 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -3647,6 +3647,22 @@ at function.:blag src = open(path_from_root('tests', 'parseInt', 'src.c'), 'r').read() expected = open(path_from_root('tests', 'parseInt', 'output.txt'), 'r').read() self.do_run(src, expected) + + def test_transtrcase(self): + src = ''' + #include <stdio.h> + #include <string.h> + int main() { + char szToupr[] = "hello, "; + char szTolwr[] = "EMSCRIPTEN"; + strupr(szToupr); + strlwr(szTolwr); + printf(szToupr); + printf(szTolwr); + return 0; + } + ''' + self.do_run(src, 'HELLO, emscripten') def test_printf(self): if Settings.USE_TYPED_ARRAYS != 2: return self.skip('i64 mode 1 requires ta2') |