;; Function To Be Tested: DA (Programmer's Assistant Command) ;; ;; Source: Xerox Common Lisp Implementation Notes (Lyric Beta Release) ;; Section 20.2 (The Evaluator), Page 28 ;; ;; ;; Section: The Evaluator ;; Page: 9 ;; ;; Created By: John Park ;; ;; Creation Date: Feb 10, 1987 ;; ;; Last Update: Feb 26, 1987 ;; ;; Filed As: {ERIS}integration>exec>da.u ;; ;; ;; Syntax: DA ;; ;; Function Description: Returns current date and time ;; ;; Argument(s): None ;; ;; Returns: See function description ;; ;; Constraints/Limitations: Due to the nature of Programmer's Assistant commands, ;; testing them will be accomplished using the interlisp function BKSYSBUF in ;; do-test form . Comments are incorporated within ;; each command file, which will be run by using the function bksysbuf. ;; Each test setup is titled "COMMAND-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". " at the end of testing. ;; The test result will be logged automatically in the following file: ;; {ERIS}test>exec>test.report (DO-TEST 'DA-TEST-SETUP (PROGN (SETQ TEST-RESULT "{ERIS}TEST>EXEC>TEST.REPORT") (DEFUN R-FORMAT (STATUS) (FORMAT *OUTPUT* "~%COMMAND: DA ~%STATUS: ~A DATE: ~A TESTER: ~A~%" STATUS (IL:DATE) IL:USERNAME)) (SETQ DA-COMMAND-STRING "(SETQ MESS1 'Printing-current-date&time...) (SETQ DATE (IL:DATE)) (PROGN (PRINC MESS1) (SLEEP 2) (VALUES) ) DA (SETQ TODAY IL:IT) ; Now do-test will determine whether DA actually returns today's date (DO-TEST 'DA-TEST-RESULT (PROG2 (SETQ *OUTPUT* (OPEN TEST-RESULT :DIRECTION :OUTPUT :IF-EXISTS :APPEND :IF-DOES-NOT-EXIST :CREATE)) (IF (STRING-EQUAL DATE TODAY :END1 14 :END2 14) (PROGN (R-FORMAT 'SUCCESS) T) (PROGN (R-FORMAT 'FAIL) NIL)) (CLOSE *OUTPUT*) ) ) ") (IL:BKSYSBUF DA-COMMAND-STRING) ) ) STOP