Skip to content
Snippets Groups Projects
Commit 8bbeb304 authored by Mirar (Pontus Hagland)'s avatar Mirar (Pontus Hagland)
Browse files

added some tests for byteorder sprintf, sscanf

Rev: src/testsuite.in:1.218
parent b606182d
No related branches found
No related tags found
No related merge requests found
test_true([["$Id: testsuite.in,v 1.217 1999/10/31 14:59:37 grubba Exp $"]]) test_true([["$Id: testsuite.in,v 1.218 1999/11/01 13:43:09 mirar Exp $"]])
cond([[all_constants()->_verify_internals]], cond([[all_constants()->_verify_internals]],
[[ [[
...@@ -1467,6 +1467,13 @@ cond([[ sizeof( cpp("__AUTO_BIGNUM__")/"__AUTO_BIGNUM__" ) == 1 ]], ...@@ -1467,6 +1467,13 @@ cond([[ sizeof( cpp("__AUTO_BIGNUM__")/"__AUTO_BIGNUM__" ) == 1 ]],
test_eq([[ sprintf("%08x", @array_sscanf("\8\7\6\5\1\2\3\4", "%8c")) ]], "3807060501020304") test_eq([[ sprintf("%08x", @array_sscanf("\8\7\6\5\1\2\3\4", "%8c")) ]], "3807060501020304")
test_eq([[ sprintf("%08x", @array_sscanf("\010\7\6\5\1\2\3\4", "%8c")) ]], "807060501020304") test_eq([[ sprintf("%08x", @array_sscanf("\010\7\6\5\1\2\3\4", "%8c")) ]], "807060501020304")
test_eq([[ sprintf("%4c",16909060) ]],"\1\2\3\4")
test_eq([[ sprintf("%-4c",16909060) ]],"\4\3\2\1")
test_eq([[ array_sscanf(sprintf("%4c",16909060),"%4c")[0] ]],16909060)
test_eq([[ array_sscanf(sprintf("%-4c",16909060),"%-4c")[0] ]],16909060)
test_eq([[ sprintf("%2c",16909060) ]],"\3\4")
test_eq([[ sprintf("%-2c",16909060) ]],"\4\3")
test_equal([[ ({ 0, 118 }) ]], [[ array_sscanf("0x76", "%xx%x") ]]) test_equal([[ ({ 0, 118 }) ]], [[ array_sscanf("0x76", "%xx%x") ]])
test_equal([[ ({ 0, 557239244978618154304871 }) ]], test_equal([[ ({ 0, 557239244978618154304871 }) ]],
[[ array_sscanf("0x76000000000001234567", "%xx%x") ]]) [[ array_sscanf("0x76000000000001234567", "%xx%x") ]])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment