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.py22
1 files changed, 3 insertions, 19 deletions
diff --git a/tests/test_core.py b/tests/test_core.py
index 2b9a1f42..07979758 100644
--- a/tests/test_core.py
+++ b/tests/test_core.py
@@ -3733,26 +3733,10 @@ Pass: 0.000012 0.000012''')
self.do_run_from_file(src, output)
def test_sscanf_5(self):
- src = r'''
- #include "stdio.h"
-
- static const char *colors[] = {
- " c black",
- ". c #001100",
- "X c #111100"
- };
+ test_path = path_from_root('tests', 'core', 'test_sscanf_5')
+ src, output = (test_path + s for s in ('.in', '.out'))
- int main(){
- unsigned char code;
- char color[32];
- int rcode;
- for(int i = 0; i < 3; i++) {
- rcode = sscanf(colors[i], "%c c %s", &code, color);
- printf("%i, %c, %s\n", rcode, code, color);
- }
- }
- '''
- self.do_run(src, '2, , black\n2, ., #001100\n2, X, #111100');
+ self.do_run_from_file(src, output)
def test_sscanf_6(self):
src = r'''