aboutsummaryrefslogtreecommitdiff
path: root/tests/test_core.py
diff options
context:
space:
mode:
authorVasilis Kalintiris <ehostunreach@gmail.com>2013-12-07 15:45:12 +0200
committerVasilis Kalintiris <ehostunreach@gmail.com>2013-12-07 19:36:00 +0200
commitdff0b829dd8e624942eef87385ddbe72b3695e8e (patch)
treeb4e14e864b60bf54881be74d026dac7ff1f9c14c /tests/test_core.py
parentd72499d0a166dba8371cbdd627932aa82b3f58ef (diff)
Use do_run_from_file() for test_sscanf_4
Diffstat (limited to 'tests/test_core.py')
-rw-r--r--tests/test_core.py14
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'''