;; Function To Be Tested: REDO (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 3, 1987 ;; ;; Last Update: Feb 27, 1987 ;; ;; Filed As: {ERINYES}lisp>test>exec>redo.tst ;; ;; ;; Syntax: REDO EvenSpec ;; ;; Function Description: Redoes the event(s) specified by EvenSpec. ;; For example, REDO 123 repeats the event numbered 123. ;; ;; Argument(s): EvenSpec (number or sequence) ;; ;; Returns: Results of repeated event ;; ;; 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 "REDO-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}test>exec>test.report (DO-TEST "REDO-TEST-SETUP" (PROGN (SETQ TEST-RESULT "{ERIS}TEST>EXEC>TEST.REPORT") (DEFUN R-FORMAT (STATUS) (FORMAT *OUTPUT* "~%COMMAND: REDO ~%STATUS: ~A DATE: ~A TESTER: ~A~%" STATUS (IL:DATE) IL:USERNAME)) (SETQ REDO-COMMAND-STRING "(setq redo-var 'old-variable) (setq redo-var 'new-variable) ;; The following should set redo-var to its original value ;; Event number may be entered in lieu of the sequence number REDO -2 (setq a 1 b 2) (psetq a b b a) ;; The following should reset the variables to their original values REDO (DO-TEST 'REDO-TEST-RESULT (PROG2 (SETQ *OUTPUT* (OPEN TEST-RESULT :DIRECTION :OUTPUT :IF-EXISTS :APPEND)) (IF (AND (= a 1) (= b 2)) (PROGN (R-FORMAT 'SUCCESS) T) (PROGN (R-FORMAT 'FAIL) NIL)) (CLOSE *OUTPUT*) ) ) ") (IL:BKSYSBUF REDO-COMMAND-STRING) ) ) STOP