diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-06-04 15:13:00 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-06-04 15:13:00 -0700 |
commit | 9645ed34f1003f03970ba3c49a82a3c550a07bac (patch) | |
tree | 4ff22ac2aa1f9001bcee3ebb38db6548fc10c3a1 /tests/runner.py | |
parent | d8d349bb70369e0dcc7f1035549f68ec731c9f84 (diff) | |
parent | e7969e375337f6bea365cf6ccad525200134b773 (diff) |
Merge pull request #1246 from int3/sscanf-caps
Add test for uppercase format specifiers in sscanf.
Diffstat (limited to 'tests/runner.py')
-rwxr-xr-x | tests/runner.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/runner.py b/tests/runner.py index 9db26947..0f8883c8 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -6508,6 +6508,19 @@ Pass: 0.000012 0.000012''') ''' self.do_run(src, '1\n30\n2\n1000000,-123\n') + def test_sscanf_caps(self): + src = r''' + #include "stdio.h" + + int main(){ + unsigned int a; + float e, f, g; + sscanf("a 1.1 1.1 1.1", "%x %E %F %G", &a, &e, &f, &g); + printf("%d %.1F %.1F %.1F\n", a, e, f, g); + } + ''' + self.do_run(src, '10 1.1 1.1 1.1'); + def test_langinfo(self): src = open(path_from_root('tests', 'langinfo', 'test.c'), 'r').read() expected = open(path_from_root('tests', 'langinfo', 'output.txt'), 'r').read() |