aboutsummaryrefslogtreecommitdiff
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
parent59dc10c4d7e8e240ca8c982ca156015b0ea724fa (diff)
Add a test and myself to AUTHORS.
-rw-r--r--AUTHORS2
-rw-r--r--tests/test_core.py12
2 files changed, 13 insertions, 1 deletions
diff --git a/AUTHORS b/AUTHORS
index 5c22b029..604bd6bd 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -96,5 +96,5 @@ a license to everyone to use it as detailed in LICENSE.)
* Aidan Hobson Sayers <aidanhs@cantab.net>
* Charlie Birks <admin@daftgames.net>
* Ranger Harke <ranger.harke@autodesk.com> (copyright owned by Autodesk, Inc.)
-* Tobias Vrinssen <tobias@vrinssen.de>
+* Tobias Vrinssen <tobias@vrinssen.de>
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()