pennmush/test/teststringsecs.t
shawnw 0a0a9ad453
Hardcode Tests (#1243)
* 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()
2018-09-16 15:10:11 -07:00

12 lines
643 B
Raku

login mortal
run tests:
test('stringsecs.1', $mortal, 'think stringsecs(a)', '#-1 INVALID TIMESTRING');
test('stringsecs.2', $mortal, 'think stringsecs(10)', '10');
test('stringsecs.3', $mortal, 'think stringsecs(10s)', '10');
test('stringsecs.4', $mortal, 'think stringsecs(5m)', '300');
test('stringsecs.5', $mortal, 'think stringsecs(5m 10s)', '310');
test('stringsecs.6', $mortal, 'think stringsecs(1h)', '3600');
test('stringsecs.7', $mortal, 'think stringsecs(10s 5m)', '310');
test('stringsecs.8', $mortal, 'think stringsecs(1d 2h 3m 4s)', '93784');
test('stringsecs.9', $mortal
, 'think stringsecs(h)', '#-1 INVALID TIMESTRING');