v22.2b14/
v22.2b14/Win32/
v22.2b14/compat/
v22.2b14/testsuite/
v22.2b14/testsuite/clone/
v22.2b14/testsuite/command/
v22.2b14/testsuite/data/
v22.2b14/testsuite/etc/
v22.2b14/testsuite/include/
v22.2b14/testsuite/inherit/
v22.2b14/testsuite/inherit/master/
v22.2b14/testsuite/log/
v22.2b14/testsuite/single/
v22.2b14/testsuite/single/tests/compiler/
v22.2b14/testsuite/single/tests/efuns/
v22.2b14/testsuite/single/tests/operators/
v22.2b14/testsuite/u/
v22.2b14/tmp/
#define IS(x, y) ASSERT2(save_variable(x)==y, sprintf("%O %O", x, save_variable(x)))

mapping values = 
([
  "\n" : "\"\r\"",
  "\"" : "\"\\\"\"",
  "\"x\\\n" : "\"\\\"x\\\\\r\"",
  -1 : "-1",
  0 : "0",
  1 : "1",
  22 : "22",
  1.2 : "1.200000",
  333 : "333",
  ({}) : "({})",
  ({ 0 }) : "({0,})"
]);

void do_tests() {
    mixed x, y;
    foreach (x, y in values) {
	IS(x, y);
    }
    
    // arrays
    foreach (x, y in values) {
	IS( ({ x }), "({" + y + ",})");
	IS( ({ x, x }), "({" + y + "," + y + ",})");
    }
    
    // mappings
    foreach (x, y in values) {
	IS( ([ 1 : x ]), "([1:" + y + ",])");
	IS( ([ x : x ]), "([" + y + ":" + y + ",])");
    }
}