pike.git/
src/
testsuite.in
Branch:
Tag:
Non-build tags
All tags
No tags
2022-06-22
2022-06-22 10:09:25 by Henrik Grubbström (Grubba) <grubba@grubba.org>
d7b2968484e23d788d1c26ce092463e1026aebb5 (
15
lines) (+
11
/-
4
)
[
Show
|
Annotate
]
Branch:
master
Testsuite: Stricter handling of signed integers in sscanf() et al.
8133:
test_eq("-12345678901234567890", [[ (string)array_sscanf("-12345678901234567890", "%d")[0] ]]) test_eq("-1375488932614371410344080",
-
[[ (string)array_sscanf("-123456789F01234567890", "%x")[0] ]])
+
[[ (string)
8.0::
array_sscanf("-123456789F01234567890", "%x")[0] ]])
+
test_eq(({}),
+
[[ array_sscanf("-123456789F01234567890", "%x") ]])
test_eq("-1375488932614371410344080", [[ (string)array_sscanf("-0x123456789F01234567890","%i")[0] ]]) test_eq("-45954944846776",
-
[[ (string)array_sscanf("-1234567012345670", "%o")[0] ]])
+
[[ (string)
8.0::
array_sscanf("-1234567012345670", "%o")[0] ]])
+
test_eq(({}),
+
[[ array_sscanf("-1234567012345670", "%o") ]])
test_eq("-45954944846776", [[ (string)array_sscanf("-01234567012345670", "%i")[0] ]])
-
test_eq("-11", [[ (string)array_sscanf("-1011", "%b")[0] ]])
-
test_eq("-1125968643114208", [[ (string)array_sscanf("-100000000000001000000000001000000000100010011100000", "%b")[0] ]])
+
test_eq("-11", [[ (string)
8.0::
array_sscanf("-1011", "%b")[0] ]])
+
test_eq(
({}), [[ array_sscanf(
"-
1011", "%b") ]])
+
test_eq("-
1125968643114208",
+
[[ (string)
8.0::
array_sscanf("-100000000000001000000000001000000000100010011100000", "%b")[0] ]])
test_eq("-11", [[ (string)array_sscanf("-0b1011", "%i")[0] ]]) test_eq("-1125968643114208", [[ (string)array_sscanf("-0b100000000000001000000000001000000000100010011100000", "%i")[0] ]])