401 lines
18 KiB
Plaintext
401 lines
18 KiB
Plaintext
;; Being tested: SEdit
|
|
;;
|
|
;; Source: {ERIS}<LispCore>DOC>SEDIT>SEDIT.TEDIT
|
|
;;
|
|
;; Created By: Henry Cate III
|
|
;;
|
|
;; Creation Date: February 25, 1987
|
|
;;
|
|
;; Last Update:
|
|
;;
|
|
;; Filed As: {eris}<lispcore>test>SEdit>command-package.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 "Change Package"
|
|
:before (progn
|
|
(setq window-list (do-test-menu-Setup "Change Package")))
|
|
|
|
:after (progn
|
|
(do-test-menu-Cleanup window-list))
|
|
|
|
|
|
(do-test "Change Package: no selection/no caret"
|
|
(let* ((user-result (do-test-menu-Message window-list 'high
|
|
" Testing Change Package
|
|
If there is no free Xerox Common Lisp exec, bring up a another one and type: \"(cl:in-packge 'xcl-test)\"
|
|
In the exec type:
|
|
|
|
(setq tempx '(1 4.5 6/7 a cd efg \"hello\" \"BYE\" (bye) (\"hi\" (b) cd 4)))
|
|
(ed 'tempx)
|
|
|
|
Select Change Package from the pop up menu.
|
|
Enter: \"il\"
|
|
Check for two things.
|
|
First does the SEdit banner now read:
|
|
\"Sedit TEMPX Package: INTERLISP\"
|
|
And second does SEdit redisplay tempx to look like this:
|
|
\"(1 4.5 6/7 xcl-test::a xcl-test::cd xcl-test::efg \"hello\" \"BYE\" (xcl-test::bye) (\"hi\" (xcl-test::b) xcl-test::cd 4))\"?
|
|
If it does both please indicate sucess. "))
|
|
(good-value (equal '(1 4.5 6/7 a cd efg "hello" "BYE" (bye) ("hi" (b) cd 4)) tempx)))
|
|
(and user-result (if (eq t user-result) good-value T))
|
|
))
|
|
|
|
|
|
(do-test "Change Package: no selection/edit caret"
|
|
(do-test-menu-Message window-list 'low
|
|
" Testing: no selection/edit caret
|
|
Assumping SEdit is editing the variable tempx which currently equals:
|
|
(1 4.5 6/7 xcl-test::a xcl-test::cd xcl-test::efg \"hello\" \"BYE\" (xcl-test::bye) (\"hi\" (xcl-test::b) xcl-test::cd 4))
|
|
Select DONE from the SEdit popup menu.
|
|
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-P.
|
|
Enter: \"xcl\"
|
|
Check for two things.
|
|
First does the SEdit banner now read:
|
|
\"Sedit TEMPX Package: XEROX-COMMON-LISP\"
|
|
And second does SEdit redisplay tempx to look like this:
|
|
\"(1 4.5 6/7 xcl-test::a xcl-test::cd xcl-test::efg \"hello\" \"BYE\" (xcl-test::bye) (\"hi\" (xcl-test::b) xcl-test::cd 4))\"?
|
|
If it does both please indicate sucess. "))
|
|
|
|
|
|
(do-test "Change Package: no selection/structure caret"
|
|
(do-test-menu-Message window-list 'low
|
|
" Testing: no selection/structure caret
|
|
Assumping SEdit is editing the variable tempx which currently equals:
|
|
(1 4.5 6/7 xcl-test::a xcl-test::cd xcl-test::efg \"hello\" \"BYE\" (xcl-test::bye) (\"hi\" (xcl-test::b) xcl-test::cd 4))
|
|
Want to place the structure caret right between \"xcl-test::a\" and \"xcl-test::cd\" without selecting either item. Do this by positioning the mouse cursor between the two items and press the middle button.
|
|
Type meta-P.
|
|
Enter: \"xcl-test\"
|
|
Check for two things.
|
|
First does the SEdit banner now read:
|
|
\"Sedit TEMPX Package: XCL-TEST\"
|
|
And second does SEdit redisplay tempx to look like this:
|
|
\"(1 4.5 6/7 a cd efg \"hello\" \"BYE\" (bye) \"hi\" (b) cd 4))\"?
|
|
If it does both please indicate sucess. "))
|
|
|
|
|
|
(do-test "Change Package: select a litatom"
|
|
(do-test-menu-Message window-list 'low
|
|
" Testing: select a litatom
|
|
Assumping SEdit is editing the variable tempx which currently equals:
|
|
(1 4.5 6/7 a cd efg \"hello\" \"BYE\" (bye) \"hi\" (b) cd 4))
|
|
Select the first litatom \"cd\" as a structure, by pressing the left mouse button twice with the cursor over the litatom.
|
|
Type meta-P.
|
|
Enter: \"xcl\"
|
|
Check for two things.
|
|
First does the SEdit banner now read:
|
|
\"Sedit TEMPX Package: XEROX-COMMON-LISP\"
|
|
And second does SEdit redisplay tempx to look like this:
|
|
\"(1 4.5 6/7 xcl-test::a xcl-test::cd xcl-test::efg \"hello\" \"BYE\" (xcl-test::bye) (\"hi\" (xcl-test::b) xcl-test::cd 4))\"?
|
|
If it does both please indicate sucess. "))
|
|
|
|
|
|
(do-test "Change Package: select a string"
|
|
(do-test-menu-Message window-list 'low
|
|
" Testing: select a string
|
|
Assumping SEdit is editing the variable tempx which currently equals:
|
|
(1 4.5 6/7 xcl-test::a xcl-test::cd xcl-test::efg \"hello\" \"BYE\" (xcl-test::bye) (\"hi\" (xcl-test::b) xcl-test::cd 4))
|
|
Select the string \"hello\" as a structure, by pressing the left mouse button twice with the cursor over the string.
|
|
Type meta-P.
|
|
Enter: \"xcl\"
|
|
Check for two things.
|
|
First does the SEdit banner now read:
|
|
\"Sedit TEMPX Package: XEROX-COMMON-LISP\"
|
|
And second does SEdit redisplay tempx to look like this:
|
|
\"(1 4.5 6/7 xcl-test::a xcl-test::cd xcl-test::efg \"hello\" \"BYE\" (xcl-test::bye) (\"hi\" (xcl-test::b) xcl-test::cd 4))\"?
|
|
If it does both please indicate sucess. "))
|
|
|
|
|
|
(do-test "Change Package: select a number"
|
|
(do-test-menu-Message window-list 'low
|
|
" Testing: select a number
|
|
Assumping SEdit is editing the variable tempx which currently equals:
|
|
(1 4.5 6/7 xcl-test::a xcl-test::cd xcl-test::efg \"hello\" \"BYE\" (xcl-test::bye) (\"hi\" (xcl-test::b) xcl-test::cd 4))
|
|
Select the number \"4.5\" as a structure, by pressing the left mouse button twice with the cursor over the number.
|
|
Type meta-P twice.
|
|
Enter: \"INTERLISP\"
|
|
Check for two things.
|
|
First does the SEdit banner now read:
|
|
\"Sedit TEMPX Package: INTERLISP\"
|
|
And second does SEdit redisplay tempx to look like this:
|
|
\"(1 4.5 6/7 xcl-test::a xcl-test::cd xcl-test::efg \"hello\" \"BYE\" (xcl-test::bye) (\"hi\" (xcl-test::b) xcl-test::cd 4))\"?
|
|
If it does both please indicate sucess. "))
|
|
|
|
|
|
(do-test "Change Package: select a list"
|
|
(do-test-menu-Message window-list 'low
|
|
" Testing: select a list
|
|
Assumping SEdit is editing the variable tempx which currently equals:
|
|
(1 4.5 6/7 xcl-test::a xcl-test::cd xcl-test::efg \"hello\" \"BYE\" (xcl-test::bye) (\"hi\" (xcl-test::b) xcl-test::cd 4))
|
|
Select the list \"(xcl-test::bye)\" as a structure, by pressing the left mouse button three times with the cursor over the \"y\".
|
|
Type meta-P.
|
|
Enter: \"interlisp\"
|
|
Check for two things.
|
|
First does the SEdit banner now read:
|
|
\"Sedit TEMPX Package: INTERLISP\"
|
|
And second does SEdit redisplay tempx to look like this:
|
|
\"(1 4.5 6/7 xcl-test::a xcl-test::cd xcl-test::efg \"hello\" \"BYE\" (xcl-test::bye) (\"hi\" (xcl-test::b) xcl-test::cd 4))\"?
|
|
If it does both please indicate sucess. "))
|
|
|
|
|
|
(do-test "Change Package: select part of a litatom"
|
|
(do-test-menu-Message window-list 'low
|
|
" Testing: select part of a litatom
|
|
Assumping SEdit is editing the variable tempx which currently equals:
|
|
(1 4.5 6/7 xcl-test::a xcl-test::cd xcl-test::efg \"hello\" \"BYE\" (xcl-test::bye) (\"hi\" (xcl-test::b) xcl-test::cd 4))
|
|
Select the \"d\" in the first litatom \"xcl-test::cd\".
|
|
Type meta-P.
|
|
Enter: \"XCL-TEST\"
|
|
Check for two things.
|
|
First does the SEdit banner now read:
|
|
\"Sedit TEMPX Package: XCL-TEST\"
|
|
And second does SEdit redisplay tempx to look like this:
|
|
\"(1 4.5 6/7 a cd efg \"hello\" \"BYE\" (bye) (\"hi\" (b) cd 4))\"?
|
|
If it does both please indicate sucess. "))
|
|
|
|
|
|
(do-test "Change Package: select part of a string"
|
|
(do-test-menu-Message window-list 'low
|
|
" Testing: select part of a string
|
|
Assumping SEdit is editing the variable tempx which currently equals:
|
|
(1 4.5 6/7 a cd efg \"hello\" \"BYE\" (bye) (\"hi\" (b) cd 4))
|
|
Select the \"h\" in the string \"hello\".
|
|
Type meta-P.
|
|
Enter: \"XEROX-COMMON-LISP\"
|
|
Check for two things.
|
|
First does the SEdit banner now read:
|
|
\"Sedit TEMPX Package: XEROX-COMMON-LISP\"
|
|
And second does SEdit redisplay tempx to look like this:
|
|
\"(1 4.5 6/7 xcl-test::a xcl-test::cd xcl-test::efg \"hello\" \"BYE\" (xcl-test::bye) (\"hi\" (xcl-test::b) xcl-test::cd 4))\"?
|
|
If it does both please indicate sucess. "))
|
|
|
|
|
|
(do-test "Change Package: select part of a number"
|
|
(do-test-menu-Message window-list 'low
|
|
" Testing: select part of a number
|
|
Assumping SEdit is editing the variable tempx which currently equals:
|
|
(1 4.5 6/7 xcl-test::a xcl-test::cd xcl-test::efg \"hello\" \"BYE\" (xcl-test::bye) (\"hi\" (xcl-test::b) xcl-test::cd 4))
|
|
Select the \"7\" in the number \"6/7\".
|
|
Type meta-P.
|
|
Enter: \"ZZZXXXYYY-SHOULD-NOT-EXIST\"
|
|
Check for two things.
|
|
First did SEdit display in the SEdit prompt window:
|
|
\"No such package: ZZZXXXYYY-SHOULD-NOT-EXIST\"?
|
|
Second does the SEdit banner now read:
|
|
\"Sedit TEMPX Package: XEROX-COMMON-LISP\"
|
|
If it does both please indicate sucess. "))
|
|
|
|
|
|
(do-test "Change Package: pending delete of a litatom"
|
|
(do-test-menu-Message window-list 'low
|
|
" Testing: pending delete of litatom
|
|
Assumping SEdit is editing the variable tempx which currently equals:
|
|
(1 4.5 6/7 xcl-test::a xcl-test::cd xcl-test::efg \"hello\" \"BYE\" (xcl-test::bye) (\"hi\" (xcl-test::b) xcl-test::cd 4))
|
|
Select the litatom \"xcl-test::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 \"xcl-test::efg\".
|
|
Type meta-P.
|
|
Enter: \"IL\"
|
|
Check for two things.
|
|
First does the SEdit banner now read:
|
|
\"Sedit TEMPX Package: INTERLISP\"
|
|
And second does SEdit redisplay tempx to look like this:
|
|
\"(1 4.5 6/7 xcl-test::a xcl-test::cd xcl-test::efg \"hello\" \"BYE\" (xcl-test::bye) (\"hi\" (xcl-test::b) xcl-test::cd 4))\"?
|
|
If it does both please indicate sucess. "))
|
|
|
|
|
|
(do-test "Change Package: pending delete of a string"
|
|
(do-test-menu-Message window-list 'low
|
|
" Testing: pending delete of a string
|
|
Assumping SEdit is editing the variable tempx which currently equals:
|
|
(1 4.5 6/7 xcl-test::a xcl-test::cd xcl-test::efg \"hello\" \"BYE\" (xcl-test::bye) (\"hi\" (xcl-test::b) xcl-test::cd 4))
|
|
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-P.
|
|
Enter: \"XCL-TEST\"
|
|
Check for two things.
|
|
First does the SEdit banner now read:
|
|
\"Sedit TEMPX Package: XCL-TEST\"
|
|
And second does SEdit redisplay tempx to look like this:
|
|
\"(1 4.5 6/7 a cd efg \"hello\" \"BYE\" (bye) (\"hi\" (b) cd 4))\"?
|
|
If it does both please indicate sucess. "))
|
|
|
|
|
|
(do-test "Change Package: pending delete of a list"
|
|
(do-test-menu-Message window-list 'low
|
|
" Testing: pending delete of a list
|
|
Assumping SEdit is editing the variable tempx which currently equals:
|
|
(1 4.5 6/7 a cd efg \"hello\" \"BYE\" (bye) (\"hi\" (b) cd 4))
|
|
Select the list \"(bye)\" in pending delete mode.
|
|
Type meta-P.
|
|
Just press the carriage return.
|
|
Check for two things.
|
|
First does the SEdit banner still read:
|
|
\"Sedit TEMPX Package: XCL-TEST\"
|
|
And second does SEdit redisplay tempx to look like this:
|
|
\"(1 4.5 6/7 a cd efg \"hello\" \"BYE\" (bye) (\"hi\" (b) cd 4))\"?
|
|
If it does both please indicate sucess. "))
|
|
|
|
|
|
(do-test "Change Package: extended selection of litatoms"
|
|
(do-test-menu-Message window-list 'low
|
|
" Testing: try extended selection of litatoms
|
|
Assumping SEdit is editing the variable tempx which currently equals:
|
|
(1 4.5 6/7 a cd efg \"hello\" \"BYE\" (bye) (\"hi\" (b) cd 4))
|
|
Select the litatom \"a\" as a structure, and extend the selection to include the next two litatoms.
|
|
Type meta-P
|
|
Enter: \"il\"
|
|
Check for two things.
|
|
First does the SEdit banner now read:
|
|
\"Sedit TEMPX Package: INTERLISP\"
|
|
And second does SEdit redisplay tempx to look like this:
|
|
\"(1 4.5 6/7 xcl-test::a xcl-test::cd xcl-test::efg \"hello\" \"BYE\" (xcl-test::bye) (\"hi\" (xcl-test::b) xcl-test::cd 4))\"?
|
|
If it does both please indicate sucess. "))
|
|
|
|
|
|
(do-test "Change Package: extended selection of strings"
|
|
(do-test-menu-Message window-list 'low
|
|
" Testing: extended selection of strings
|
|
Assumping SEdit is editing the variable tempx which currently equals:
|
|
(1 4.5 6/7 xcl-test::a xcl-test::cd xcl-test::efg \"hello\" \"BYE\" (xcl-test::bye) (\"hi\" (xcl-test::b) xcl-test::cd 4))
|
|
Now select the string \"hello\" as a structure, and extend the selection to include the second string.
|
|
Type meta-P
|
|
Enter: \"IL\"
|
|
Check for two things.
|
|
First does the SEdit banner now read:
|
|
\"Sedit TEMPX Package: INTERLISP\"
|
|
And second does SEdit redisplay tempx to look like this:
|
|
\"(1 4.5 6/7 xcl-test::a xcl-test::cd xcl-test::efg \"hello\" \"BYE\" (xcl-test::bye) (\"hi\" (xcl-test::b) xcl-test::cd 4))\"?
|
|
If it does both please indicate sucess. "))
|
|
|
|
|
|
(do-test "Change Package: extended selection of numbers"
|
|
(do-test-menu-Message window-list 'low
|
|
" Testing: extended selection of numbers
|
|
Assumping SEdit is editing the variable tempx which currently equals:
|
|
(1 4.5 6/7 xcl-test::a xcl-test::cd xcl-test::efg \"hello\" \"BYE\" (xcl-test::bye) (\"hi\" (xcl-test::b) xcl-test::cd 4))
|
|
Select the number \"1\" as a structure, and extend the selection to include the next two numbers.
|
|
Type meta-P.
|
|
Enter: \"xcl\"
|
|
Check for two things.
|
|
First does the SEdit banner now read:
|
|
\"Sedit TEMPX Package: XEROX-COMMON-LISP\"
|
|
And second does SEdit redisplay tempx to look like this:
|
|
\"(1 4.5 6/7 xcl-test::a xcl-test::cd xcl-test::efg \"hello\" \"BYE\" (xcl-test::bye) (\"hi\" (xcl-test::b) xcl-test::cd 4))\"?
|
|
If it does both please indicate sucess. "))
|
|
|
|
|
|
(do-test "Change Package: extended selection of lists"
|
|
(do-test-menu-Message window-list 'low
|
|
" Testing: extended selection of lists
|
|
Assumping SEdit is editing the variable tempx which currently equals:
|
|
(1 4.5 6/7 xcl-test::a xcl-test::cd xcl-test::efg \"hello\" \"BYE\" (xcl-test::bye) (\"hi\" (xcl-test::b) xcl-test::cd 4))
|
|
Select the list \"(xcl-test::bye)\" as a structure, and extend the selection to include the next list.
|
|
Type meta-P.
|
|
Enter: \"il\"
|
|
Check for two things.
|
|
First does the SEdit banner now read:
|
|
\"Sedit TEMPX Package: INTERLISP\"
|
|
And second does SEdit redisplay tempx to look like this:
|
|
\"(1 4.5 6/7 xcl-test::a xcl-test::cd xcl-test::efg \"hello\" \"BYE\" (xcl-test::bye) (\"hi\" (xcl-test::b) xcl-test::cd 4))\"?
|
|
If it does both please indicate sucess. "))
|
|
|
|
|
|
(do-test "Change Package: extended selection of litatoms and numbers"
|
|
(do-test-menu-Message window-list 'low
|
|
" Testing: extended selection of litatoms and numbers
|
|
Assumping SEdit is editing the variable tempx which currently equals:
|
|
(1 4.5 6/7 xcl-test::a xcl-test::cd xcl-test::efg \"hello\" \"BYE\" (xcl-test::bye) (\"hi\" (xcl-test::b) xcl-test::cd 4))
|
|
Select the number \"1\" as a structure, and extend the selection to include the next five items.
|
|
Type meta-P.
|
|
Enter: \"xcl\"
|
|
Check for two things.
|
|
First does the SEdit banner now read:
|
|
\"Sedit TEMPX Package: XEROX-COMMON-LISP\"
|
|
And second does SEdit redisplay tempx to look like this:
|
|
\"(1 4.5 6/7 xcl-test::a xcl-test::cd xcl-test::efg \"hello\" \"BYE\" (xcl-test::bye) (\"hi\" (xcl-test::b) xcl-test::cd 4))\"?
|
|
If it does both please indicate sucess. "))
|
|
|
|
|
|
(do-test "Change Package: extended selection of strings and lists"
|
|
(do-test-menu-Message window-list 'low
|
|
" Testing: extended selection of strings and lists
|
|
Assumping SEdit is editing the variable tempx which currently equals:
|
|
(1 4.5 6/7 xcl-test::a xcl-test::cd xcl-test::efg \"hello\" \"BYE\" (xcl-test::bye) (\"hi\" (xcl-test::b) xcl-test::cd 4))
|
|
Select the string \"hello\" as a structure, and extend the selection to include the next three items.
|
|
Type meta-P.
|
|
Enter: \"XCL-TEST\"
|
|
Check for two things.
|
|
First does the SEdit banner now read:
|
|
\"Sedit TEMPX Package: XCL-TEST\"
|
|
And second does SEdit redisplay tempx to look like this:
|
|
\"(1 4.5 6/7 a cd efg \"hello\" \"BYE\" (bye) (\"hi\" (b) cd 4))\"?
|
|
If it does both please indicate sucess. "))
|
|
|
|
|
|
(do-test "Change Package: extended selection of several things"
|
|
(do-test-menu-Message window-list 'low
|
|
" Testing: extended selection of several things
|
|
Assumping SEdit is editing the variable tempx which currently equals:
|
|
(1 4.5 6/7 a cd efg \"hello\" \"BYE\" (bye) (\"hi\" (b) cd 4))
|
|
Select the number \"1\" as a structure, and extend the selection to include the rest.
|
|
Type meta-P.
|
|
Enter: \"XCL-TEST\"
|
|
Check for two things.
|
|
First does the SEdit banner now read:
|
|
\"Sedit TEMPX Package: XCL-TEST\"
|
|
And second does SEdit redisplay tempx to look like this:
|
|
\"(1 4.5 6/7 a cd efg \"hello\" \"BYE\" (bye) (\"hi\" (b) cd 4))\"?
|
|
If it does both please indicate sucess. "))
|
|
|
|
|
|
(do-test "Change Package: selection of entire structure"
|
|
(do-test-menu-Message window-list 'low
|
|
" Testing: selection of entire structure
|
|
Assumping SEdit is editing the variable tempx which currently equals:
|
|
(1 4.5 6/7 a cd efg \"hello\" \"BYE\" (bye) (\"hi\" (b) gh 4))
|
|
Select the entire structure.
|
|
Type meta-P.
|
|
Enter: \"il\"
|
|
Check for two things.
|
|
First does the SEdit banner now read:
|
|
\"Sedit TEMPX Package: INTERLISP\"
|
|
And second does SEdit redisplay tempx to look like this:
|
|
\"(1 4.5 6/7 xcl-test::a xcl-test::cd xcl-test::efg \"hello\" \"BYE\" (xcl-test::bye) (\"hi\" (xcl-test::b) xcl-test::cd 4))\"?
|
|
If it does both please indicate sucess. "))
|
|
|
|
|
|
|
|
(do-test "Change Package: Pending delete of whole structure"
|
|
(do-test-menu-Message window-list 'low
|
|
" Testing: selection of entire structure
|
|
Assumping SEdit is editing the variable tempx which currently equals:
|
|
(1 4.5 6/7 xcl-test::a xcl-test::cd xcl-test::efg \"hello\" \"BYE\" (xcl-test::bye) (\"hi\" (xcl-test::b) xcl-test::cd 4))
|
|
Select the entire structure in pending delete mode.
|
|
Type meta-P.
|
|
Enter: \"xcl\"
|
|
Check for two things.
|
|
First does the SEdit banner now read:
|
|
\"Sedit TEMPX Package: XEROX-COMMON-LISP\"
|
|
And second does SEdit redisplay tempx to look like this:
|
|
\"(1 4.5 6/7 xcl-test::a xcl-test::cd xcl-test::efg \"hello\" \"BYE\" (xcl-test::bye) (\"hi\" (xcl-test::b) xcl-test::cd 4))\"?
|
|
If it does both please indicate sucess."))
|
|
|
|
|
|
(do-test "Clean up"
|
|
(do-test-menu-message window-list 'high
|
|
"Close the SEdit window by selecting Close from the window popup menu."))
|
|
|
|
) ; end of do-test-group
|
|
|
|
|
|
STOP
|
|
|
|
|