wire/data
Vurv e3c5e59719
Add unit tests for E2 (#2400)
* Add unit tests for E2

Adds basic unit tests that can be invoked by the server console using ``e2test``. This imitates an E2 chip virtually by using the world entity as it's owner, and as such doesn't act 1:1, but it should be good enough for most cases.

You won't be able to use this with the workshop wiremod which shouldn't matter as you should really just be doing unit test / debugging on the github version anyways.

Additionally added a lot more tests to the parsing "test" and fixed 1975 not compiling

All of this works on a new E2Lib function, ``runScript``, which runs an E2 script independent of an entity

* Add test types

Added the ability to specify if a file should fail to execute, or fail to compile.

So now parsing.txt functions with the input operators. Also added a switch case test to ensure there aren't any regressions from #2388

* Tidy code

Removed unused return value and trailing whitespace

* Add regression test for #2403 and fix tests

* Added a regression test for #2403, removed "switch" test in favor of a regression test for #2388

* Made unit test code logic a lot less needlessly complex

* Restrict use to superadmins

Didn't realize for some reason concommands registered on the server work for clients.. made it only allow superadmins if not invoked by the server console.

Also made "e2tests.lua" only be included on SERVER to avoid a lua error
2022-09-04 16:30:32 -07:00
..
cpuchip Fix all whitespace errors 2018-02-02 00:02:28 +00:00
expression2 Add unit tests for E2 (#2400) 2022-09-04 16:30:32 -07:00
gpuchip Add DDTERRAIN example program 2020-02-23 21:10:19 +01:00
soundlists
spuchip/examples Fix all whitespace errors 2018-02-02 00:02:28 +00:00