Skip to content
Snippets Groups Projects
Commit 1089c470 authored by Fredrik Hübinette (Hubbe)'s avatar Fredrik Hübinette (Hubbe)
Browse files

added additional tests for sscanf

Rev: src/test/create_testsuite:1.5
parent 0e13924b
No related branches found
No related tags found
No related merge requests found
...@@ -137,6 +137,11 @@ test_any(function bar=clone((program)"/test")->foo; return bar(),17) ...@@ -137,6 +137,11 @@ test_any(function bar=clone((program)"/test")->foo; return bar(),17)
// sscanf // sscanf
test_any([[mixed a; return sscanf("11","%d",a)]],1) test_any([[mixed a; return sscanf("11","%d",a)]],1)
test_any([[mixed a; sscanf("11","%d",a); return a]],11) test_any([[mixed a; sscanf("11","%d",a); return a]],11)
test_any([[mixed a; sscanf("11","%o",a); return a]],011)
test_any([[mixed a; sscanf("11","%x",a); return a]],0x11)
test_any([[mixed a; sscanf("11","%D",a); return a]],11)
test_any([[mixed a; sscanf("0x11","%D",a); return a]],0x11)
test_any([[mixed a; sscanf("011","%D",a); return a]],011)
test_any([[mixed a,b; return sscanf("11foo","%dfoo",a)]],1) test_any([[mixed a,b; return sscanf("11foo","%dfoo",a)]],1)
test_any([[mixed a,b; sscanf("11foo","%dfoo",a); return a]],11) test_any([[mixed a,b; sscanf("11foo","%dfoo",a); return a]],11)
test_any([[mixed a,b; return sscanf("11foo","%d%s",a,b)]],2) test_any([[mixed a,b; return sscanf("11foo","%d%s",a,b)]],2)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment