aboutsummaryrefslogtreecommitdiff
path: root/tests/test_core.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_core.py')
-rw-r--r--tests/test_core.py20
1 files changed, 3 insertions, 17 deletions
diff --git a/tests/test_core.py b/tests/test_core.py
index 5b3a64dd..cdee3c76 100644
--- a/tests/test_core.py
+++ b/tests/test_core.py
@@ -3588,24 +3588,10 @@ ok
self.do_run(src, expected)
def test_printf_2(self):
- src = r'''
- #include <stdio.h>
-
- int main() {
- char c = '1';
- short s = 2;
- int i = 3;
- long long l = 4;
- float f = 5.5;
- double d = 6.6;
-
- printf("%c,%hd,%d,%lld,%.1f,%.1llf\n", c, s, i, l, f, d);
- printf("%#x,%#x\n", 1, 0);
+ test_path = path_from_root('tests', 'core', 'test_printf_2')
+ src, output = (test_path + s for s in ('.in', '.out'))
- return 0;
- }
- '''
- self.do_run(src, '1,2,3,4,5.5,6.6\n0x1,0\n')
+ self.do_run_from_file(src, output)
def test_vprintf(self):
src = r'''