1
0
mirror of synced 2026-01-15 08:22:58 +00:00

316 lines
12 KiB
Plaintext

;; Being tested: SEdit
;;
;; Source: {ERIS}<LispCore>DOC>SEDIT>SEDIT.TEDIT
;;
;; Created By: Henry Cate III
;;
;; Creation Date: February 13, 1987
;;
;; Last Update:
;;
;; Filed As: {eris}<lispcore>test>SEdit>command-menu.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 "Menu"
:before (progn
(setq window-list (do-test-menu-Setup "Menu")))
:after (progn
(do-test-menu-Cleanup window-list))
;;; Since each command is tested in its own test suite,
;;; only worry about if can bring up the menu.
(do-test "Menu: no selection/no caret"
(let* (( user-result(do-test-menu-Message window-list 'high
" Testing Menu
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 tempx '(1 2 4.5 6/7 a b cd efg \"hello\" \"BYE\" (bye) (\"hi\" b cd 4)))
(il:dv tempx)
Select AttachMenu from the popup menu.
Does the attached menu come up? "))
(good-value (equal '(1 2 4.5 6/7 a b cd efg "hello" "BYE" (bye) ("hi" b cd 4)) tempx)))
(and user-result (if (eq t user-result) good-value T))
))
(do-test "Menu: no selection/edit caret"
(do-test-menu-Message window-list 'low
" Testing: no selection/edit caret
Assuming SEdit is editing the variable tempx which currently equals:
(1 2 4.5 6/7 a b cd efg \"hello\" \"BYE\" (bye) (\"hi\" b cd 4))
Select DONE from the SEdit popup menu.
If the attached menu is up, close it.
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-M.
Does the attached menu come up? "))
(do-test "Menu: no selection/structure caret"
(do-test-menu-Message window-list 'low
" Testing: no selection/structure caret
Assuming SEdit is editing the variable tempx which currently equals:
(1 2 4.5 6/7 a b cd efg \"hello\" \"BYE\" (bye) (\"hi\" b cd 4))
If the attached menu is up, close it.
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-M.
Does the attached menu come up? "))
(do-test "Menu: select a litatom"
(do-test-menu-Message window-list 'low
" Testing: select a litatom
Assuming SEdit is editing the variable tempx which currently equals:
(1 2 4.5 6/7 a b cd efg \"hello\" \"BYE\" (bye) (\"hi\" b cd 4))
If the attached menu is up, close it.
Select the first litatom \"cd\" as a structure, by pressing the left mouse button twice with the cursor over the litatom.
Type meta-M.
Does the attached menu come up? "))
(do-test "Menu: select a string"
(do-test-menu-Message window-list 'low
" Testing: select a string
Assuming SEdit is editing the variable tempx which currently equals:
(1 2 4.5 6/7 a b cd efg \"hello\" \"BYE\" (bye) (\"hi\" b cd 4))
If the attached menu is up, close it.
Select the string \"hello\" as a structure, by pressing the left mouse button twice with the cursor over the string.
Type meta-M.
Does the attached menu come up? "))
(do-test "Menu: select a number"
(do-test-menu-Message window-list 'low
" Testing: select a number
Assuming SEdit is editing the variable tempx which currently equals:
(1 2 4.5 6/7 a b cd efg \"hello\" \"BYE\" (bye) (\"hi\" b cd 4))
If the attached menu is up, close it.
Select the number \"4.5\" as a structure, by pressing the left mouse button twice with the cursor over the number.
Type meta-M.
Does the attached menu come up? "))
(do-test "Menu: select a list"
(do-test-menu-Message window-list 'low
" Testing: select a list
Assuming SEdit is editing the variable tempx which currently equals:
(1 2 4.5 6/7 a b cd efg \"hello\" \"BYE\" (bye) (\"hi\" b cd 4))
If the attached menu is up, close it.
Select the list \"(bye)\" as a structure, by pressing the left mouse button three times with the cursor over the \"y\".
Type meta-M.
Does the attached menu come up? "))
(do-test "Menu: select a comment"
(do-test-menu-Message window-list 'low
" Testing: select a comment
Assuming SEdit is editing the variable tempx which currently equals:
(1 2 4.5 6/7 a b cd efg \"hello\" \"BYE\" (bye) (\"hi\" b cd 4))
If the attached menu is up, close it.
Place the edit caret after the number 1 and type \"; hello\", then select this as a structure.
Type meta-M.
Does the attached menu come up? "))
(do-test "Menu: select part of a litatom"
(do-test-menu-Message window-list 'low
" Testing: select part of a litatom
Assuming SEdit is editing the variable tempx which currently equals:
(1 ; hello 2 4.5 6/7 a b cd efg \"hello\" \"BYE\" (bye) (\"hi\" b cd 4))
Select the comment as a structure and press the delete key.
If the attached menu is up, close it.
Type control-x.
Select the \"d\" in the first litatom \"cd\".
Type meta-M.
Does the attached menu come up? "))
(do-test "Menu: select part of a string"
(do-test-menu-Message window-list 'low
" Testing: select part of a string
Assuming SEdit is editing the variable tempx which currently equals:
(1 2 4.5 6/7 a b cd efg \"hello\" \"BYE\" (bye) (\"hi\" b cd 4))
If the attached menu is up, close it.
Select the \"h\" in the string \"hello\".
Type meta-M.
Does the attached menu come up? "))
(do-test "Menu: select part of a number"
(do-test-menu-Message window-list 'low
" Testing: select part of a number
Assuming SEdit is editing the variable tempx which currently equals:
(1 2 4.5 6/7 a b cd efg \"hello\" \"BYE\" (bye) (\"hi\" b cd 4))
If the attached menu is up, close it.
Select the \"7\" in the number \"6/7\".
Type meta-M.
Does the attached menu come up? "))
(do-test "Menu: pending delete of a litatom"
(do-test-menu-Message window-list 'low
" Testing: pending delete of litatom
Assuming SEdit is editing the variable tempx which currently equals:
(1 2 4.5 6/7 a b cd efg \"hello\" \"BYE\" (bye) (\"hi\" b cd 4))
If the attached menu is up, close it.
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 with the cursor on the \"g\". This should create a box around the litatom \"efg\".
Type meta-M.
Does the attached menu come up? "))
(do-test "Menu: pending delete of a string"
(do-test-menu-Message window-list 'low
" Testing: pending delete of a string
Assuming SEdit is editing the variable tempx which currently equals:
(1 2 4.5 6/7 a b cd efg \"hello\" \"BYE\" (bye) (\"hi\" b cd 4))
If the attached menu is up, close it.
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-M.
Does the attached menu come up? "))
(do-test "Menu: pending delete a number"
(do-test-menu-Message window-list 'low
" Testing: pending delete of a number
Assuming SEdit is editing the variable tempx which currently equals:
(1 2 4.5 6/7 a b cd efg \"hello\" \"BYE\" (bye) (\"hi\" b cd 4))
If the attached menu is up, close it.
Select the number \"4.5\" in pending delete mode.
Type meta-M.
Does the attached menu come up? "))
(do-test "Menu: pending delete of a list"
(do-test-menu-Message window-list 'low
" Testing: pending delete of a list
Assuming SEdit is editing the variable tempx which currently equals:
(1 2 4.5 6/7 a b cd efg \"hello\" \"BYE\" (bye) (\"hi\" b cd 4))
If the attached menu is up, close it.
Select the list \"(bye)\" in pending delete mode.
Type meta-M.
Does the attached menu come up? "))
(do-test "Menu: pending delete of a comment"
(do-test-menu-Message window-list 'low
" Testing: pending delete of a comment
Assuming SEdit is editing the variable tempx which currently equals:
(1 2 4.5 6/7 a b cd efg \"hello\" \"BYE\" (bye) (\"hi\" b cd 4))
If the attached menu is up, close it.
Place the structure caret the number \"1\".
Type in \"; hello\"
Select the comment in pending delete mode.
Type meta-M.
Does the attached menu come up? "))
(do-test "Menu: extended selection of litatoms"
(do-test-menu-Message window-list 'low
" Testing: try extended selection of litatoms
Assuming SEdit is editing the variable tempx which currently equals:
(1 ; hello 2 4.5 6/7 a b cd efg \"hello\" \"BYE\" (bye) (\"hi\" b cd 4))
Delete the comment.
If the attached menu is up, close it.
Select the litatom \"a\" as a structure, and extend the selection to include the next three litatoms.
Type meta-M
Does the attached menu come up? "))
(do-test "Menu: extended selection of strings"
(do-test-menu-Message window-list 'low
" Testing: extended selection of strings
Assuming SEdit is editing the variable tempx which currently equals:
(1 2 4.5 6/7 a b cd efg \"hello\" \"BYE\" (bye) (\"hi\" b cd 4))
If the attached menu is up, close it.
Now select the string \"hello\" as a structure, and extend the selection to include the second string.
Type meta-M
Does the attached menu come up? "))
(do-test "Menu: extended selection of numbers"
(do-test-menu-Message window-list 'low
" Testing: extended selection of numbers
Assuming SEdit is editing the variable tempx which currently equals:
(1 2 4.5 6/7 a b cd efg \"hello\" \"BYE\" (bye) (\"hi\" b cd 4))
If the attached menu is up, close it.
Select the number \"1\" as a structure, and extend the selection to include the next number.
Type meta-M
Does the attached menu come up? "))
(do-test "Menu: extended selection of lists"
(do-test-menu-Message window-list 'low
" Testing: extended selection of lists
Assuming SEdit is editing the variable tempx which currently equals:
(1 2 4.5 6/7 a b cd efg \"hello\" \"BYE\" (bye) (\"hi\" b cd 4))
If the attached menu is up, close it.
Select the list \"(bye)\" as a structure, and extend the selection to include the next list.
Type meta-M.
Does the attached menu come up? "))
(do-test "Menu: 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 variable tempx which currently equals:
(1 2 4.5 6/7 a b cd efg \"hello\" \"BYE\" (bye) (\"hi\" b cd 4))
If the attached menu is up, close it.
Select the number \"1\" as a structure, and extend the selection to include the next seven items.
Type meta-m.
Does the attached menu come up? "))
(do-test "Menu: 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 variable tempx which currently equals:
(1 2 4.5 6/7 a b cd efg \"hello\" \"BYE\" (bye) (\"hi\" b cd 4))
Select the string \"hello\" as a structure, and extend the selection to include the three items.
Type meta-M.
Does SEdit display in the SEdit prompt window:
\"This SEdit already has a menu\"? "))
(do-test "Menu: extended selection of several things"
(do-test-menu-Message window-list 'low
" Testing: extended selection of several things
Assuming SEdit is editing the variable tempx which currently equals:
(1 2 4.5 6/7 a b cd efg \"hello\" \"BYE\" (bye) (\"hi\" b cd 4))
If the attached menu is up, close it.
Select the number \"1\" as a structure, and extend the selection to include the rest.
Type meta-M.
Does the attached menu come up? "))
(do-test "Menu: selection of entire structure"
(do-test-menu-Message window-list 'low
" Testing: selection of entire structure
Assuming SEdit is editing the variable tempx which currently equals:
(1 2 4.5 6/7 a b cd efg \"hello\" \"BYE\" (bye) (\"hi\" b cd 4))
If the attached menu is up, close it.
Select the entire structure.
Type meta-M.
Does the attached menu come up? "))
(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