Branch: Tag:

2002-11-16

2002-11-16 14:51:05 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Constants installed by the original master are now restored after the replace_master() tests.

Rev: src/testsuite.in:1.564

1: - test_true([["$Id: testsuite.in,v 1.563 2002/11/14 18:17:28 grubba Exp $"]]); + test_true([["$Id: testsuite.in,v 1.564 2002/11/16 14:51:05 grubba Exp $"]]);      // This triggered a bug only if run sufficiently early.   test_compile_any([[#pike 7.2]])
1352:    return var;   ]], 1);    + test_do([[ +  // Save our constants for future use... +  add_constant("__saved_constants__", ([]) + all_constants()); + ]]) +    test_any([[    Stdio.write_file("testsuite_test.pmod",    #"
1629:   ]]);   ]]);    + test_do([[ +  // Restore constants that were zapped by the various masters used above. +  foreach(__saved_constants__; string const; mixed val) { +  add_constant(const, val); +  } +  add_constant("__saved_constants__"); + ]]) +    test_compile_any([[int log() { return 17; } class Greta { int hanna() { return log(); } }]])   test_compile_any([[int kajsa(int a,int b) { return 17; } class Jenny { int kajsa() { return 17; } class Greta { int hanna() { return kajsa(); } } }]])   test_any([[add_constant("kajsa",lambda(int a,int b) { return 17; }); return compile_string("int kajsa() { return 17; } class Greta { int hanna() { return kajsa(); } }")()->kajsa()]],17)