1
0
mirror of synced 2026-01-31 22:22:05 +00:00
Files
Interlisp.medley/internal/test/env/DEdit/high-level.u

255 lines
9.0 KiB
Plaintext

;; Being tested: DEdit
;;
;; Source:
;;
;; Created By: Henry Cate III
;;
;; Creation Date: March 2, 1987
;;
;; Last Update:
;;
;; Filed As: {eris}<lispcore>test>DEdit>high-level.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 "Just touch various commands"
:before (progn
(setq window-list (do-test-menu-Setup "Various commands in DEdit")))
:after (progn
(do-test-menu-Cleanup window-list))
(do-test "Test able to bring up SEdit"
(let* ((user-result (do-test-menu-Message window-list 'high
" Test able to bring up SEdit
If there is no free Interlisp exec, bring up a another one.
In the Interlisp exec type:
(FILESLOAD dedit)
(EDITMODE 'DEDIT)
(SETQ tempx '(1 4.5 6/7 a cd efg \"hello\" \"BYE\" (bye) (\"hi\" (b) cd 4)))
(ED 'tempx)
Click on the last option in the DEdit menu, \"Exit\"
Were you able to get this far? "))
(good-value (EQUAL '(1 4.5 6/7 il:\a il:|cd| il:|efg| "hello" "BYE" (il:|bye|) ("hi" (il:\b) il:|cd| 4)) (il:eval 'il:|tempx|))))
(and user-result (if (eq t user-result) good-value T))
))
(do-test "Now try placing something after"
(let* ((user-result (do-test-menu-Message window-list 'high
" Now try placing something after
Assuming DEdit just finished editing the variable tempx which currently equals:
(1 4.5 6/7 a cd efg \"hello\" \"BYE\" (bye) (\"hi\" (b) cd 4))
In an Interlisp exec type: \"(ED 'tempx)\"
Click twice on the litatom \"efg\".
Type \"h\" and press the carriage return.
Select the first option on the DEdit menu, \"After\"
Select the last option on the DEdit menu, \"Exit\"
Were you able to get this far? "))
(good-value (EQUAL '(1 4.5 6/7 il:\a il:|cd| il:|efg| il:\h "hello" "BYE" (il:|bye|) ("hi" (il:\b) il:|cd| 4)) (il:eval 'il:|tempx|))))
(and user-result (if (eq t user-result) good-value T))
))
(do-test "Try placing something before"
(let* ((user-result (do-test-menu-Message window-list 'high
" Try placing something before
Assuming DEdit just finished editing the variable tempx which currently equals:
(1 4.5 6/7 a cd efg h \"hello\" \"BYE\" (bye) (\"hi\" (b) cd 4))
In an Interlisp exec type: \"(ED 'tempx)\"
Click twice with the left mouse button on the litatom \"bye\".
Type \"Good\" and press the carriage return.
Select the option on the DEdit menu, \"Before\"
Select the last option on the DEdit menu, \"Exit\"
Were you able to get this far? "))
(good-value (EQUAL '(1 4.5 6/7 il:\a il:|cd| il:|efg| il:\h "hello" "BYE" (il:|Good| il:|bye|) ("hi" (il:\b) il:|cd| 4)) (il:eval 'il:|tempx|))))
(and user-result (if (eq t user-result) good-value T))
))
(do-test "Try deleting"
(let* ((user-result (do-test-menu-Message window-list 'high
" Try deleting
Assuming DEdit just finished editing the variable tempx which currently equals:
(1 4.5 6/7 a cd efg h \"hello\" \"BYE\" (Good bye) \"hi\" (b) cd 4))
In an Interlisp exec type: \"(ED 'tempx)\"
Click twice with the left mouse button on the litatom \"Good\".
Select the option on the DEdit menu, \"Delete\"
Select the last option on the DEdit menu, \"Exit\"
Were you able to get this far? "))
(good-value (EQUAL '(1 4.5 6/7 il:\a il:|cd| il:|efg| il:\h "hello" "BYE" (il:|bye|) ("hi" (il:\b) il:|cd| 4)) (il:eval 'il:|tempx|))))
(and user-result (if (eq t user-result) good-value T))
))
(do-test "Try from XCL-text"
(let* ((user-result (do-test-menu-Message window-list 'high
" Try from XCL-text
Close the old DEdit window.
If there is no free Xerox Common Lisp exec, bring up a another one.
In the Xerox Common Lisp exec type:
(cl:in-package 'xcl-test)
(SETQ tempx '(1 4.5 6/7 a cd efg \"hello\" \"BYE\" (bye) (\"hi\" (b) cd 4)))
(ED 'tempx)
Click on the last option in the DEdit menu, \"Exit\"
Were you able to get this far? "))
(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 "Test replace"
(let* ((user-result (do-test-menu-Message window-list 'high
" Test replace
Assuming DEdit just finished editing the variable tempx which currently equals:
(1 4.5 6/7 a cd efg \"hello\" \"BYE\" (bye) (\"hi\" (b) cd 4))
In the XCL-test exec type: \"(ED 'tempx)\"
Click twice with the left mouse button on the litatom \"efg\".
Type \"gfe\" and press the carriage return.
Select the option on the DEdit menu, \"Replace\"
Select the last option on the DEdit menu, \"Exit\"
Were you able to get this far? "))
(good-value (equal '(1 4.5 6/7 a cd gfe "hello" "BYE" (bye) ("hi" (b) cd 4)) tempx)))
(and user-result (if (eq t user-result) good-value T))
))
(do-test "Test switch"
(let* ((user-result (do-test-menu-Message window-list 'high
" Test switch
Assuming DEdit just finished editing the variable tempx which currently equals:
(1 4.5 6/7 a cd gfe \"hello\" \"BYE\" (bye) (\"hi\" (b) cd 4))
In the XCL-test exec type: \"(ED 'tempx)\"
First click the litatom \"efg\" with the left mouse button.
Then click on the number \"4.5\".
Select the option on the DEdit menu, \"Switch\"
Select the last option on the DEdit menu, \"Exit\"
Were you able to get this far? "))
(good-value (equal '(1 gfe 6/7 a cd 4.5 "hello" "BYE" (bye) ("hi" (b) cd 4)) tempx)))
(and user-result (if (eq t user-result) good-value T))
))
(do-test "Try with dv."
(let* ((user-result (do-test-menu-Message window-list 'high
" Try with dv.
Close the old DEdit window.
In the Xerox Common Lisp exec type:
(SETQ tempx '(1 4.5 6/7 a cd efg \"hello\" \"BYE\" (bye) (\"hi\" (b) cd 4)))
(il:dv tempx)
Click on the last option in the DEdit menu, \"Exit\"
Were you able to get this far? "))
(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 "parenthesize"
(let* ((user-result (do-test-menu-Message window-list 'high
" parenthesize
Assuming DEdit just finished editing the variable tempx which currently equals:
(1 4.5 6/7 a cd efg \"hello\" \"BYE\" (bye) (\"hi\" (b) cd 4))
In the XCL-test exec type: \"(il:dv 'tempx)\"
Click twice with the left mouse button on the string \"hello\".
Select the option on the DEdit menu, \"()\"
Select the last option on the DEdit menu, \"Exit\"
Were you able to get this far? "))
(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 "Un parenthesize"
(let* ((user-result (do-test-menu-Message window-list 'high
" Un parenthesize
Assuming DEdit just finished editing the variable tempx which currently equals:
(1 4.5 6/7 a cd efg (\"hello\") \"BYE\" (bye) (\"hi\" (b) cd 4))
In the XCL-test exec type: \"(il:dv 'tempx)\"
First click the list \"(b)\" with the left mouse button on the \"(\".
Select the option on the DEdit menu, \"() out\"
Select the last option on the DEdit menu, \"Exit\"
Were you able to get this far? "))
(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 "Now try editing a function"
(do-test-menu-Message window-list 'high
" Now try editing a function
Close the old DEdit window.
In the Xerox Common Lisp exec type:
(defun temp-silly-bottom-fun (a b c) (list a b c))
(defun temp-silly-fun (a b c) (temp-silly-bottom-fun a b c))
(ED 'temp-silly-fun)
Were you able to get this far? "))
(do-test "See if find works."
(do-test-menu-Message window-list 'high
" See if find works.
Assuming DEdit is editing the function temp-silly-fun
Click twice on the first occurance of the litatom \"b\"
Select the option on the DEdit menu, \"Find\"
Did DEdit find the second occurance of the litatom \"b\"? "))
(do-test "Test swap"
(do-test-menu-Message window-list 'high
" Test swap
Assuming DEdit is editing the function temp-silly-fun
First click with the left mouse button on the first occurance of the litatom \"b\"
Then click on the second occurance of the litatom \"c\"
Select the option on the DEdit menu, \"Swap\"
Did the solid underline and dotted underline switch places? "))
(do-test "Test reprint"
(do-test-menu-Message window-list 'high
" Test reprint
Assuming DEdit is editing the function temp-silly-fun
Select the entire function by clicking on the first \"(\" with the left mouse button.
Watch carefully,
Select the option on the DEdit menu, \"Reprint\"
Does the function get reprinted? (Do the underlines get reprinted?) "))
(do-test "Test editing of other functions"
(do-test-menu-Message window-list 'high
" Test editing of other functions
Assuming DEdit is editing the function temp-silly-fun
Click with the left mouse button on the function call to \"temp-silly-bottom-fun\"
Select the option on the DEdit menu, \"Edit\"
Does the second function come up in DEdit? "))
(do-test "Clean up"
(do-test-menu-message window-list 'high
"Close the DEdit window by selecting Exit from both option window menus as they appear."))
) ; end of do-test-group
STOP