pike.git/
src/
testsuite.in
Branch:
Tag:
Non-build tags
All tags
No tags
2007-05-03
2007-05-03 16:34:26 by Henrik Grubbström (Grubba) <grubba@grubba.org>
b0b5beefbc3f32132c64be654fb857a3b7a9822d (
12
lines) (+
10
/-
2
)
[
Show
|
Annotate
]
Branch:
7.9
Supress warning about indexing of the empty string.
Rev: src/testsuite.in:1.778
1:
START_MARKER
-
test_true([["$Id: testsuite.in,v 1.
777
2007/05/03
09
:
08
:
05
grubba Exp $"]]);
+
test_true([["$Id: testsuite.in,v 1.
778
2007/05/03
16
:
34
:
26
grubba Exp $"]]);
// This triggered a bug only if run sufficiently early. test_compile_any([[#pike 7.2]])
6413:
// typeof test_eq(sprintf("%O", typeof(1)),"int(1..1)") test_eq(sprintf("%O", typeof("")),"string(zero)")
-
test_
eq
(sprintf("%
O
", typeof(""[0])),"zero")
+
test_
any
(
[[
+
// Suppress warnings.
+
class handler {
+
void compile_warning (string file, int line, string err) {};
+
};
+
return compile_string("string s =
sprintf(
\
"%
O\
", typeof(
\
"
\
"[0]))
;"
,
+
"
-", handler())()->s;
+
]], "
zero")
test_eq(sprintf("%O", typeof(0.0)),"float") test_eq(sprintf("%O", typeof(all_constants()["all_constants"])),"mixed")