pike.git
/
src
/
testsuite.in
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/testsuite.in:1:
START_MARKER
-
test_true([["$Id: testsuite.in,v 1.
750
2004
/
12
/
19
16
:
25:
36 grubba Exp $"]]);
+
test_true([["$Id: testsuite.in,v 1.
751
2005
/
01
/
17
15
:
36
:
32
grubba Exp $"]]);
// This triggered a bug only if run sufficiently early. test_compile_any([[#pike 7.2]]) test_compile_any([[#pike 7.4]]) test_compile_any([[#pike 7.0]]) test_compile_any([[#pike 0.6]]) cond([[all_constants()->_verify_internals]], [[ test_do(_verify_internals())
pike.git/src/testsuite.in:448:
test_type_error(program,array,({1,2,3})) test_type_error(program,mapping,([1:2,3:4])) test_type_error(program,multiset,(<1,2,3>)) test_type_error(object,int,17) test_type_error(object,float,17.23) test_type_error(object,array,({1,2,3})) test_type_error(object,mapping,([1:2,3:4])) test_type_error(object,multiset,(<1,2,3>))
+
test_any([[
+
/* Detect bug in modify_shared_string().
+
*
+
* Note: For proper operation this test depends on HASH_PREFIX being
+
* <= 128, and the initial string in test having a single ref.
+
*/
+
string prefix = "A"*128;
+
string suffix = "B"*128;
+
+
string test = prefix + "C" + suffix;
+
string match = prefix + "D" + suffix;
+
+
if (test == match) return("Early match!");
+
+
test[128] = 'D';
+
+
if (test != match) return("Late mismatch!");
+
]], 0)
+
test_compile_error([[ string a="abcb"; a=a/"b"; ]]) test_compile_error([[ string a="abcb"; a/="b"; ]]) test_compile_error([[ string a="abcb"; string b="b"; a=a/b; ]]) test_compile_error([[ string a="abcb"; string b="b"; a/=b; ]]) test_compile_error([[ string a="x"; int b; b="x"*17; ]]) test_compile_error([[ string a="x"; array b; b="x"*17; ]]) test_compile_error([[ int b=17; string a; a=b*42; ]]) test_compile_error([[ int b=17; float c=42.0; b=b/c; ]]) test_compile_error([[ int b=17; float c=42.0; b/=c; ]]) test_compile_error([[ int b=17; float c=42.0; b=b*c; ]])