aboutsummaryrefslogtreecommitdiff
path: root/tests/test_core.py
diff options
context:
space:
mode:
authorVasilis Kalintiris <ehostunreach@gmail.com>2013-12-07 15:54:29 +0200
committerVasilis Kalintiris <ehostunreach@gmail.com>2013-12-07 19:36:00 +0200
commit0411512023fa05dee8bb16bd23be6e7b303d2557 (patch)
tree98afb371f05986d5fe57a83d65b4978d395ad5ec /tests/test_core.py
parentcfc9c359296d611f158457fc6a54ed8ed2844684 (diff)
Use do_run_from_file() for test_sscanf_hex
Diffstat (limited to 'tests/test_core.py')
-rw-r--r--tests/test_core.py12
1 files changed, 3 insertions, 9 deletions
diff --git a/tests/test_core.py b/tests/test_core.py
index 40361b4c..c4fef6eb 100644
--- a/tests/test_core.py
+++ b/tests/test_core.py
@@ -3759,16 +3759,10 @@ Pass: 0.000012 0.000012''')
self.do_run_from_file(src, output)
def test_sscanf_hex(self):
- src = r'''
- #include "stdio.h"
+ test_path = path_from_root('tests', 'core', 'test_sscanf_hex')
+ src, output = (test_path + s for s in ('.in', '.out'))
- int main(){
- unsigned int a, b;
- sscanf("0x12AB 12AB", "%x %x", &a, &b);
- printf("%d %d\n", a, b);
- }
- '''
- self.do_run(src, '4779 4779')
+ self.do_run_from_file(src, output)
def test_sscanf_float(self):
src = r'''