366 lines
14 KiB
Plaintext
366 lines
14 KiB
Plaintext
;; Being tested: SEdit
|
|
;;
|
|
;; Source: {ERIS}<LispCore>DOC>SEDIT>SEDIT.TEDIT
|
|
;;
|
|
;; Created By: Henry Cate III
|
|
;;
|
|
;; Creation Date: February 16, 1987
|
|
;;
|
|
;; Last Update:
|
|
;;
|
|
;; Filed As: {eris}<lispcore>test>SEdit>command-meta-o.u
|
|
;;
|
|
;;
|
|
;;
|
|
|
|
|
|
(do-test "load the functions for the prompter for interactive tests"
|
|
(if (not (fboundp 'do-test-menu-setup))
|
|
(load "{ERINYES}<test>TOOLS>DO-TEST-MENU.dfasl"))
|
|
T)
|
|
|
|
|
|
(do-test-group "See/Change Definition"
|
|
:before (progn
|
|
(setq window-list (do-test-menu-Setup "See/Change Definition")))
|
|
|
|
:after (progn
|
|
(do-test-menu-Cleanup window-list))
|
|
|
|
;;; some different things to look at:
|
|
;;; optimizers: defoptimiziers
|
|
;;; structures: defstruct
|
|
;;; setfs: defsetf define-setf-method
|
|
;;; types: deftype
|
|
;;; variable: defglobalparameter, def-blobalvar, defconstant, defparameter, defvar
|
|
;;; functions: define-modify-macro, defmacro, definline, defun,
|
|
;;; define-type: def-define-type
|
|
|
|
;;; Have AR 7699 on the next three expected responses from meta-o
|
|
(do-test "See/Change Definition: no selection/no caret"
|
|
(do-test-menu-Message window-list 'high
|
|
" Testing See/Change Definition
|
|
If there is no free Xerox Common Lisp exec, bring up a another one and type: \"(cl:in-package 'xcl-test)\"
|
|
In the exec type:
|
|
|
|
(setq number 3)
|
|
(setq cd '(a b wer))
|
|
(setq efg '(1 2 3 4 5))
|
|
(defoptimizer temp-add-five (number) (number) (+ 5 number))
|
|
(define-modify-macro my-restf (list) cdr)
|
|
(defmacro temp-double (number) `(+ ,number ,number))
|
|
(define-modify-macro my-doublef (number) my-double)
|
|
(defstruct temp-silly \"silly\" sing (in 0.0) (long \"ab\") low yeast)
|
|
(defun temp-double (number) (declare (optimize speed)) (* 2 number))
|
|
(defun temp-add-five (number) (+ 5 number))
|
|
(defun temp-call-other (number)
|
|
(let ((silly-temp (make-temp-silly)))
|
|
(+ (temp-add-five number) (temp-double number))))
|
|
(defun temp-garbage (x) '(1 2 4.5 6/7 a b cd efg \"hello\" \"BYE\" (bye) (\"hi\" b cd 4)))
|
|
(ed 'temp-call-other)
|
|
|
|
Select Edit from the popup menu.
|
|
Does SEdit display in the SEdit prompt window:
|
|
\"Select name of object to edit.\"? "))
|
|
|
|
|
|
(do-test "See/Change Definition: Test get right definiton"
|
|
(do-test-menu-Message window-list 'high
|
|
" Testing: get the FNS definition
|
|
Assuming SEdit is editing the function temp-call-other.
|
|
Select \"make-temp-silly\"
|
|
Type meta-O.
|
|
Does the FNS definition for \"make-temp-silly\" popup in an SEdit window? "))
|
|
|
|
|
|
(do-test "See/Change Definition: Test get structures definiton"
|
|
(do-test-menu-Message window-list 'high
|
|
" Testing: get the structures definition
|
|
Assuming SEdit is editing the function temp-call-other & make-temp-silly.
|
|
Select \"temp-silly\" in the SEdit window for \"make-temp-silly\" about eight lines down the window.
|
|
Type meta-O.
|
|
Does the STRUCTURES definition for \"temp-silly\" popup in an SEdit window? "))
|
|
|
|
|
|
(do-test "See/Change Definition: Test get defoptimizer definiton"
|
|
(do-test-menu-Message window-list 'high
|
|
" Testing: get the defoptimizer definition
|
|
Assuming SEdit is editing the function temp-call-other & make-temp-silly, and the structure definition for temp-silly.
|
|
Close the SEdit window for temp-silly, and make-temp-silly.
|
|
Select \"temp-add-five\" in the SEdit window for \"temp-call-other\".
|
|
Type meta-O.
|
|
SEdit should ask \"Edit which definition of temp-add-five\".
|
|
Select \"optimizers\".
|
|
Did it ask and does the SEdit display in another SEdit window:
|
|
\"(defoptimizer temp-add-five (number) (number) (+ 5 number))\"? "))
|
|
|
|
|
|
(do-test "See/Change Definition: Test get optimizers definiton"
|
|
(do-test-menu-Message window-list 'high
|
|
" Testing: get the optimizers definition
|
|
Assuming SEdit is editing the function temp-call-other, and the optimizers definition for temp-add-five.
|
|
Close the SEdit window for temp-add-five.
|
|
Select \"temp-add-five\" in the SEdit window for \"temp-call-other\".
|
|
Type meta-O.
|
|
SEdit should ask \"Edit which definition of temp-add-five\".
|
|
Select \"functions\".
|
|
Did it ask and does the SEdit display in another SEdit window:
|
|
\"(defun temp-add-five (number) (+ 5 number))\"? "))
|
|
|
|
|
|
(do-test "See/Change Definition: no selection/edit caret"
|
|
(do-test-menu-Message window-list 'low
|
|
" Testing: no selection/edit caret
|
|
Assuming SEdit is editing the function temp-call-other & temp-add-five.
|
|
Close both windows.
|
|
Type \"(ed 'temp-garbage)\"
|
|
Want to place the edit caret right after the 1 without selecting it. Do this by pressing the left mouse button with the mouse cursor just to the right of the 1.
|
|
Type meta-O.
|
|
Does SEdit display in the SEdit prompt window:
|
|
\"Select name of object to edit.\"? "))
|
|
|
|
|
|
(do-test "See/Change Definition: no selection/structure caret"
|
|
(do-test-menu-Message window-list 'low
|
|
" Testing: no selection/structure caret
|
|
Assuming SEdit is editing the function temp-garbage.
|
|
Want to place the structure caret right between \"b\" and \"cd\" without selecting either item. Do this by positioning the mouse cursor between the two items and press the middle button.
|
|
Type meta-O.
|
|
Does SEdit display in the SEdit prompt window:
|
|
\"Select name of object to edit.\"? "))
|
|
|
|
|
|
(do-test "See/Change Definition: select a litatom"
|
|
(do-test-menu-Message window-list 'low
|
|
" Testing: select a litatom
|
|
Assuming SEdit is editing the function temp-garbage.
|
|
Select the first litatom \"cd\" as a structure, by pressing the left mouse button twice with the cursor over the litatom.
|
|
Type meta-O.
|
|
(If asked to select a type of dummy definition to install, pick VARS.)
|
|
Does a second SEdit window pop up editing the var CD with a value of:
|
|
\"(a b wer)\"? "))
|
|
|
|
|
|
(do-test "See/Change Definition: select a string"
|
|
(do-test-menu-Message window-list 'low
|
|
" Testing: select a string
|
|
Assuming SEdit is editing the function temp-garbage and the variable CD.
|
|
Close the SEdit window for the variable CD.
|
|
Select the string \"hello\" as a structure, by pressing the left mouse button twice with the cursor over the string.
|
|
Type meta-O.
|
|
Select VARIABLES, then DEFVAR
|
|
Does SEdit display in the SEdit prompt window:
|
|
\"\"hello\" has no VARIABLES definition.\"? "))
|
|
|
|
|
|
(do-test "See/Change Definition: select a number"
|
|
(do-test-menu-Message window-list 'low
|
|
" Testing: select a number
|
|
Assuming SEdit is editing the function temp-garbage.
|
|
Select the number \"4.5\" as a structure, by pressing the left mouse button twice with the cursor over the number.
|
|
Type meta-O.
|
|
Select OPTIMIZERS, DEFOPTIMIZER
|
|
Does SEdit display in the SEdit prompt window:
|
|
\"4.5 not editable.\"? "))
|
|
|
|
|
|
(do-test "See/Change Definition: select a list"
|
|
(do-test-menu-Message window-list 'low
|
|
" Testing: select a list
|
|
Assuming SEdit is editing the function temp-garbage.
|
|
Select the list \"(bye)\" as a structure, by pressing the left mouse button three times with the cursor over the \"y\".
|
|
Type meta-O.
|
|
Select DEFINE-TYPES, DEF-DEFINE-TYPE
|
|
Does SEdit display in the SEdit prompt window:
|
|
\"(BYE) has no DEFINE-TYPES definition.\"? "))
|
|
|
|
|
|
(do-test "See/Change Definition: select a comment"
|
|
(do-test-menu-Message window-list 'low
|
|
" Testing: select a comment
|
|
Assuming SEdit is editing the function temp-garbage.
|
|
Place the edit caret after the number 1 and type \"; hello\", then select this as a structure.
|
|
Type meta-O.
|
|
Select FUNCTIONS, DEFUN
|
|
Does SEdit display in the SEdit prompt window:
|
|
\"(il:* il:\\; \" hello\") has no FUNCTIONS definition.\"? "))
|
|
|
|
|
|
(do-test "See/Change Definition: select part of a litatom"
|
|
(do-test-menu-Message window-list 'low
|
|
" Testing: select part of a litatom
|
|
Assuming SEdit is editing the function temp-garbage.
|
|
Select the comment as a structure and press the delete key.
|
|
Type control-x.
|
|
Select the \"d\" in the first litatom \"cd\".
|
|
Type meta-O.
|
|
Does SEdit display in the SEdit prompt window:
|
|
\"Select name of object to edit.\"? "))
|
|
|
|
|
|
(do-test "See/Change Definition: select part of a string"
|
|
(do-test-menu-Message window-list 'low
|
|
" Testing: select part of a string
|
|
Assuming SEdit is editing the function temp-garbage and the variable cd.
|
|
Close the SEdit window for the variable \"cd\".
|
|
Select the \"h\" in the string \"hello\".
|
|
Type meta-O.
|
|
Does SEdit display in the SEdit prompt window:
|
|
\"Select name of object to edit.\"? "))
|
|
|
|
|
|
(do-test "See/Change Definition: select part of a number"
|
|
(do-test-menu-Message window-list 'low
|
|
" Testing: select part of a number
|
|
Assuming SEdit is editing the function temp-garbage.
|
|
Select the \"7\" in the number \"6/7\".
|
|
Type meta-O.
|
|
Does SEdit display in the SEdit prompt window:
|
|
\"Select name of object to edit.\"? "))
|
|
|
|
|
|
(do-test "See/Change Definition: pending delete of a litatom"
|
|
(do-test-menu-Message window-list 'low
|
|
" Testing: pending delete of litatom
|
|
Assuming SEdit is editing the function temp-garbage.
|
|
Select the litatom \"efg\" in pending delete mode by first pressing the left button of the mouse with the cursor on the \"e\" and then pressing the right button withe the cursor on the \"g\". This should create a box around the litatom \"efg\".
|
|
Type meta-O.
|
|
Does SEdit display in the SEdit prompt window:
|
|
\"Select name of object to edit.\"? "))
|
|
|
|
|
|
(do-test "See/Change Definition: pending delete of a string"
|
|
(do-test-menu-Message window-list 'low
|
|
" Testing: pending delete of a string
|
|
Assuming SEdit is editing the function temp-garbage.
|
|
Select the string \"hello\" in pending delete mode bye clicking on the \"h\", then pressing the right mouse button with the cursor to the right of the string.
|
|
Type meta-O.
|
|
Does SEdit display in the SEdit prompt window:
|
|
\"Select name of object to edit.\"? "))
|
|
|
|
|
|
(do-test "See/Change Definition: pending delete a number"
|
|
(do-test-menu-Message window-list 'low
|
|
" Testing: pending delete of a number
|
|
Assuming SEdit is editing the function temp-garbage.
|
|
Select the number \"4.5\" in pending delete mode.
|
|
Type meta-O.
|
|
Does SEdit display in the SEdit prompt window:
|
|
\"Select name of object to edit.\"? "))
|
|
|
|
|
|
(do-test "See/Change Definition: pending delete of a list"
|
|
(do-test-menu-Message window-list 'low
|
|
" Testing: pending delete of a list
|
|
Assuming SEdit is editing the function temp-garbage.
|
|
Select the list \"(bye)\" in pending delete mode.
|
|
Type meta-O.
|
|
Does SEdit display in the SEdit prompt window:
|
|
\"Select name of object to edit.\"? "))
|
|
|
|
|
|
(do-test "See/Change Definition: pending delete of a comment"
|
|
(do-test-menu-Message window-list 'low
|
|
" Testing: pending delete of a comment
|
|
Assuming SEdit is editing the function temp-garbage.
|
|
Place the structure caret the number \"1\".
|
|
Type in \"; hello\"
|
|
Select the comment in pending delete mode.
|
|
Type meta-O.
|
|
Does SEdit display in the SEdit prompt window:
|
|
\"Select name of object to edit.\"? "))
|
|
|
|
|
|
(do-test "See/Change Definition: extended selection of litatoms"
|
|
(do-test-menu-Message window-list 'low
|
|
" Testing: try extended selection of litatoms
|
|
Assuming SEdit is editing the function temp-garbage.
|
|
Delete the comment.
|
|
Select the litatom \"a\" as a structure, and extend the selection to include the next three litatoms.
|
|
Type meta-O
|
|
Does SEdit display in the SEdit prompt window:
|
|
\"Select name of object to edit.\"? "))
|
|
|
|
|
|
(do-test "See/Change Definition: extended selection of strings"
|
|
(do-test-menu-Message window-list 'low
|
|
" Testing: extended selection of strings
|
|
Assuming SEdit is editing the function temp-garbage.
|
|
Now select the string \"hello\" as a structure, and extend the selection to include the second string.
|
|
Type meta-O
|
|
Does SEdit display in the SEdit prompt window:
|
|
\"Select name of object to edit.\"? "))
|
|
|
|
|
|
(do-test "See/Change Definition: extended selection of numbers"
|
|
(do-test-menu-Message window-list 'low
|
|
" Testing: extended selection of numbers
|
|
Assuming SEdit is editing the function temp-garbage.
|
|
Select the number \"1\" as a structure, and extend the selection to include the next three numbers.
|
|
Type meta-O.
|
|
Does SEdit display in the SEdit prompt window:
|
|
\"Select name of object to edit.\"? "))
|
|
|
|
|
|
(do-test "See/Change Definition: extended selection of lists"
|
|
(do-test-menu-Message window-list 'low
|
|
" Testing: extended selection of lists
|
|
Assuming SEdit is editing the function temp-garbage.
|
|
Select the list \"(bye)\" as a structure, and extend the selection to include the next list.
|
|
Type meta-O.
|
|
Does SEdit display in the SEdit prompt window:
|
|
\"Select name of object to edit.\"? "))
|
|
|
|
|
|
(do-test "See/Change Definition: extended selection of litatoms and numbers"
|
|
(do-test-menu-Message window-list 'low
|
|
" Testing: extended selection of litatoms and numbers
|
|
Assuming SEdit is editing the function temp-garbage.
|
|
Select the number \"1\" as a structure, and extend the selection to include the next seven items.
|
|
Type meta-O.
|
|
Does SEdit display in the SEdit prompt window:
|
|
\"Select name of object to edit.\"? "))
|
|
|
|
|
|
(do-test "See/Change Definition: extended selection of strings and lists"
|
|
(do-test-menu-Message window-list 'low
|
|
" Testing: extended selection of strings and lists
|
|
Assuming SEdit is editing the function temp-garbage.
|
|
Select the string \"hello\" as a structure, and extend the selection to include the next three items.
|
|
Type meta-O.
|
|
Does SEdit display in the SEdit prompt window:
|
|
\"Select name of object to edit.\"? "))
|
|
|
|
|
|
(do-test "See/Change Definition: extended selection of several things"
|
|
(do-test-menu-Message window-list 'low
|
|
" Testing: extended selection of several things
|
|
Assuming SEdit is editing the function temp-garbage.
|
|
Select the number \"1\" as a structure, and extend the selection to include the rest.
|
|
Type meta-O.
|
|
Does SEdit display in the SEdit prompt window:
|
|
\"Select name of object to edit.\"? "))
|
|
|
|
|
|
(do-test "See/Change Definition: selection of entire structure"
|
|
(do-test-menu-Message window-list 'low
|
|
" Testing: selection of entire structure
|
|
Assuming SEdit is editing the function temp-garbage.
|
|
Select the entire structure.
|
|
Type meta-O.
|
|
Select FNS, NLAMBDA.
|
|
Does SEdit display in the SEdit prompt window:
|
|
\"(defun temp-garbage (x) (quote (1 2 4.5 6/7 a b cd efg \"hello\" \"BYE\" (BYE) (\"hi\" b cd 4)))) not editable.\"? "))
|
|
|
|
|
|
|
|
|
|
(do-test "Clean up"
|
|
(do-test-menu-message window-list 'high
|
|
"Close the SEdit window by selecting Done&Close from the window popup menu."))
|
|
|
|
) ; end of do-test-group
|
|
|
|
|
|
STOP
|