foundation2_fluffos_v1/
foundation2_fluffos_v1/bin/
foundation2_fluffos_v1/fluffos-2.9-ds2.13/
foundation2_fluffos_v1/fluffos-2.9-ds2.13/ChangeLog.old/
foundation2_fluffos_v1/fluffos-2.9-ds2.13/Win32/
foundation2_fluffos_v1/fluffos-2.9-ds2.13/compat/
foundation2_fluffos_v1/fluffos-2.9-ds2.13/compat/simuls/
foundation2_fluffos_v1/fluffos-2.9-ds2.13/include/
foundation2_fluffos_v1/fluffos-2.9-ds2.13/testsuite/
foundation2_fluffos_v1/fluffos-2.9-ds2.13/testsuite/clone/
foundation2_fluffos_v1/fluffos-2.9-ds2.13/testsuite/command/
foundation2_fluffos_v1/fluffos-2.9-ds2.13/testsuite/data/
foundation2_fluffos_v1/fluffos-2.9-ds2.13/testsuite/etc/
foundation2_fluffos_v1/fluffos-2.9-ds2.13/testsuite/include/
foundation2_fluffos_v1/fluffos-2.9-ds2.13/testsuite/inherit/
foundation2_fluffos_v1/fluffos-2.9-ds2.13/testsuite/inherit/master/
foundation2_fluffos_v1/fluffos-2.9-ds2.13/testsuite/log/
foundation2_fluffos_v1/fluffos-2.9-ds2.13/testsuite/single/
foundation2_fluffos_v1/fluffos-2.9-ds2.13/testsuite/single/tests/compiler/
foundation2_fluffos_v1/fluffos-2.9-ds2.13/testsuite/single/tests/efuns/
foundation2_fluffos_v1/fluffos-2.9-ds2.13/testsuite/single/tests/operators/
foundation2_fluffos_v1/fluffos-2.9-ds2.13/testsuite/u/
foundation2_fluffos_v1/fluffos-2.9-ds2.13/tmp/
foundation2_fluffos_v1/fluffos-2.9-ds2.13/windows/
foundation2_fluffos_v1/lib/cfg/
foundation2_fluffos_v1/lib/cmds/adm/
foundation2_fluffos_v1/lib/daemon/save/
foundation2_fluffos_v1/lib/daemon/services/
foundation2_fluffos_v1/lib/daemon/soul/
foundation2_fluffos_v1/lib/doc/build/
foundation2_fluffos_v1/lib/doc/classes/
foundation2_fluffos_v1/lib/doc/driver/
foundation2_fluffos_v1/lib/doc/driver/applies/
foundation2_fluffos_v1/lib/doc/driver/applies/interactive/
foundation2_fluffos_v1/lib/doc/driver/concepts/
foundation2_fluffos_v1/lib/doc/driver/driver/
foundation2_fluffos_v1/lib/doc/driver/efuns/arrays/
foundation2_fluffos_v1/lib/doc/driver/efuns/buffers/
foundation2_fluffos_v1/lib/doc/driver/efuns/calls/
foundation2_fluffos_v1/lib/doc/driver/efuns/compile/
foundation2_fluffos_v1/lib/doc/driver/efuns/filesystem/
foundation2_fluffos_v1/lib/doc/driver/efuns/floats/
foundation2_fluffos_v1/lib/doc/driver/efuns/functions/
foundation2_fluffos_v1/lib/doc/driver/efuns/general/
foundation2_fluffos_v1/lib/doc/driver/efuns/mappings/
foundation2_fluffos_v1/lib/doc/driver/efuns/numbers/
foundation2_fluffos_v1/lib/doc/driver/efuns/parsing/
foundation2_fluffos_v1/lib/doc/driver/lpc/constructs/
foundation2_fluffos_v1/lib/doc/driver/lpc/types/
foundation2_fluffos_v1/lib/doc/driver/platforms/
foundation2_fluffos_v1/lib/doc/efun/
foundation2_fluffos_v1/lib/doc/etc/
foundation2_fluffos_v1/lib/doc/faq/
foundation2_fluffos_v1/lib/doc/help/creator/
foundation2_fluffos_v1/lib/doc/help/player/
foundation2_fluffos_v1/lib/doc/lpc/basic/
foundation2_fluffos_v1/lib/doc/lpc/data_types/
foundation2_fluffos_v1/lib/doc/lpc/etc/
foundation2_fluffos_v1/lib/doc/lpc/intermediate/
foundation2_fluffos_v1/lib/doc/lpc/types/
foundation2_fluffos_v1/lib/doc/mudlib/
foundation2_fluffos_v1/lib/doc/mudlib/Features/
foundation2_fluffos_v1/lib/domains/Examples/armour/
foundation2_fluffos_v1/lib/domains/Examples/etc/
foundation2_fluffos_v1/lib/domains/Examples/npc/
foundation2_fluffos_v1/lib/domains/Examples/room/
foundation2_fluffos_v1/lib/domains/Examples/virtual/
foundation2_fluffos_v1/lib/domains/Examples/virtual/exaA/
foundation2_fluffos_v1/lib/domains/Examples/virtual/exaB/
foundation2_fluffos_v1/lib/domains/Examples/weapon/
foundation2_fluffos_v1/lib/domains/School/doc/
foundation2_fluffos_v1/lib/domains/School/room/
foundation2_fluffos_v1/lib/domains/School/room/Classes/
foundation2_fluffos_v1/lib/domains/School/room/Offices/
foundation2_fluffos_v1/lib/domains/Standard/
foundation2_fluffos_v1/lib/domains/Standard/pools/
foundation2_fluffos_v1/lib/domains/Standard/std/
foundation2_fluffos_v1/lib/domains/Standard/xtra/
foundation2_fluffos_v1/lib/include/
foundation2_fluffos_v1/lib/lib/obj/
foundation2_fluffos_v1/lib/news/
foundation2_fluffos_v1/lib/save/
foundation2_fluffos_v1/lib/secure/cfg/
foundation2_fluffos_v1/lib/secure/cmds/player/
foundation2_fluffos_v1/lib/secure/lib/
foundation2_fluffos_v1/old/
foundation2_fluffos_v1/win32/
void do_tests() {
    string src = "This is a test";

    for (int i = 0; i < 2; i++) {
	ASSERT(replace_string(src, "", "bar") == src);
	ASSERT(replace_string(src, "foo", "bar", 5, 4) == src);
    
	// case 1: rlen <= plen, plen > 1, rlen > 0
	ASSERT(replace_string(src, "is", "x") == "Thx x a test");
	ASSERT(replace_string(src, "is", "x", 1) == "Thx is a test");
	ASSERT(replace_string(src, "is", "x", 0, 0) == "Thx x a test");
	ASSERT(replace_string(src, "is", "x", 0, 1) == "Thx is a test");
	ASSERT(replace_string(src, "is", "x", 0, 2) == "Thx x a test");
	ASSERT(replace_string(src, "is", "x", 1, 1) == "Thx is a test");
	ASSERT(replace_string(src, "is", "x", 1, 2) == "Thx x a test");
	ASSERT(replace_string(src, "is", "x", 2, 2) == "This x a test");
	// case 2: rlen <= plen, plen > 1, rlen == 0
        ASSERT(replace_string(src, "is", "") == "Th  a test");
	ASSERT(replace_string(src, "is", "", 1) == "Th is a test");
	ASSERT(replace_string(src, "is", "", 0, 0) == "Th  a test");
	ASSERT(replace_string(src, "is", "", 0, 1) == "Th is a test");
	ASSERT(replace_string(src, "is", "", 0, 2) == "Th  a test");
	ASSERT(replace_string(src, "is", "", 1, 1) == "Th is a test");
	ASSERT(replace_string(src, "is", "", 1, 2) == "Th  a test");
	ASSERT(replace_string(src, "is", "", 2, 2) == "This  a test");
        // case 3: rlen <= plen, plen == 1, rlen > 0
	ASSERT(replace_string(src, "s", "x") == "Thix ix a text");
	ASSERT(replace_string(src, "s", "x", 1) == "Thix is a test");
	ASSERT(replace_string(src, "s", "x", 2) == "Thix ix a test");
	ASSERT(replace_string(src, "s", "x", 0, 0) == "Thix ix a text");
	ASSERT(replace_string(src, "s", "x", 0, 1) == "Thix is a test");
	ASSERT(replace_string(src, "s", "x", 0, 2) == "Thix ix a test");
	ASSERT(replace_string(src, "s", "x", 1, 1) == "Thix is a test");
	ASSERT(replace_string(src, "s", "x", 1, 2) == "Thix ix a test");
	ASSERT(replace_string(src, "s", "x", 1, 3) == "Thix ix a text");
	ASSERT(replace_string(src, "s", "x", 2, 2) == "This ix a test");
	// case 4: rlen <= plen, plen == 1, rlen == 0
	ASSERT(replace_string(src, "s", "") == "Thi i a tet");
	ASSERT(replace_string(src, "s", "", 1) == "Thi is a test");
	ASSERT(replace_string(src, "s", "", 2) == "Thi i a test");
	ASSERT(replace_string(src, "s", "", 0, 0) == "Thi i a tet");
	ASSERT(replace_string(src, "s", "", 0, 1) == "Thi is a test");
	ASSERT(replace_string(src, "s", "", 0, 2) == "Thi i a test");
	ASSERT(replace_string(src, "s", "", 1, 1) == "Thi is a test");
	ASSERT(replace_string(src, "s", "", 1, 2) == "Thi i a test");
	ASSERT(replace_string(src, "s", "", 1, 3) == "Thi i a tet");
	ASSERT(replace_string(src, "s", "", 2, 2) == "This i a test");
	// case 5: rlen > plen, plen > 1, rlen > 0
        ASSERT(replace_string(src, "is", "foo") == "Thfoo foo a test");
	ASSERT(replace_string(src, "is", "foo", 1) == "Thfoo is a test");
	ASSERT(replace_string(src, "is", "foo", 2) == "Thfoo foo a test");
	ASSERT(replace_string(src, "is", "foo", 0, 0) == "Thfoo foo a test");
	ASSERT(replace_string(src, "is", "foo", 0, 1) == "Thfoo is a test");
	ASSERT(replace_string(src, "is", "foo", 0, 2) == "Thfoo foo a test");
	ASSERT(replace_string(src, "is", "foo", 1, 1) == "Thfoo is a test");
	ASSERT(replace_string(src, "is", "foo", 1, 2) == "Thfoo foo a test");
	ASSERT(replace_string(src, "is", "foo", 1, 3) == "Thfoo foo a test");
	ASSERT(replace_string(src, "is", "foo", 2, 2) == "This foo a test");
	// case 6: rlen > plen, plen == 1
        ASSERT(replace_string(src, "s", "foo") == "Thifoo ifoo a tefoot");
	ASSERT(replace_string(src, "s", "foo", 1) == "Thifoo is a test");
	ASSERT(replace_string(src, "s", "foo", 2) == "Thifoo ifoo a test");
	ASSERT(replace_string(src, "s", "foo", 0, 0) == "Thifoo ifoo a tefoot");
	ASSERT(replace_string(src, "s", "foo", 0, 1) == "Thifoo is a test");
	ASSERT(replace_string(src, "s", "foo", 0, 2) == "Thifoo ifoo a test");
	ASSERT(replace_string(src, "s", "foo", 1, 1) == "Thifoo is a test");
	ASSERT(replace_string(src, "s", "foo", 1, 2) == "Thifoo ifoo a test");
	ASSERT(replace_string(src, "s", "foo", 1, 3) == "Thifoo ifoo a tefoot");
	ASSERT(replace_string(src, "s", "foo", 2, 2) == "This ifoo a test");

	src = src[0..5] + src[6..];
    }
}