diff options
Diffstat (limited to 'tests/test_core.py')
-rw-r--r-- | tests/test_core.py | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/tests/test_core.py b/tests/test_core.py index d89cb179..2b9a1f42 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -3727,18 +3727,10 @@ Pass: 0.000012 0.000012''') self.do_run_from_file(src, output) def test_sscanf_4(self): - src = r''' - #include <stdio.h> + test_path = path_from_root('tests', 'core', 'test_sscanf_4') + src, output = (test_path + s for s in ('.in', '.out')) - int main() - { - char pYear[16], pMonth[16], pDay[16], pDate[64]; - printf("%d\n", sscanf("Nov 19 2012", "%s%s%s", pMonth, pDay, pYear)); - printf("day %s, month %s, year %s \n", pDay, pMonth, pYear); - return(0); - } - ''' - self.do_run(src, '3\nday 19, month Nov, year 2012'); + self.do_run_from_file(src, output) def test_sscanf_5(self): src = r''' |