diff options
Diffstat (limited to 'tests/test_core.py')
-rw-r--r-- | tests/test_core.py | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/tests/test_core.py b/tests/test_core.py index c4fef6eb..b0a676d0 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -3765,16 +3765,10 @@ Pass: 0.000012 0.000012''') self.do_run_from_file(src, output) def test_sscanf_float(self): - src = r''' - #include "stdio.h" + test_path = path_from_root('tests', 'core', 'test_sscanf_float') + src, output = (test_path + s for s in ('.in', '.out')) - int main(){ - float f1, f2, f3, f4, f5, f6, f7, f8, f9; - sscanf("0.512 0.250x5.129_-9.98 1.12*+54.32E3 +54.32E3^87.5E-3 87.5E-3$", "%f %fx%f_%f %f*%f %f^%f %f$", &f1, &f2, &f3, &f4, &f5, &f6, &f7, &f8, &f9); - printf("\n%f, %f, %f, %f, %f, %f, %f, %f, %f\n", f1, f2, f3, f4, f5, f6, f7, f8, f9); - } - ''' - self.do_run(src, '\n0.512000, 0.250000, 5.129000, -9.980000, 1.120000, 54320.000000, 54320.000000, 0.087500, 0.087500\n') + self.do_run_from_file(src, output) def test_langinfo(self): src = open(path_from_root('tests', 'langinfo', 'test.c'), 'r').read() |