summaryrefslogtreecommitdiffhomepage
path: root/tests/custom/99_bugs/49_trailing_garbage_string_as_number
blob: 1b48146b1e7ab98fa010c73aeb30a980939e0965 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Ensure that numeric strings followed by non-whitespace are treated as NaN.

-- Testcase --
{%
printf("%.J\n", [
	"1" == 1,
	" 1" == 1,
	"1 " == 1,
	"1a" == 1,
	"1 a" == 1
]);
%}
-- End --

-- Expect stdout --
[
	true,
	true,
	true,
	false,
	false
]
-- End --