mirror of
https://github.com/pennmush/pennmush
synced 2026-08-12 22:23:05 -04:00
* Add basic hardcode test framework. Closes #1238 Now go forth and write all the tests! * Rename all the softcode test case files. testFOO.pl -> testFOO.t because they're not actually proper perl scripts and that was bugging me and causing syntax highlighting problems in editors. * Fix a couple of typos/formatting bugs. * Add some more test cases. * Add some utf8 tests. * Support ancient perl, and better error handling on failed tsort invocation. * More tests and run the tests after loading the database. * Add tests for map_file()
14 lines
747 B
Raku
14 lines
747 B
Raku
run tests:
|
|
test('strreplace.1', $god, 'think strreplace(0010, 2, 1, 0)', '^0000$');
|
|
test('strreplace.2', $god, 'think strreplace(0010, 2, 5, 011)', '^00011$');
|
|
test('strreplace.3', $god, 'think strreplace(0010, 2, 2, 0)', '^000$');
|
|
test('strreplace.4', $god, 'think strreplace(0010, 2, 1, 010)', '^000100$');
|
|
test('strreplace.5', $god, 'think strreplace(0010, 6, 1, 0)', '^0010$');
|
|
test('strreplace.6', $god, 'think strreplace(0010, -1, 4, woot)', '^#-1');
|
|
test('strreplace.7', $god, 'think strreplace(AA[ansi(r, BB)]A, 2, 2, C)', '^AACA$');
|
|
|
|
test('strinsert.1', $god, 'think strinsert(000, 1, 1)', '^0100$');
|
|
test('strinsert.2', $god, 'think strinsert(000, -1, 1)', '^#-1');
|
|
test('strinsert.3', $god, 'think strinsert(000, 5, 11)', '^00011$');
|
|
|
|
|