From 5d747cc99257553231e82f37511ce6432bc50991 Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Tue, 18 Jun 2019 07:58:32 -0700 Subject: [PATCH] SCP: Activate internal unit tests at appropriate time before processing default and command line scripts --- scp.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scp.c b/scp.c index 66b4abe1..6552a5d6 100644 --- a/scp.c +++ b/scp.c @@ -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);