1
0
mirror of synced 2026-01-16 16:47:50 +00:00

86 lines
2.6 KiB
Plaintext

;; Function To Be Tested: REMEMBER (Programmer's Assistant Command)
;;
;; Source: Xerox Common Lisp Implementation Notes (Lyric Beta Release)
;; CLtL, Section 20.2
;; Section: The REMEMBER
;; Page: 28
;;
;; Created By: John Park
;;
;; Creation Date: Feb 23, 1987
;;
;; Last Update:
;;
;; Filed As: {ERIS}<lispcore>exec>remember.u
;;
;;
;; Syntax: REMEMBER &REST EVENT-SPEC
;;
;; Function Description: Tell History list manager to remember type-in from
;; specified event(s)
;;
;; Argument(s): Event-Spec
;;
;; Returns: See function description
;; 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 "REMEMBER-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
;;
;; Messages will be printed before each command in the command files is executed
;; for user monitoring. This test will determine whether the specified event for
;; REMEMBER is "remembered". Test result is logged on
;; {eris}<lispcore>test>exec>test.report.
(DO-TEST "REMEMBER-TEST-SETUP"
(PROGN
(SETQ MESS0 "remembering the specified event...")
(SETQ MESS1 "Do-test will determine if the remembered event can be retrieved and re-executed...")
(SETQ TEST-RESULT "{ERIS}<LISPCORE>TEST>EXEC>TEST.REPORT")
(DEFUN R-FORMAT (STATUS)
(FORMAT *OUTPUT* "~%COMMAND: REMEMBER~%STATUS: ~A DATE: ~A TESTER: ~A~%" STATUS (IL:DATE) IL:USERNAME))
(SETQ REMEMBER-COMMAND-STRING
"(FORMAT NIL MESS0)
(SETQ X 100 Y 50)
(SETQ EVENT-ONE (+ X Y))
(SETQ EVENT-TWO (- X Y))
(SETQ EVENT-THREE (* X Y))
(FORMAT NIL MESS1)
REMEMBER -4
(SETQ REMEMBERED-VAL-ONE CL:*)
REMEMBER -5
(SETQ REMEMBERED-VAL-TWO CL:*)
REMEMBER -6
(SETQ REMEMBERED-VAL-THREE CL:*)
(FORMAT NIL MESS1)
(DO-TEST 'REMEMBER-TEST-RESULT
(PROG2 (SETQ *OUTPUT* (OPEN TEST-RESULT :DIRECTION :OUTPUT
:IF-EXISTS :APPEND))
(IF (AND (EQUAL REMEMBERED-VAL-ONE
'(SETQ EVENT-ONE (+ X Y)))
(EQUAL REMEMBERED-VAL-TWO
'(SETQ EVENT-TWO (- X Y)))
(EQUAL REMEMBERED-VAL-THREE
'(SETQ EVENT-THREE (* X Y)))
)
(PROGN (R-FORMAT 'SUCCESS) T)
(PROGN (R-FORMAT 'FAIL) NIL))
(CLOSE *OUTPUT*)
)
)
")
(IL:BKSYSBUF REMEMBER-COMMAND-STRING)
)
)
STOP