1
0
mirror of synced 2026-01-17 09:03:14 +00:00

385 lines
15 KiB
Plaintext

;; Being tested: SEdit
;;
;; Source: {ERIS}<LispCore>DOC>SEDIT>SEDIT.TEDIT
;;
;; Created By: Henry Cate III
;;
;; Creation Date: February 10, 1987
;;
;; Last Update:
;;
;; Filed As: {eris}<lispcore>test>SEdit>Command-abort.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 "Abort"
:before (progn
(setq window-list (do-test-menu-Setup "Abort")))
:after (progn
(do-test-menu-Cleanup window-list))
(do-test "Abort: 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 23 a cd \"hello\" \"there\" (\"hi\" b 4)))
(il:dv tempx)
Select ABORT from the popup menu. Until told differently always click yes to abort.
Were you able to get this far?"))
(good-value (equal '(1 23 a cd "hello" "there" ("hi" b 4)) tempx)))
(and user-result (if (eq t user-result) good-value T))
))
(do-test "Abort: no selection/edit caret"
(let* ((user-result (do-test-menu-Message window-list 'low
"Assumping tempx currently equals (1 23 a cd \"hello\" \"there\" (\"hi\" b 4))
Testing: no selection/edit caret
In the exec type: \"(il:dv tempx)\"
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 \" 45 67\", then meta-A.
Were you able to get this far?"))
(good-value (equal '(1 23 a cd "hello" "there" ("hi" b 4)) tempx)))
(and user-result (if (eq t user-result) good-value T))
))
(do-test "Abort: no selection/structure caret"
(let* ((user-result (do-test-menu-Message window-list 'low
"Assumping tempx currently equals (1 23 a cd \"hello\" \"there\" (\"hi\" b 4))
Testing: no selection/structure caret
In the exec type: \"(il:dv tempx)\"
Want to place the structure caret right between \"a\" and \"cd\" without selecting either item. Do this by positioning the mouse cursor between the two items and press the middle button.
Type meta-A.
Were you able to get this far?"))
(good-value (equal '(1 23 a cd "hello" "there" ("hi" b 4)) tempx)))
(and user-result (if (eq t user-result) good-value T))
))
(do-test "Abort: select a litatom"
(let* ((user-result (do-test-menu-Message window-list 'low
"Assumping tempx currently equals (1 23 a cd \"hello\" \"there\" (\"hi\" b 4))
Testing: select a litatom
In the exec type: \"(il:dv tempx)\"
Select the litatom \"cd\" as a structure, by pressing the middle button with the cursor over the litatom.
Type meta-A.
Were you able to get this far?"))
(good-value (equal '(1 23 a cd "hello" "there" ("hi" b 4)) tempx)))
(and user-result (if (eq t user-result) good-value T))
))
(do-test "Abort: select a string"
(let* ((user-result (do-test-menu-Message window-list 'low
"Assumping tempx currently equals (1 23 a cd \"hello\" \"there\" (\"hi\" b 4))
Testing: select a string
In the exec type: \"(il:dv tempx)\"
Select the string \"hello\" as a structure, by pressing the middle button, with the cursor over the string.
Type meta-A.
Were you able to get this far?"))
(good-value (equal '(1 23 a cd "hello" "there" ("hi" b 4)) tempx)))
(and user-result (if (eq t user-result) good-value T))
))
(do-test "Abort: select a number"
(let* ((user-result (do-test-menu-Message window-list 'low
"Assumping tempx currently equals (1 23 a cd \"hello\" \"there\" (\"hi\" b 4))
Testing: select a number
In the exec type: \"(il:dv tempx)\"
Select the number \"1\" as a structure, by pressing the middle button, with the cursor over the number.
Select ABORT from the popup menu.
Were you able to get this far?"))
(good-value (equal '(1 23 a cd "hello" "there" ("hi" b 4)) tempx)))
(and user-result (if (eq t user-result) good-value T))
))
(do-test "Abort: select a list"
(let* ((user-result (do-test-menu-Message window-list 'low
"Assumping tempx currently equals (1 23 a cd \"hello\" \"there\" (\"hi\" b 4))
Testing: select a list
In the exec type: \"(il:dv tempx)\"
Select the list (\"hi\" b 4) as a structure.
Type meta-A.
Were you able to get this far?"))
(good-value (equal '(1 23 a cd "hello" "there" ("hi" b 4)) tempx)))
(and user-result (if (eq t user-result) good-value T))
))
(do-test "Abort: select a comment"
(let* ((user-result (do-test-menu-Message window-list 'low
"Assumping tempx currently equals (1 23 a cd \"hello\" \"there\" (\"hi\" b 4))
Testing: select a comment
In the exec type: \"(il:dv tempx)\"
Place the edit caret after the number 23 and type \"; hello\", then select this as a structure, and type meta-A.
Was the parenthesis around the comment?"))
(good-value (equal '(1 23 a cd "hello" "there" ("hi" b 4)) tempx)))
(and user-result (if (eq t user-result) good-value T))
))
(do-test "Abort: select part of a litatom"
(let* ((user-result (do-test-menu-Message window-list 'low
"Assumping tempx currently equals (1 23 a cd \"hello\" \"there\" (\"hi\" b 4))
Testing: select part of a litatom
In the exec type: \"(il:dv tempx)\"
Select the \"d\" in the litatom \"cd\".
Type meta-A.
Were you able to get this far?"))
(good-value (equal '(1 23 a cd "hello" "there" ("hi" b 4)) tempx)))
(and user-result (if (eq t user-result) good-value T))
))
(do-test "Abort: select part of a string"
(let* ((user-result (do-test-menu-Message window-list 'low
"Assumping tempx currently equals (1 23 a cd \"hello\" \"there\" (\"hi\" b 4))
Testing: select part of a string
In the exec type: \"(il:dv tempx)\"
Select the \"h\" in the string \"hello\" and type meta-A.
Were you able to get this far?"))
(good-value (equal '(1 23 a cd "hello" "there" ("hi" b 4)) tempx)))
(and user-result (if (eq t user-result) good-value T))
))
(do-test "Abort: select part of a number"
(let* ((user-result (do-test-menu-Message window-list 'low
"Assumping tempx currently equals (1 23 a cd \"hello\" \"there\" (\"hi\" b 4))
Testing: select part of a number
In the exec type: \"(il:dv tempx)\"
Select the \"2\" in the number \"23\" and type meta-A.
Were you able to get this far?"))
(good-value (equal '(1 23 a cd "hello" "there" ("hi" b 4)) tempx)))
(and user-result (if (eq t user-result) good-value T))
))
(do-test "Abort: delete a litatom"
(let* ((user-result (do-test-menu-Message window-list 'low
"Assumping tempx currently equals (1 23 a cd \"hello\" \"there\" (\"hi\" b 4))
Testing: try after deleting a litatom
In the exec type: \"(il:dv tempx)\"
Place the edit caret after the litatom \"b\" with in the list.
Type control-W, and meta-A.
Were you able to get this far?"))
(good-value (equal '(1 23 a cd "hello" "there" ("hi" b 4)) tempx)))
(and user-result (if (eq t user-result) good-value T))
))
(do-test "Abort: delete a string"
(let* ((user-result (do-test-menu-Message window-list 'low
"Assumping tempx currently equals (1 23 a cd \"hello\" \"there\" (\"hi\" b 4))
Testing: try after deleting a string
In the exec type: \"(il:dv tempx)\"
Place the structure caret after the string \"hi\" with in the list.
Type control-W and meta-A.
Were you able to get this far?"))
(good-value (equal '(1 23 a cd "hello" "there" ("hi" b 4)) tempx)))
(and user-result (if (eq t user-result) good-value T))
))
(do-test "Abort: delete a number"
(let* ((user-result (do-test-menu-Message window-list 'low
"Assumping tempx currently equals (1 23 a cd \"hello\" \"there\" (\"hi\" b 4))
Testing: try after deleting a number
In the exec type: \"(il:dv tempx)\"
Place the edit caret right after the number \"23\" with no selection.
Type control-W, and meta-A
Were you able to get this far?"))
(good-value (equal '(1 23 a cd "hello" "there" ("hi" b 4)) tempx)))
(and user-result (if (eq t user-result) good-value T))
))
(do-test "Abort: delete a list"
(let* ((user-result (do-test-menu-Message window-list 'low
"Assumping tempx currently equals (1 23 a cd \"hello\" \"there\" (\"hi\" b 4))
Testing: try after deleting a list
In the exec type: \"(il:dv tempx)\"
Pick the list \"(\"hi\" b 4)\" as a structure and press the delete key.
Type meta-A.
Were you able to get this far?"))
(good-value (equal '(1 23 a cd "hello" "there" ("hi" b 4)) tempx)))
(and user-result (if (eq t user-result) good-value T))
))
(do-test "Abort: delete a comment"
(let* ((user-result (do-test-menu-Message window-list 'low
"Assumping tempx currently equals (1 23 a cd \"hello\" \"there\" (\"hi\" b 4))
Testing: try after deleting a comment
In the exec type: \"(il:dv tempx)\"
Place the structure caret after the litatom \"cd\" and type \"; hello\", then select this as a structure with the caret to the right.
Press the delete key and type meta-A.
Were you able to get this far?"))
(good-value (equal '(1 23 a cd "hello" "there" ("hi" b 4)) tempx)))
(and user-result (if (eq t user-result) good-value T))
))
(do-test "Abort: extended selection of litatoms"
(let* ((user-result (do-test-menu-Message window-list 'low
"Assumping tempx currently equals (1 23 a cd \"hello\" \"there\" (\"hi\" b 4))
Testing: try extended selection of litatoms
In the exec type: \"(il:dv tempx)\"
Place the edit caret after the litatom \"cd\".
Type \" ef gh\".
Now select the litatom \"cd\" as a structure, and extend the selection to include the next two litatoms.
Type meta-A.
Were you able to get this far?"))
(good-value (equal '(1 23 a cd "hello" "there" ("hi" b 4)) tempx)))
(and user-result (if (eq t user-result) good-value T))
))
(do-test "Abort: extended selection of strings"
(let* ((user-result (do-test-menu-Message window-list 'low
"Assumping tempx currently equals (1 23 a cd \"hello\" \"there\" (\"hi\" b 4))
Testing: extended selection of strings
In the exec type: \"(il:dv tempx)\"
Select the string \"hello\" as a structure, and extend the selection to include the next string.
Type meta-A.
Were you able to get this far?"))
(good-value (equal '(1 23 a cd "hello" "there" ("hi" b 4)) tempx)))
(and user-result (if (eq t user-result) good-value T))
))
(do-test "Abort: extended selection of numbers"
(let* ((user-result (do-test-menu-Message window-list 'low
"Assumping tempx currently equals (1 23 a cd \"hello\" \"there\" (\"hi\" b 4))
Testing: extended selection of numbers
In the exec type: \"(il:dv tempx)\"
Place the structure caret after the number \"1\".
Type \" 2 3 4\".
Now select the number \"2\" as a structure, and extend the selection to include the next two numbers.
Type meta-M, and pick ABORT from the SEdit Command Menu.
Were you able to get this far?"))
(good-value (equal '(1 23 a cd "hello" "there" ("hi" b 4)) tempx)))
(and user-result (if (eq t user-result) good-value T))
))
(do-test "Abort: extended selection of lists"
(let* ((user-result (do-test-menu-Message window-list 'low
"Assumping tempx currently equals (1 23 a cd \"hello\" \"there\" (\"hi\" b 4))
Testing: extended selection of lists
In the exec type: \"(il:dv tempx)\"
Place the structure caret after the list \"(\"hi\" b 4)\".
Type \"(2)(3)(4)\".
Select the list \"(\"hi\" b 4)\" as a structure, and extend the selection to include the next three lists.
Type meta-M, and pick ABORT from the SEdit Command Menu.
Were you able to get this far?"))
(good-value (equal '(1 23 a cd "hello" "there" ("hi" b 4)) tempx)))
(and user-result (if (eq t user-result) good-value T))
))
(do-test "Abort: extended selection of litatoms and numbers"
(let* ((user-result (do-test-menu-Message window-list 'low
"Assumping tempx currently equals (1 23 a cd \"hello\" \"there\" (\"hi\" b 4))
Testing: extended selection of litatoms and numbers
In the exec type: \"(il:dv tempx)\"
Place the structure caret after the number 23.
Type \"fg 56 hij 9876 sdf\".
Select the number \"1\" as a structure, and extend the selection to include the next nine items.
Type meta-M, and pick ABORT from the SEdit Command Menu.
Were you able to get this far?"))
(good-value (equal '(1 23 a cd "hello" "there" ("hi" b 4)) tempx)))
(and user-result (if (eq t user-result) good-value T))
))
(do-test "Abort: extended selection of strings and lists"
(let* ((user-result (do-test-menu-Message window-list 'low
"Assumping tempx currently equals (1 23 a cd \"hello\" \"there\" (\"hi\" b 4))
Testing: extended selection of strings and lists
In the exec type: \"(il:dv tempx)\"
Place the structure caret after the number \"1\".
Type \" (hi) \"hi\" (bye) \"bye\" (list-string)\"
Select the list \"(hi)\" as a structure, and extend the selection to include the next five items.
Select Abort from the popup menu.
Were you able to get this far?"))
(good-value (equal '(1 23 a cd "hello" "there" ("hi" b 4)) tempx)))
(and user-result (if (eq t user-result) good-value T))
))
(do-test "Abort: extended selection of several things"
(let* ((user-result (do-test-menu-Message window-list 'low
"Assumping tempx currently equals (1 23 a cd \"hello\" \"there\" (\"hi\" b 4))
Testing: extended selection of several things
In the exec type: \"(il:dv tempx)\"
Select the number \"1\" as a structure, and extend the selection to include the next six items.
Select Abort from the popup menu.
Were you able to get this far?"))
(good-value (equal '(1 23 a cd "hello" "there" ("hi" b 4)) tempx)))
(and user-result (if (eq t user-result) good-value T))
))
(do-test "Abort: selection of entire structure"
(let* ((user-result (do-test-menu-Message window-list 'low
"Assumping tempx currently equals (1 23 a cd \"hello\" \"there\" (\"hi\" b 4))
Testing: selection of entire structure
In the exec type: \"(il:dv tempx)\"
Select the entire structure.
Select Abort from the popup menu.
Were you able to get this far?"))
(good-value (equal '(1 23 a cd "hello" "there" ("hi" b 4)) tempx)))
(and user-result (if (eq t user-result) good-value T))
))
;;; Try a couple where don't abort, but save and make sure saved
(do-test "Abort: delete, don't abort, ok?"
(let* ((user-result (do-test-menu-Message window-list 'low
"Assumping tempx equals (1 23 a cd \"hello\" \"there\" (\"hi\" b 4))
Testing: delete, thensaying no to abort
In the exec type: \"(il:dv tempx)\"
Select the number 23 as a structure and press the delete key.
Select Abort from the popup menu, say no, and type control-x
Were you able to get this far?"))
(good-value (equal '(1 a cd "hello" "there" ("hi" b 4)) tempx)))
(and user-result (if (eq t user-result) good-value T))
))
(do-test "Abort: add, don't abort, ok?"
(let* ((user-result (do-test-menu-Message window-list 'low
"Assumping SEdit is currently editing tempx which equals (1 a cd \"hello\" \"there\" (\"hi\" b 4))
Testing: add, then saying no to abort
Place the structure caret after the litatom \"cd\".
Type \"(hi)\"
Type meta-A, say no, and type control-x
Were you able to get this far?"))
(good-value (equal '(1 a cd (hi) "hello" "there" ("hi" b 4)) tempx)))
(and user-result (if (eq t user-result) good-value T))
))
) ; end of do-test-group
STOP