aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test_core.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/test_core.py b/tests/test_core.py
index a882ab59..05f3acc6 100644
--- a/tests/test_core.py
+++ b/tests/test_core.py
@@ -7201,6 +7201,18 @@ date: 18.07.2013w; day 18, month 7, year 2013, extra: 201, 3
'''
self.do_run(src, '10 1.1 1.1 1.1');
+ def test_sscanf_hex(self):
+ src = r'''
+ #include "stdio.h"
+
+ 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')
+
def test_langinfo(self):
src = open(path_from_root('tests', 'langinfo', 'test.c'), 'r').read()
expected = open(path_from_root('tests', 'langinfo', 'output.txt'), 'r').read()