mirror of
https://github.com/ganelson/inform.git
synced 2024-07-05 16:44:21 +03:00
37 lines
858 B
OpenEdge ABL
37 lines
858 B
OpenEdge ABL
[Main::] Program Control.
|
|
|
|
What shall we test?
|
|
|
|
@h Main routine.
|
|
|
|
@d PROGRAM_NAME "arch-test"
|
|
|
|
@e TEST_COMPATIBILITY_CLSW
|
|
|
|
=
|
|
int main(int argc, char **argv) {
|
|
Foundation::start(argc, argv);
|
|
ArchModule::start();
|
|
|
|
CommandLine::declare_heading(L"inexample: a tool for testing foundation facilities\n");
|
|
|
|
CommandLine::declare_switch(TEST_COMPATIBILITY_CLSW, L"test-compatibility", 2,
|
|
L"test compatibility checks against various target VMs");
|
|
|
|
CommandLine::read(argc, argv, NULL, &Main::respond, &Main::ignore);
|
|
|
|
ArchModule::end();
|
|
Foundation::end();
|
|
return 0;
|
|
}
|
|
|
|
void Main::respond(int id, int val, text_stream *arg, void *state) {
|
|
switch (id) {
|
|
case TEST_COMPATIBILITY_CLSW: Unit::test_compatibility(STDOUT); break;
|
|
}
|
|
}
|
|
|
|
void Main::ignore(int id, text_stream *arg, void *state) {
|
|
Errors::fatal("only switches may be used at the command line");
|
|
}
|