aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJez Ng <me@jezng.com>2013-06-04 14:52:13 -0700
committerJez Ng <me@jezng.com>2013-06-04 14:52:13 -0700
commite5a092c4f3a99a513c730ca2d07062ff65e728f5 (patch)
treea41930809b99506202d12d0a40c41fa498cc9688
parente16878f2b6eb226b3b161c18301c79450f5d5d76 (diff)
Add test for capitalized sscanf format specifiers.
-rwxr-xr-xtests/runner.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/runner.py b/tests/runner.py
index 803c1d2b..65849367 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()