aboutsummaryrefslogtreecommitdiff
path: root/tests/test_core.py
diff options
context:
space:
mode:
authorngld <ngld@tproxy.de>2013-09-18 22:59:41 +0200
committerAlon Zakai <alonzakai@gmail.com>2013-09-18 16:40:26 -0500
commit7320a8876a8af7a56f4d782b8403841d40d55d99 (patch)
treea1fec1276470668c9bc022df15c068c09bff3e25 /tests/test_core.py
parent59dc10c4d7e8e240ca8c982ca156015b0ea724fa (diff)
Add a test and myself to AUTHORS.
Diffstat (limited to 'tests/test_core.py')
-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()