diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-01-19 09:50:16 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-01-19 09:50:39 -0800 |
commit | 35cbbe82edf2173092592244aa342285fbcb5e44 (patch) | |
tree | f9e40d77a363b183c116cd7fdd263facf1776631 /tests/runner.py | |
parent | 6c32b689d351683b9a823ef83bef51aca0a8014b (diff) | |
parent | ee67164cc8238b52a77a47ee4efca934ffdcbba7 (diff) |
Merge branch 'incoming' of https://github.com/manuels/emscripten into incoming
Diffstat (limited to 'tests/runner.py')
-rwxr-xr-x | tests/runner.py | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/tests/runner.py b/tests/runner.py index 3a7f1565..a33bf133 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -4920,13 +4920,19 @@ at function.:blag printf("%f, %f\n", atof("1.234567"), atof("cheez")); - float n = -1; - sscanf(" 2.8208", "%f", &n); - printf("%.4f\n", n); + char float_formats[] = "fegE"; + char format[] = "%_"; + for(int i = 0; i < 4; ++i) { + format[1] = float_formats[i]; - float a = -1; - sscanf("-3.03", "%f", &a); - printf("%.4f\n", a); + float n = -1; + sscanf(" 2.8208", format, &n); + printf("%.4f\n", n); + + float a = -1; + sscanf("-3.03", format, &a); + printf("%.4f\n", a); + } char buffy[100]; sscanf("cheez some thing moar 123\nyet more\n", "cheez %s", buffy); @@ -4959,7 +4965,7 @@ at function.:blag return 0; } ''' - self.do_run(src, 'en-us : 2\nen-r : 99\nen : 3\n1.234567, 0.000000\n2.8208\n-3.0300\n|some|\n|something|\n|somethingmoar|\n' + + self.do_run(src, 'en-us : 2\nen-r : 99\nen : 3\n1.234567, 0.000000\n2.8208\n-3.0300\n2.8208\n-3.0300\n2.8208\n-3.0300\n2.8208\n-3.0300\n|some|\n|something|\n|somethingmoar|\n' + '1\n1499\n' + '5\n87,0.481565,0.059481,0,1\n' + '3\n-123,4294966531,-34\n' + |