diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-05-09 18:41:13 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-05-09 18:41:13 -0700 |
commit | bb9317e1eb68a975cb9462d0cd61c62ff6061a49 (patch) | |
tree | 24d6d9346a647aadd37e7646c53e1596e26e8eec /tests | |
parent | fe0e6110261a2ccc742334699aa247b428348b82 (diff) |
sscanf support for negative integers
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/runner.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/runner.py b/tests/runner.py index 17acdbd9..f44dc95a 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -3819,12 +3819,17 @@ at function.:blag printf("%d\n", sscanf(" vert 87 ( 0.481565 0.059481 ) 0 1\n", " vert %d ( %f %f ) %hu %hu", &index, &u, &v, &start, &count)); printf("%d,%.6f,%.6f,%hu,%hu\n", index, u, v, start, count); + int neg, neg2, neg3 = 0; + printf("%d\n", sscanf("-123 -765 -34-6", "%d %u %d", &neg, &neg2, &neg3)); + printf("%d,%u,%d\n", neg, neg2, neg3); + return 0; } ''' self.do_run(src, 'en-us : 2\nen-r : 99\nen : 3\n1.234567, 0.000000\n-3.0300\n|some|\n|something|\n|somethingmoar|\n' + '1\n1499\n' + - '5\n87,0.481565,0.059481,0,1\n') + '5\n87,0.481565,0.059481,0,1\n' + + '3\n-123,4294966531,-34\n') def test_sscanf_2(self): # doubles |