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

tests for %-4c here

Rev: src/modules/sprintf/testsuite.in:1.24
parent 622953ef
No related branches found
No related tags found
No related merge requests found
...@@ -5,6 +5,15 @@ test_eq([[ array_sscanf(sprintf("%1c", -1), "%1c")[0] ]], 255) ...@@ -5,6 +5,15 @@ test_eq([[ array_sscanf(sprintf("%1c", -1), "%1c")[0] ]], 255)
test_eq([[ array_sscanf(sprintf("%2c", -1), "%2c")[0] ]], 65535) test_eq([[ array_sscanf(sprintf("%2c", -1), "%2c")[0] ]], 65535)
test_eq([[ array_sscanf(sprintf("%3c", -1), "%3c")[0] ]], 16777215) test_eq([[ array_sscanf(sprintf("%3c", -1), "%3c")[0] ]], 16777215)
test_eq([[ sprintf("%4c",16909060) ]],"\1\2\3\4")
test_eq([[ sprintf("%-4c",16909060) ]],"\4\3\2\1")
test_eq([[ sprintf("%2c",16909060) ]],"\3\4")
test_eq([[ sprintf("%-2c",16909060) ]],"\4\3")
test_eq([[ sprintf("%4c",2147483648) ]],"\200\0\0\0")
test_eq([[ sprintf("%-4c",2147483648) ]],"\0\0\0\200")
test_eq([[ sprintf("%2c",2147483648) ]],"\0\0")
test_eq([[ sprintf("%-2c",2147483648) ]],"\0\0")
cond([[ sizeof( cpp("__AUTO_BIGNUM__")/"__AUTO_BIGNUM__" ) == 1 ]], cond([[ sizeof( cpp("__AUTO_BIGNUM__")/"__AUTO_BIGNUM__" ) == 1 ]],
[[ [[
test_eq([[ sprintf("%1c", 0x1abcd7893) ]], "\223") test_eq([[ sprintf("%1c", 0x1abcd7893) ]], "\223")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment