aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-11-23 14:24:51 +0100
committerAlon Zakai <alonzakai@gmail.com>2012-11-23 14:24:51 +0100
commit210bc77d871bd3eac6696ca4749aaaa61148428e (patch)
tree7fa73c8dd8d4cf635e38b557054de98a2bb04860 /tests
parent453ec4adfaae1a0780841c266c0a62dded1be241 (diff)
fix sscanf n bug, fixes #727
Diffstat (limited to 'tests')
-rwxr-xr-xtests/runner.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/runner.py b/tests/runner.py
index f6784a2d..3967cce7 100755
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -4560,11 +4560,15 @@ Pass: 0.000012 0.000012''')
int x = sscanf("one %n two", "%s %n", word, &l);
printf("%d,%s,%d\n", x, word, l);
-
+ {
+ int a, b, c, count;
+ count = sscanf("12345 6789", "%d %n%d", &a, &b, &c);
+ printf("%i %i %i %i\n", count, a, b, c);
+ }
return 0;
}
'''
- self.do_run(src, '''[DEBUG] word 1: version, l: 7\n1,one,4''')
+ self.do_run(src, '''[DEBUG] word 1: version, l: 7\n1,one,4\n2 12345 6 6789\n''')
def test_sscanf_whitespace(self):
src = r'''