1
0
mirror of synced 2026-01-20 18:17:21 +00:00
2020-12-16 18:21:28 -08:00

276 lines
9.4 KiB
Plaintext

;; Being tested: TTYIN
;;
;; Source:
;;
;; Created By: Henry Cate III
;;
;; Creation Date: March 4, 1987
;;
;; Last Update:
;;
;; Filed As: {eris}<lispcore>test>Keyboard>TTYIN.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 "Testing TTYIN"
:before (progn
(setq window-list (do-test-menu-Setup "TTYIN")))
:after (progn
(do-test-menu-Cleanup window-list))
(do-test "Test TTYIN in the Interlisp exec"
(let* ((user-result1 (do-test-menu-Message window-list 'high
" Test TTYIN in the Interlisp exec
If there is no free Interlisp exec, bring up a another one.
Put the cursor in it.
Indicate success when you get this far. "))
(command-string "(SETQ TEMPX '(ABCDEFGHIJKLM NOPQRSTUVWXYZ 123 456.789 0 \"!@#$&*()\" \",./<>? ;'`:~\"))")
(toss-away (IL:BKSYSBUF command-string))
(user-result2 (do-test-menu-Message window-list 'high
" Able to stuff things into a Interlisp exec
Was \"tempx\" set in the Interlisp exec? "))
(good-value (equal '(il:abcdefghijklm il:nopqrstuvwxyz 123 456.789 0 "!@#$&*()" ",./<>? ;'`:~") il:|TEMPX|)))
(and user-result1 user-result2 (if (eq t user-result2) good-value T))
))
(do-test "Editing, delete, add in, in Interlisp exec"
(let* ((user-result (do-test-menu-Message window-list 'high
" Editing, delete, add in, in Interlisp exec
Assumping just set TEMPX to:
(ABCDEFGHIJKLM NOPQRSTUVWXYZ 123 456.789 0 \"!@#$&*()\" \",./<>? ;'`:~\")
In the Interlisp exec type: \"fix\"
Delete the number \"123\" by clicking with the left button before it, and then the right button after it.
Now type in \" 321 \"
Type control-x.
Were you able to get this far? "))
(good-value (equal '(il:abcdefghijklm il:nopqrstuvwxyz 321 456.789 0 "!@#$&*()" ",./<>? ;'`:~") il:|TEMPX|)))
(and user-result (if (eq t user-result) good-value T))
))
(do-test "Editing, delete previous word, in Interlisp exec"
(let* ((user-result (do-test-menu-Message window-list 'high
" Editing, delete previous word, in Interlisp exec
Assumping just set TEMPX to:
(ABCDEFGHIJKLM NOPQRSTUVWXYZ 321 456.789 0 \"!@#$&*()\" \",./<>? ;'`:~\")
In the Interlisp exec type: \"fix\"
Place the caret right after the number \"0\".
Type control-w.
Type control-x.
Were you able to get this far? "))
(good-value (equal '(il:abcdefghijklm il:nopqrstuvwxyz 321 456.789 "!@#$&*()" ",./<>? ;'`:~") il:|TEMPX|)))
(and user-result (if (eq t user-result) good-value T))
))
(do-test "Test TTYIN refresh in Interlisp exec"
(do-test-menu-Message window-list 'high
" Test TTYIN refresh in Interlisp exec
Assumping just set TEMPX to:
(ABCDEFGHIJKLM NOPQRSTUVWXYZ 321 456.789 \"!@#$&*()\" \",./<>? ;'`:~\")
In the Interlisp exec type: \"fix\"
Watch carefully
Type control-r.
Type control-x.
Was the screen redisplayed? "))
;;; start of a new section of testings
(do-test "Test TTYIN in the XCL-TEST exec"
(let* ((user-result1 (do-test-menu-Message window-list 'high
" Test TTYIN in the XCL-TEST exec
If there is no free XCL-TEST exec, bring up a another one.
Put the cursor in it.
Indicate success when you get this far. "))
(command-string
"(cl:in-package 'xcl-test)
(SETQ TEMPX '(ABCDEFGHIJKLM NOPQRSTUVWXYZ 123 456.789 0 \"!@#$&*()\" \",./<>? ;'`:~\"))")
(toss-away (IL:BKSYSBUF command-string))
(user-result2 (do-test-menu-Message window-list 'high
" Able to stuff things into a Interlisp exec
Was \"tempx\" set in the Interlisp exec? "))
(good-value (equal '(abcdefghijklm nopqrstuvwxyz 123 456.789 0 "!@#$&*()" ",./<>? ;'`:~") tempx)))
(and user-result1 user-result2 (if (eq t user-result2) good-value T))
))
(do-test "Try editing a statement in the XCL-TEST exec"
(let* ((user-result (do-test-menu-Message window-list 'high
" Try editing a statement in the XCL-TEST exec
Assumping just set TEMPX to:
(ABCDEFGHIJKLM NOPQRSTUVWXYZ 123 456.789 0 \"!@#$&*()\" \",./<>? ;'`:~\")
In the XCL-TEST exec type: \"fix\"
Delete the number \"123\" by clicking with the left button before it, and then the right button after it.
Now type in \" 321 \"
Type control-x.
Were you able to get this far? "))
(good-value (equal '(abcdefghijklm nopqrstuvwxyz 321 456.789 0 "!@#$&*()" ",./<>? ;'`:~") tempx)))
(and user-result (if (eq t user-result) good-value T))
))
(do-test "Test shift select for TTYIN in XCL-TEST exec"
(let* ((user-result (do-test-menu-Message window-list 'high
" Test shift select for TTYIN in XCL-TEST exec
Assumping tempx set to:
(ABCDEFGHIJKLM NOPQRSTUVWXYZ 321 456.789 0 \"!@#$&*()\" \",./<>? ;'`:~\")
In the XCL-TEST exec type: \"fix\"
Place the caret after the number \"0\".
Hold down the shift button.
Select the following: \" 54 \"
Type control-x.
Were you able to get this far? "))
(good-value (equal '(abcdefghijklm nopqrstuvwxyz 321 456.789 0 54 "!@#$&*()" ",./<>? ;'`:~") tempx)))
(and user-result (if (eq t user-result) good-value T))
))
;;; test calling the function "TTYIN"
(do-test "Set up for a simple call to function TTYIN"
(let* ((user-result (do-test-menu-Message window-list 'high
" Set up for a simple call to function TTYIN
Place the cursor in an Interlisp Exec.
Shift select the following into the Interlisp Exec:
\"(SETQ TEMPX (TTYIN \"Please type the number 54. \"))\"
Type in the number \"54\".
Were you able to get this far?"))
(good-value (equal '(54) il:|TEMPX|)))
(and user-result (if (eq t user-result) good-value T))
))
(do-test "Set up for a simple call to function TTYIN"
(let* ((user-result (do-test-menu-Message window-list 'high
" Set up for a simple call to function TTYIN
Place the cursor in an XCL-test Exec.
Shift select the following into the XCL-test Exec:
\"(SETQ TEMPX (il:TTYIN \"Please type the atom \\\"hello\\\". \"))\"
Type in the number \"hello\".
Were you able to get this far?"))
(good-value (equal '(il:hello) TEMPX)))
(and user-result (if (eq t user-result) good-value T))
))
(do-test "Set up for a simple call to function TTYIN"
(let* ((user-result (do-test-menu-Message window-list 'high
" Set up for a simple call to function TTYIN
Place the cursor in an XCL-test Exec.
Shift select the following into the XCL-test Exec:
\"(SETQ TEMPX (il:TTYIN \"Trying for a string. \" nil nil '(IL:NORAISE IL:STRING)))\"
Type: \"Hello\" and a carriage return.
Were you able to get this far?"))
(good-value (equal "Hello" TEMPX)))
(and user-result (if (eq t user-result) good-value T))
))
;;; test calling the function "TTYINEDIT"
(do-test "Set up for a simple call to function TTYINEDIT"
(do-test-menu-Message window-list 'high
" Set up for a simple call to function TTYINEDIT
Place the cursor in an Interlisp Exec.
Shift select the following into the Interlisp Exec:
\"(SETQ TEMPX (TTYINEDIT '(54 67 89) NIL NIL \"Hello: \"))\"
Is a window created with:
\"Hello: 54 67 89\"? "))
(do-test "Modify value from a TTYINEDIT"
(let* ((user-result (do-test-menu-Message window-list 'high
" Modify value from a TTYINEDIT
Place the cursor after the numbers in the new TTYINEDIT window.
Shift-select in: \" 12 34\"
Then type: control-x.
Does the caret go back to the Interlisp window?" ))
(good-value (equal '(54 67 89 12 34) il:|TEMPX|)))
(and user-result (if (eq t user-result) good-value T))
))
(do-test "Set up for a simple call to function TTYINEDIT"
(do-test-menu-Message window-list 'high
" Set up for a simple call to function TTYINEDIT
Close the TTYINEdit window from the previous test.
Place the cursor in an XCL-test Exec.
Shift select the following into the XCL-test Exec:
\"(setq IL:TTYINAUTOCLOSEFLG T)
(setq tempx (il:TTYINEDIT '(54 67 89) (IL:CREATEW) NIL \"Hello: \"))\"
Does the system ask you to:
\"Specify region for window\"
and then fill the region with a window with the following in it:
\"Hello: 54 67 89\"? "))
(do-test "Modify value from a TTYINEDIT"
(let* ((user-result (do-test-menu-Message window-list 'high
" Modify value from a TTYINEDIT
Place the cursor after the numbers in the new TTYINEDIT window.
Position the mouse just before the number \"67\" and click the left button. Then position the mouse just after the number \"67\" and click the right button.
Type a space.
Then type: control-x.
Does the caret go back to the XCL-test exec
and does the TTYINEdit window get closed?" ))
(good-value (equal '(54 89) tempx)))
(and user-result (if (eq t user-result) good-value T))
))
;;; test ?=
(do-test "Testing question mark, equals sign"
(do-test-menu-Message window-list 'high
" Testing question mark, equals sign
Place the cursor in an XCL-test Exec.
Type/shift-select: \"(il:createw \",
a question mark, and a equals sign,
then type a carriage return.
Does the system respond with:
\"(il:createw REGION TITLE BORDERSIZE NOOPENFLG\"? "))
(do-test "Testing question mark, equals sign, part two"
(do-test-menu-Message window-list 'high
" Testing question mark, equals sign, part two
Type: \"nil 'Hello \",
a question mark, and a equals sign
then a carriage return
Does the system respond with:
\"(il:createw
REGION = nil
TITLE = (quote hello)
BORDERSIZE NOOPENFLG\"? "))
(do-test "Clean up on question mark, equals sign test"
(do-test-menu-Message window-list 'high
" Testing question mark, equals sign, part two test
Type: \")\"
Create any region. Close the window.
Were you ableto get this far?"))
) ; end of do-test-group
STOP