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.py21
1 files changed, 3 insertions, 18 deletions
diff --git a/tests/test_core.py b/tests/test_core.py
index c2faf81d..d89cb179 100644
--- a/tests/test_core.py
+++ b/tests/test_core.py
@@ -3720,26 +3720,11 @@ Pass: 0.000012 0.000012''')
def test_sscanf_3(self):
# i64
if not Settings.USE_TYPED_ARRAYS == 2: return self.skip('64-bit sscanf only supported in ta2')
- src = r'''
- #include <stdint.h>
- #include <stdio.h>
-
- int main(){
-
- int64_t s, m, l;
- printf("%d\n", sscanf("123 1073741823 1125899906842620", "%lld %lld %lld", &s, &m, &l));
- printf("%lld,%lld,%lld\n", s, m, l);
- int64_t negS, negM, negL;
- printf("%d\n", sscanf("-123 -1073741823 -1125899906842620", "%lld %lld %lld", &negS, &negM, &negL));
- printf("%lld,%lld,%lld\n", negS, negM, negL);
-
- return 0;
- }
- '''
+ test_path = path_from_root('tests', 'core', 'test_sscanf_3')
+ src, output = (test_path + s for s in ('.in', '.out'))
- self.do_run(src, '3\n123,1073741823,1125899906842620\n' +
- '3\n-123,-1073741823,-1125899906842620\n')
+ self.do_run_from_file(src, output)
def test_sscanf_4(self):
src = r'''