1
0
mirror of synced 2026-01-22 19:00:53 +00:00

98 lines
2.6 KiB
Plaintext

;; Function To Be Tested: SHH (Programmer's Assistant Command)
;;
;; Source: Xerox Common Lisp Implementation Notes (Lyric Beta Release)
;; Section 20.2 (The Evaluator), Page 28
;;
;; Section: The Evaluator
;;
;; Created By: John Park
;;
;; Creation Date: Feb 11, 1987
;;
;; Last Update: FEB 27, 1987
;;
;; Filed As: {ERIS}<lispcore>test>exec>shh.u
;;
;;
;; Syntax: SHH &rest LINE
;;
;; Function Description: Execute LINE without history list processing
;;
;; Argument(s): LINE
;;
;; Returns: Results of the specified form (LINE)
;;
;;
;; Constraints/Limitations: Due to the nature of Programmer's Assistant commands,
;; testing them willbe accomplished by using the interlisp function bksysbuf
;; in do-test form. Comments are incorporated within each command file.
;; The do-test test setup is titled "SHH-TEST-SETUP", which executes the command
;; string. The do-test form within the command file will return T or "test "quote"
;; failed in file "unknown". " This test file requires TEDIT package.
;; The test result will be logged automatically in the following file:
;; {ERIS}<lispcore>test>exec>test.report
(DO-TEST 'SHH-TEST-SETUP
(PROGN
(SETQ MESS0 "Executing an event with history processing...")
(SETQ MESS1 "The previous event was not entered in the history list...")
(SETQ MESS2 "Re-executing event containing TODAY(this should have reset the varible today rather than tomorrow)...")
(SETQ MESS3 "As indicated by the following, the event containing
the variable TOMORROW was not entered in the history list...")
(SETQ TEST-RESULT "{ERIS}<LISPCORE>TEST>EXEC>TEST.REPORT")
(DEFUN R-FORMAT (STATUS)
(FORMAT *OUTPUT* "~%COMMAND: SHH ~%STATUS: ~A DATE: ~A TESTER: ~A~%" STATUS (IL:DATE) IL:USERNAME))
(SETQ SHH-STRING "FIX -6
(PROGN
(PRINC MESS3)
(SLEEP 2)
(VALUES)
(FORMAT NIL FORMAT-STRING TODAY TODAY-1 TOMORROW TOMORROW-1)
)
(DO-TEST 'FIND-EVENT-TEST-RESULT
(PROG2 (SETQ *OUTPUT* (OPEN TEST-RESULT :DIRECTION :OUTPUT
:IF-EXISTS :APPEND))
(IF (AND (NOT (EQUAL TODAY TODAY-1))
(EQUAL TOMORROW TOMORROW-1))
(PROGN (R-FORMAT 'SUCCESS) T)
(PROGN (R-FORMAT 'FAIL) NIL))
(CLOSE *OUTPUT*)
)
)
")
(SETQ FORMAT-STRING "TODAY: ~A TODAY-1: ~A ~% TOMORROW: ~A TOMORROW-1: ~A")
(SETQ SHH-COMMAND-STRING
"(PROGN
(PRINC MESS0)
(SLEEP 2)
(VALUES)
)
(SETQ TODAY (IL:DATE))
SHH (SETQ TOMORROW (IL:DATE))
(PROGN
(PRINC MESS1)
(SLEEP 2)
(VALUES)
)
(SETQ TOMORROW-1 TOMORROW)
(SETQ TODAY-1 TODAY)
(PROGN
(PRINC MESS2)
(SLEEP 2)
(VALUES)
)
(IL:EVAL.AS.PROCESS '(IL:BKSYSBUF SHH-STRING))
")
(IL:BKSYSBUF SHH-COMMAND-STRING)
)
)
STOP