diff options
author | Vasilis Kalintiris <ehostunreach@gmail.com> | 2013-12-07 15:44:20 +0200 |
---|---|---|
committer | Vasilis Kalintiris <ehostunreach@gmail.com> | 2013-12-07 19:36:00 +0200 |
commit | d72499d0a166dba8371cbdd627932aa82b3f58ef (patch) | |
tree | 90e9fb5a40e0d63d939f12de0efeff71a009ccd0 /tests/core | |
parent | 71020af95b4173a0878adb99b0a27ca5adc2ceb6 (diff) |
Use do_run_from_file() for test_sscanf_3
Diffstat (limited to 'tests/core')
-rw-r--r-- | tests/core/test_sscanf_3.in | 17 | ||||
-rw-r--r-- | tests/core/test_sscanf_3.out | 4 |
2 files changed, 21 insertions, 0 deletions
diff --git a/tests/core/test_sscanf_3.in b/tests/core/test_sscanf_3.in new file mode 100644 index 00000000..fb8949e7 --- /dev/null +++ b/tests/core/test_sscanf_3.in @@ -0,0 +1,17 @@ + + #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; + } +
\ No newline at end of file diff --git a/tests/core/test_sscanf_3.out b/tests/core/test_sscanf_3.out new file mode 100644 index 00000000..fe1d5b41 --- /dev/null +++ b/tests/core/test_sscanf_3.out @@ -0,0 +1,4 @@ +3 +123,1073741823,1125899906842620 +3 +-123,-1073741823,-1125899906842620 |