diff options
author | Vasilis Kalintiris <ehostunreach@gmail.com> | 2013-12-07 15:53:07 +0200 |
---|---|---|
committer | Vasilis Kalintiris <ehostunreach@gmail.com> | 2013-12-07 19:36:00 +0200 |
commit | cfc9c359296d611f158457fc6a54ed8ed2844684 (patch) | |
tree | 2d4b6d8bd750a22649ed58c02e6ba39e543279fa /tests | |
parent | 91e199c9336a8f06bc0e85b084d5a1f8cf60f4aa (diff) |
Use do_run_from_file() for test_sscanf_caps
Diffstat (limited to 'tests')
-rw-r--r-- | tests/core/test_sscanf_caps.in | 10 | ||||
-rw-r--r-- | tests/core/test_sscanf_caps.out | 1 | ||||
-rw-r--r-- | tests/test_core.py | 13 |
3 files changed, 14 insertions, 10 deletions
diff --git a/tests/core/test_sscanf_caps.in b/tests/core/test_sscanf_caps.in new file mode 100644 index 00000000..39a90db5 --- /dev/null +++ b/tests/core/test_sscanf_caps.in @@ -0,0 +1,10 @@ + + #include "stdio.h" + + int main(){ + unsigned int a; + float e, f, g; + sscanf("a 1.1 1.1 1.1", "%X %E %F %G", &a, &e, &f, &g); + printf("%d %.1F %.1F %.1F\n", a, e, f, g); + } +
\ No newline at end of file diff --git a/tests/core/test_sscanf_caps.out b/tests/core/test_sscanf_caps.out new file mode 100644 index 00000000..20e20fe8 --- /dev/null +++ b/tests/core/test_sscanf_caps.out @@ -0,0 +1 @@ +10 1.1 1.1 1.1
\ No newline at end of file diff --git a/tests/test_core.py b/tests/test_core.py index 676b55ca..40361b4c 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -3753,17 +3753,10 @@ Pass: 0.000012 0.000012''') self.do_run_from_file(src, output) def test_sscanf_caps(self): - src = r''' - #include "stdio.h" + test_path = path_from_root('tests', 'core', 'test_sscanf_caps') + src, output = (test_path + s for s in ('.in', '.out')) - int main(){ - unsigned int a; - float e, f, g; - sscanf("a 1.1 1.1 1.1", "%X %E %F %G", &a, &e, &f, &g); - printf("%d %.1F %.1F %.1F\n", a, e, f, g); - } - ''' - self.do_run(src, '10 1.1 1.1 1.1'); + self.do_run_from_file(src, output) def test_sscanf_hex(self): src = r''' |