#!../src/tops  -s ../sys  -u ../usr

# File halt1
# Run this to make sure new changes don't break existing behavior.

#-----------------------------------------------------------------------

" File halt2 is being sourced by halt1" . nl

"halt2" "# ENTRY FROM halt1 IS HERE" msource

#-----------------------------------------------------------------------

# If HALT works as it should, running this will not show much because 
# the program is really halting.  

   nl " halt1: continuing..." . nl

   no catmsg

   public

   no "count" book

   inline:  Job1 " HALT test: Job1: Ok IF SEE THIS AND NOTHING ELSE" 
      . nl 3 idle
      HALT
    # halt \ this will give ERROR
      1 count bump
   end

   inline: Job2 Job1 " HALT test: Job2: SHOULD NOT SEE THIS" . nl
      1 count bump 
   end

   inline: Job3 Job2 " HALT test: Job3: SHOULD NOT SEE THIS" . nl
      1 count bump
   end

   private

{  Job3 runs Job2 runs Job1.
   Job1 HALTs.
   Running should jump to the beginning rather than unwinding back 
   through Job2 and Job3.

   If Job1 uses halt instead of HALT, ERROR will appear.
}

   Job3 \ program should exit here

   count 0= \ the Ok message will not be seen if HALT works Ok
   IF " Ok: test of HALT" ELSE " Error: test of HALT" THEN . nl
   
#-----------------------------------------------------------------------
