diff options
author | max99x <max99x@gmail.com> | 2011-08-28 19:47:53 +0300 |
---|---|---|
committer | max99x <max99x@gmail.com> | 2011-08-28 19:47:53 +0300 |
commit | f1b66bafaef5b19564a6753c3c35edfa229bc9f7 (patch) | |
tree | 75ef816643fc9352793aa7d7089530c00fe87c96 /tests/runner.py | |
parent | 8d2a080af4b8e83f27b8ccb32a2ed945b80a6c68 (diff) |
Fix for field size in _scanString().
Diffstat (limited to 'tests/runner.py')
-rw-r--r-- | tests/runner.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/runner.py b/tests/runner.py index 17efec06..09ea6745 100644 --- a/tests/runner.py +++ b/tests/runner.py @@ -667,8 +667,9 @@ if 'benchmark' not in sys.argv: memmove(&x, &y, magic-7); // 0 should not crash us int xx, yy, zz; - int cc = sscanf("abc_10.b1_xyz_543", "abc_%d.%2x_xyz_%3d", &xx, &yy, &zz); - printf("%d:%d,%d,%d\\n", cc, xx, yy, zz); + char s[32]; + int cc = sscanf("abc_10.b1_xyz_543_defg", "abc_%d.%2x_xyz_%3d_%3s", &xx, &yy, &zz, s); + printf("%d:%d,%d,%d,%s\\n", cc, xx, yy, zz, s); printf("%d\\n", argc); puts(argv[1]); @@ -687,7 +688,7 @@ if 'benchmark' not in sys.argv: return 0; } ''' - self.do_test(src, '3:10,177,543\n4\nwowie\ntoo\n76\n5\n(null)\n/* a comment */\n// another\ntest\n', ['wowie', 'too', '74']) + self.do_test(src, '4:10,177,543,def\n4\nwowie\ntoo\n76\n5\n(null)\n/* a comment */\n// another\ntest\n', ['wowie', 'too', '74']) def test_error(self): src = r''' |