diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-01-18 14:24:58 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-01-18 14:24:58 -0800 |
commit | 4f176ff75c0fc55af8d7ee273d5757e08c2eb105 (patch) | |
tree | a4f3d383283cfe1ca5d68a4e2a26ecc9193f5de8 /tests/runner.py | |
parent | 1191cf32e013d45a18753e09c383f2627428715b (diff) |
asprintf and some stubs
Diffstat (limited to 'tests/runner.py')
-rwxr-xr-x | tests/runner.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/runner.py b/tests/runner.py index 97efdbc5..0b801a7f 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -4767,7 +4767,7 @@ at function.:blag ''' self.do_run(src, re.sub('(^|\n)\s+', '\\1', expected)) - def test_snprintf0(self): + def test_printf_cases(self): src = r''' #include <stdio.h> int main() { @@ -4775,10 +4775,13 @@ at function.:blag char buf[size]; snprintf(buf, size, "%s %d %.2f\n", "me and myself", 25, 1.345); printf("%d : %s\n", size, buf); + char *buff = NULL; + asprintf(&buff, "%d waka %d\n", 21, 95); + puts(buff); return 0; } ''' - self.do_run(src, '22 : me and myself 25 1.34\n') + self.do_run(src, '22 : me and myself 25 1.34\n21 waka 95\n') def test_atoX(self): if self.emcc_args is None: return self.skip('requires ta2') |