1
0
mirror of synced 2026-01-27 12:52:06 +00:00
Files
Interlisp.medley/internal/test/env/process-controls/hand/PSW.U

128 lines
5.1 KiB
Plaintext

;; Function To Be Tested: Process Control Window (Process Controls)
;;
;; Source: IRM VOLUME 2
;; Section 23.8. PSW,Lyric Release Notes
;;
;; Section: Program Support
;;
;; Created By: John Park
;;
;; Creation Date: April 9, 1987
;;
;; Last Update: April 23, 1987
;;
;; Filed As: {ERINYES}<TEST>LISP>LYRIC>PROCESS-CONTROLS>PSW.U
;;
;;
;;
;; Syntax: (PROCESS.STATUS.WINDOW WHERE) or PSW from background menu.
;; (SEE IRM Volume 2, Section 23.8)
;;
;;
;; Function Description: The background menu command PSW (IRM Vol 2, Section 28.6)
;; and the function PROCESS.STATUS.WINDOW create a "Process Status Window", that
;; allows the user to examine and manipulate all of the existing processes.
;; The window consists of two menus. The top menu lists all the processes at the
;; moment. Commands in the bottom menu operate on the process selected in the
;; top menu.
;;
;; Argument(s): WHERE: position of Process Status Window
;; (SEE IRM Volume 2, Section 23.8)
;;
;; Returns: Process Status Window (SEE IRM Volume 2, Section 23.8)
;;
;; Constraints/Limitations: The test for PSW is not automated. The user is
;; expected to have tested this system through the operational use of PSW from
;; the background menu. This test will focus on the creation of the PSW only.
;; The user is encourged to either test this system operationally or explicitly
;; by following the functional description of PSW as outlined in IRM Volume 2,
;; section 23.8. Any problems should be reported as ARs and logged in
;; {ERINYES}<TEST>LISP>LYRIC>PROCESS-CONTROLS>PSW.U
;;
;;
;;
(DO-TEST "PSW-TEST-SETUP"
(IL:PAGEHEIGHT 0)
(SETQ TEST-SUCCEEDED T)
(DEFUN PASS-FAIL (COMMAND-LANGUAGE TEST-ITEM)
(IL:IF (NOT TEST-ITEM)
IL:THEN (FORMAT *ERROR-OUTPUT* "Test ~s failed~%" COMMAND-LANGUAGE)
(SETQ TEST-SUCCEEDED NIL)
IL:ELSE "Wunnerful!")
) ; close DEFUN PASS-FAIL
(SETQ PSW-MESS "Shortly a PSW will be created programatically.
If it is created, please anwser y or n otherwise...")
(SETQ PSW-MESS1 "Please click PSW from the background menu to create
the Process Status Window")
(SETQ PSW-MESS2 "Is the PSW is invoked successfully (yes or no)? ")
(SETQ PSW-MESS3 "Normally, a lisp user is expected to have used the PSW to examine or control various processes from the background menu in the course of running other interlisp funtions, programs, processes, etc. Therefore, it's reasonable to judge the performance of the Process controls based on his or her operational use. If one wants to test it explicitly, please enter Yes and answer each question after testing each component of the PSW")
(SETQ PSW-MESS4 "Do you want to run the PSW subsystem test explicitly? ")
(DEFUN PSW-TEST NIL
(SETQ PSW-ITEM-LIST '(BT BTV BTV* BTV! WHO? KBD_ INFO BREAK KILL
RESTART WAKE SUSPEND))
(SETQ PSW-DESCRIPTION-LIST
'("Displays a backtrace of function names starting at LASTPOS"
"Displays a backtrace of function names with variables beginning
at LASTPOS"
"Displays a backtrace of functions names and prints arguments to
local variables and eval blips"
"Displays a backtrace of functions and prints everything
on the stack"
"Changes the selection to the tty process (the one currently
in control of the keyboard)"
"Associates the keyboard with the selected process:
(makes the selected process be the tty process)"
"If the selected process has an INFOHOOK property, calls it.
The hook may be a function, which is then applied to two arguments,the process and the button (LEFT or MIDDLE) used to invoke INFO, or a form, which is simply EVAL'ed. The APPLY or EVAL happens in the context ofthe selected process, using PROCESS.APPLY or PROCESS.EVAL. The INFOHOOK process property can be set using PROCESSPROP"
"Enter a break under the selected process. This has the side
effect of waking the process with the value returned from the break"
"Deletes the selected process"
"Restarts the selected process"
"Wakes the selected process. Prompts for a value to wake it with"
"Suspends the selected process (causes it to block indefinitely)"))
(SETQ COLON ": ")
(SETQ MESS "Is the selected process examined or manipulated successfully by the command ~A ? ")
(IL:FOR PSW-ITEM IL:IN PSW-ITEM-LIST IL:DO
(SETQ PSW-DESCRIPTION (POP PSW-DESCRIPTION-LIST))
(FORMAT T "~a~a~a~%" PSW-ITEM COLON PSW-DESCRIPTION)
(PASS-FAIL PSW-ITEM (Y-OR-N-P (FORMAT T MESS PSW-ITEM)))
(IL:CLRPROMPT)
) ; close FOR
) ; close DEFUN PSW-TEST
; Creating the PSW programmatically...
(IL:PRIN1 PSW-MESS)
(IL:PROCESS.STATUS.WINDOW '(800 . 240))
(PASS-FAIL 'PSW-INVOKED-PROGRAMMATICALLY (Y-OR-N-P PSW-MESS2))
(IL:FOR X IL:IN (IL:OPENWINDOWS)
IL:WHEN (EQUAL (IL:WINDOWPROP X 'IL:CLOSEFN) 'IL:PROCESS.STATUS.WINDOWA0020)
IL:DO (IL:CLOSEW X))
; Creating the PSW from the background menu...
(IL:PRIN1 PSW-MESS1)
(PASS-FAIL 'PSW-INVOKED-FROM-BACKGROUND-MENU (Y-OR-N-P PSW-MESS2))
; Start PSW Component Test
(IL:PRIN1 PSW-MESS3)
(IL:IF (Y-OR-N-P PSW-MESS4)
IL:THEN (PSW-TEST)
)
(IL:FOR X IL:IN (IL:OPENWINDOWS)
IL:WHEN (EQUAL (IL:WINDOWPROP X 'IL:CLOSEFN) 'IL:PROCESS.STATUS.WINDOWA0020)
IL:DO (IL:CLOSEW X))
)
STOP