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

2 lines
14 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

;; Being tested: SEdit
;;
;; Source: {ERIS}<LispCore>DOC>SEDIT>SEDIT.TEDIT
;;
;; Created By: Henry Cate III
;;
;; Creation Date: February 6, 1987
;;
;; Last Update:
;;
;; Filed As: {eris}<lispcore>test>SEdit>command-control.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)
;;; -----------------------------------------------------
;;;
;;; The following are the complete tests, a do-test-group per command
;;; From keyboard, popup menu, attached menu. Test for all possible
;;; combinations of selection and caret point:
;;; no selection/no caret
;;; no selection/edit caret
;;; no selection/structure caret
;;; selection of each lisp type: litatom, string, list, comment, gap
;;; selection of part of each type above
;;; pending delete selection of each type above
;;; extended selection ofobjects of the same type
;;; extended selection of objects of mixed type
;;; selection of entire structure
;;; pending delete selection of entire structure
;;;
;;; -----------------------------------------------------
(do-test-group "Redisplay, test against standard set"
:before (progn
(setq window-list (do-test-menu-Setup "Redisplay")))
:after (progn
(do-test-menu-Cleanup window-list))
(do-test "Redisplay:no selection/no caret"
(do-test-menu-Message window-list 'high
"If needed, bring up a second exec and type: \"(cl:in-package 'xcl-test)\"
Testing: no selection/no caret
In the exec type:
(setq tempx '(1 xy \"hi\" (\"bye\" a 23 4)))
(il:dv tempx)
Type control-L.
Was the SEdit window redisplayed?"))
(do-test "Redisplay: no selection/edit caret"
(do-test-menu-Message window-list 'low
" Testing: no selection/edit caret
Assuming tempx currently equals (1 xy \"hi\" (\"bye\" a 23 4))
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 control-L.
Was the SEdit window redisplayed?"))
(do-test "Redisplay: no selection/structure caret"
(do-test-menu-Message window-list 'low
" Testing: no selection/structure caret
Assuming tempx currently equals (1 xy \"hi\" (\"bye\" a 23 4))
Want to place the structure caret right between xy and \"hi\" without selecting either item. Do this by positioning the mouse cursor between the two items and press the middle button.
Type control-L.
Was the SEdit window redisplayed?"))
(do-test "Redisplay: select a litatom"
(do-test-menu-Message window-list 'low
" Testing: select a litatom
Assuming tempx currently equals (1 xy \"hi\" (\"bye\" a 23 4))
Select the litatom \"xy\" as a structure, by pressing the middle button.
Type control-L.
Was the SEdit window redisplayed?"))
(do-test "Redisplay: select a string"
(do-test-menu-Message window-list 'low
" Testing: select a string
Assuming tempx currently equals (1 xy \"hi\" (\"bye\" a 23 4))
Select the string \"hi\" as a structure.
Type control-L.
Was the SEdit window redisplayed?"))
(do-test "Redisplay: select a number"
(do-test-menu-Message window-list 'low
" Testing: select a number
Assuming tempx currently equals (1 xy \"hi\" (\"bye\" a 23 4))
Select the number \"1\" as a structure.
Type control-L.
Was the SEdit window redisplayed?"))
(do-test "Redisplay: select a list"
(do-test-menu-Message window-list 'low
" Testing: select a list
Assuming tempx currently equals (1 xy \"hi\" (\"bye\" a 23 4))
Select the list (\"bye\" a 23 4) as a structure.
Type control-L.
Was the SEdit window redisplayed?"))
(do-test "Redisplay: select part of a litatom"
(do-test-menu-Message window-list 'low
" Testing: select part of a litatom
Assuming tempx currently equals (1 xy \"hi\" (\"bye\" a 23 4))
Select the \"x\" in the litatom \"xy\" by pressing the left button.
Type control-L.
Was the SEdit window redisplayed?"))
(do-test "Redisplay: select part of a string"
(do-test-menu-Message window-list 'low
" Testing: select part of a string
Assuming tempx currently equals (1 xy \"hi\" (\"bye\" a 23 4))
Select the \"h\" in the string \"hi\".
Type control-L.
Was the SEdit window redisplayed?"))
(do-test "Redisplay: select part of a number"
(do-test-menu-Message window-list 'low
" Testing: select part of a number
Assuming tempx currently equals (1 xy \"hi\" (\"bye\" a 23 4))
Select the \"2\" in the number \"23\".
Type control-L.
Was the SEdit window redisplayed?"))
(do-test "Redisplay: delete a litatom"
(do-test-menu-Message window-list 'low
" Testing: delete a litatom
Assuming tempx currently equals (1 xy \"hi\" (\"bye\" a 23 4))
Delete the litatom \"xy\" by selecting it as a structure and pressing the delete key.
Type control-L.
Was the SEdit window redisplayed?"))
(do-test "Redisplay: delete a string"
(do-test-menu-Message window-list 'low
" Testing: delete a string
Assuming tempx currently equals (1 \"hi\" (\"bye\" a 23 4))
Delete the string \"hi\".
Type control-L.
Was the SEdit window redisplayed?"))
(do-test "Redisplay: delete of a number"
(do-test-menu-Message window-list 'low
" Testing: delete a number
Assuming tempx currently equals (1 (\"bye\" a 23 4))
Delete the number \"1\".
Type control-L.
Was the SEdit window redisplayed?"))
(do-test "Redisplay: extended selection of objects of same type"
(do-test-menu-Message window-list 'low
" Testing: extended selection of objects of same type
Assuming tempx currently equals ((\"bye\" a 23 4))
Select the numbers 23 and 4, by picking the 23 with the left button, and the 4 with the right button.
Type control-L.
Was the SEdit window redisplayed?"))
(do-test "Redisplay: extended selection of objects of different types"
(do-test-menu-Message window-list 'low
" Testing: extended selection of objects of different types
Assuming tempx currently equals ((\"bye\" a 23 4))
Select all items in the smaller list.
Type control-L.
Was the SEdit window redisplayed?"))
) ; End of do-test-group
(do-test-group "Delete previous and done, test against standard set"
:before (progn
(setq window-list (do-test-menu-Setup "Delete previous")))
:after (progn
(do-test-menu-Cleanup window-list))
(do-test "Delete previous & done:no selection/no caret"
(let* (( user-result (do-test-menu-Message window-list 'high
" Testing parentheses
If needed, bring up a second exec and type: \"(cl:in-package 'xcl-test)\"
Then in the exec type:
(setq tempx '(1 2 34 ab cd ef gh \"hi\" \"how\" \"are\" \"you\" (\"bye\" a 23 4)))
(il:dv tempx)
Type control-W, and a control-X.
Were you able to get this far?"))
(good-value (equal '(1 2 34 ab cd ef gh "hi" "how" "are" "you" ("bye" a 23 4)) tempx)))
(and user-result (if (eq t user-result) good-value T))
))
(do-test "Delete previous & done: no selection/edit caret"
(let* ((user-result (do-test-menu-Message window-list 'low
" Testing: no selection/edit caret
Assuming SEdit is editing tempx which currently equals (1 2 34 ab cd ef gh \"hi\" \"how\" \"are\" \"you\" (\"bye\" a 23 4))
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 control-W, and a control-X.
Were you able to get this far?"))
(good-value (equal '(2 34 ab cd ef gh "hi" "how" "are" "you" ("bye" a 23 4)) tempx)))
(and user-result (if (eq t user-result) good-value T))
))
(do-test "Delete previous & done: no selection/structure caret"
(let* ((user-result (do-test-menu-Message window-list 'low
" Testing: no selection/structure caret
Assuming SEdit is editing tempx which currently equals (2 34 ab cd ef gh \"hi\" \"how\" \"are\" \"you\" (\"bye\" a 23 4))
Want to place the structure caret right between \"ab\" and \"cd\" without selecting either item. Do this by positioning the mouse cursor between the two items and press the middle button.
Type control-W, and a control-X.
Were you able to get this far?"))
(good-value (equal '(2 34 cd ef gh "hi" "how" "are" "you" ("bye" a 23 4)) tempx)))
(and user-result (if (eq t user-result) good-value T))
))
(do-test "Delete previous & done: select a litatom"
(let* ((user-result (do-test-menu-Message window-list 'low
" Testing: select a litatom
Assuming SEdit is editing tempx which currently equals (2 34 cd ef gh \"hi\" \"how\" \"are\" \"you\" (\"bye\" a 23 4))
Select the litatom \"gh\" as a structure, by pressing the middle button with the cursor over the \"h\". The structure caret should end up to the right of \"gh\".
Type control-W, and a control-X.
Were you able to get this far?"))
(good-value (equal '(2 34 cd ef "hi" "how" "are" "you" ("bye" a 23 4)) tempx)))
(and user-result (if (eq t user-result) good-value T))
))
(do-test "Delete previous & done: select a string"
(let* ((user-result (do-test-menu-Message window-list 'low
" Testing: select a string
Assuming SEdit is editing tempx which currently equals (2 34 cd ef \"hi\" \"how\" \"are\" \"you\" (\"bye\" a 23 4))
Select the string \"hi\" as a structure, with the structure caret to the right of the string.
Type control-W, and a control-X.
Were you able to get this far?"))
(good-value (equal '(2 34 cd ef "how" "are" "you" ("bye" a 23 4)) tempx)))
(and user-result (if (eq t user-result) good-value T))
))
(do-test "Delete previous & done: select a number"
(let* ((user-result (do-test-menu-Message window-list 'low
" Testing: select a number
Assuming SEdit is editing tempx which currently equals (2 34 cd ef \"how\" \"are\" \"you\" (\"bye\" a 23 4))
Select the number \"2\" as a structure, with the structure caret to the right of the number.
Type control-W, and a control-X.
Were you able to get this far?"))
(good-value (equal '(34 cd ef "how" "are" "you" ("bye" a 23 4)) tempx)))
(and user-result (if (eq t user-result) good-value T))
))
(do-test "Delete previous & done: select a list"
(let* ((user-result (do-test-menu-Message window-list 'low
" Testing: select a list
Assuming SEdit is editing tempx which currently equals (34 cd ef \"how\" \"are\" \"you\" (\"bye\" a 23 4))
Select the list (\"bye\" a 23 4) as a structure, with the structure caret to the right of the list.
Type control-W, and a control-X.
Were you able to get this far?"))
(good-value (equal '(34 cd ef "how" "are" "you") tempx)))
(and user-result (if (eq t user-result) good-value T))
))
(do-test "Delete previous & done: select part of a litatom"
(let* ((user-result (do-test-menu-Message window-list 'low
" Testing: select part of a litatom
Assuming SEdit is editing tempx which currently equals (34 cd ef \"hi\" \"how\" \"are\" \"you\")
<EFBFBD><EFBFBD>Place the edit caret in the middle of the litatom \"cd\".<2E>
Type control-W, and a control-X.
Were you able to get this far?"))
(good-value (equal '(34 d ef "how" "are" "you") tempx)))
(and user-result (if (eq t user-result) good-value T))
))
(do-test "Delete previous & done: select part of a string"
(let* ((user-result (do-test-menu-Message window-list 'low
" Testing: select part of a string
Assuming SEdit is editing tempx which currently equals (2 3 d ef \"how\" \"are\" \"you\")
<EFBFBD><EFBFBD>Place the edit caret <20>after the \"h\" in the string \"how\"<22><>.<2E>
Type control-W, and a control-X.
Were you able to get this far?"))
(good-value (equal '(34 d ef "ow" "are" "you") tempx)))
(and user-result (if (eq t user-result) good-value T))
))
(do-test "Delete previous & done: select part of a number"
(let* ((user-result (do-test-menu-Message window-list 'low
" Testing: select part of a number
Assuming SEdit is editing tempx which currently equals (34 d ef \"ow\" \"are\" \"you\")
<EFBFBD><EFBFBD>Place the edit caret in the middle of the <20>number<65><72> \"<22>34<33><34>\".<2E>
Type control-W, and a control-X.
Were you able to get this far?"))
(good-value (equal '(4 d ef "ow" "are" "you") tempx)))
(and user-result (if (eq t user-result) good-value T))
))
(do-test "Delete previous & done: delete a litatom after a delete"
(let* ((user-result (do-test-menu-Message window-list 'low
" Testing: delete a litatom after a delete
Assuming SEdit is editing tempx which currently equals (4 d ef \"ow\" \"are\" \"you\")
Place the structure caret after the string \"ow\" with no selection.
Type control-W, control-W, and a control-X.
Were you able to get this far?"))
(good-value (equal '(4 d "are" "you") tempx)))
(and user-result (if (eq t user-result) good-value T))
))
(do-test "Delete previous & done: delete a string after a delete"
(let* ((user-result (do-test-menu-Message window-list 'low
" Testing: delete a string
Assuming SEdit is editing tempx which currently equals (4 d \"are\" \"you\")
Place the structure caret after the string \"you\" with selection of the string.
Type control-W, control-W, and a control-X.
Were you able to get this far?"))
(good-value (equal '(4 d) tempx)))
(and user-result (if (eq t user-result) good-value T))
))
(do-test "Delete previous & done: delete of a number after a delete"
(let* ((user-result (do-test-menu-Message window-list 'low
" Testing: delete a number after a delete
Assuming SEdit is editing tempx which currently equals (4 d)
Place the edit caret after the litatom \"d\" with no selection.
Type control-W, control-W, and a control-X.
Were you able to get this far?"))
(good-value (equal nil tempx)))
(and user-result (if (eq t user-result) good-value T))
))
) ; end of do-test-group
STOP
?1(DEFAULTFONT 1 (GACHA 10) (GACHA 8) (TERMINAL 8))
*6u<01>-'<01>W  <06>5<>
z<EFBFBD>