pike.git/
src/
testsuite.in
Branch:
Tag:
Non-build tags
All tags
No tags
2006-06-16
2006-06-16 16:32:24 by Henrik Grubbström (Grubba) <grubba@grubba.org>
e485a0d75623e86d6fc898ada90db9e8b0919fbe (
15
lines) (+
11
/-
4
)
[
Show
|
Annotate
]
Branch:
7.9
Now uses ignore_warning() to filter a few warnings.
Rev: src/testsuite.in:1.766
1:
START_MARKER
-
test_true([["$Id: testsuite.in,v 1.
765
2006/
03
/
25
12
:
48
:
15
grubba Exp $"]]);
+
test_true([["$Id: testsuite.in,v 1.
766
2006/
06
/
16
16
:
32
:
24
grubba Exp $"]]);
// This triggered a bug only if run sufficiently early. test_compile_any([[#pike 7.2]])
7057:
test_eq("foo"[1..10],"oo") test_eq("foo"[-100..0],"f") test_eq("foo"[-100..100],"foo")
-
test_
eq
("foo"[1..0],"")
+
ignore_warning("Range is always empty.", [[
+
test_
any
(
return
"foo"[1..0]
;
,"")
+
]])
test_any(int u=-100; return "foo"[0..u];,"") dnl Use variable to avoid warning. test_eq("foobargazonk"[0..],"foobargazonk") test_eq("foobargazonk"[1..],"oobargazonk")
7082:
test_equal(({1,2,3})[2..10],({3})) test_equal(({1,2,3})[-100..0],({1})) test_equal(({1,2,3})[-100..100],({1,2,3}))
-
test_equal(({1,2,3})[1..0],({}))
+
ignore_warning("Range is always empty.", [[
+
test_
any_
equal(
return
({1,2,3})[1..0]
;
,({}))
+
]])
test_any_equal(int u=-100; return ({1,2,3})[0..u];,({})) dnl Use variable to avoid warning. test_eq("abcdef"[1..3], "bcd")
7096:
test_eq("abcdef"[<3..], "cdef") test_eq("abcdef"[..3], "abcd") test_eq("abcdef"[..<3], "abc")
+
ignore_warning("Redundant range operator.", [[
test_eq("abcdef"[..], "abcdef")
-
+
]])
test_equal(`[..] ("abcdef"/"", 1, Pike.INDEX_FROM_BEG, 3, Pike.INDEX_FROM_BEG), "bcd"/""); test_equal(`[..] ("abcdef"/"", 1, Pike.INDEX_FROM_BEG, 3, Pike.INDEX_FROM_END), "bc"/"");