SCP: Activate internal unit tests at appropriate time

before processing default and command line scripts
This commit is contained in:
Mark Pizzolato 2019-06-18 07:58:32 -07:00
parent 8c4f8b0bff
commit 5d747cc992

7
scp.c
View file

@ -2619,6 +2619,10 @@ if (*argv[0]) { /* sim name arg? */
setenv ("SIM_BIN_PATH", argv[0], 1);
}
sim_argv = argv;
if (sim_switches & SWMASK ('T')) /* Command Line -T switch */
stat = sim_library_unit_tests (); /* run library unit tests */
cptr = getenv("HOME");
if (cptr == NULL) {
cptr = getenv("HOMEPATH");
@ -2657,9 +2661,6 @@ else if (*argv[0]) { /* sim name arg? */
if (SCPE_BARE_STATUS(stat) == SCPE_OPENERR) /* didn't exist/can't open? */
stat = SCPE_OK;
if (sim_switches & SWMASK ('T')) /* Command Line -T switch */
stat = sim_library_unit_tests (); /* run library unit tests */
if (SCPE_BARE_STATUS(stat) != SCPE_EXIT)
process_stdin_commands (SCPE_BARE_STATUS(stat), argv);