;; Being tested: SEdit ;; ;; Source: {ERIS}DOC>SEDIT>SEDIT.TEDIT ;; ;; Created By: Henry Cate III ;; ;; Creation Date: February 12, 1987 ;; ;; Last Update: ;; ;; Filed As: {eris}command-help.u ;; ;; ;; (do-test "load the functions for the prompter for interactive tests" (if (not (fboundp 'do-test-menu-setup)) (load "{ERINYES}TOOLS>DO-TEST-MENU.dfasl")) T) (do-test-group "Arglist" :before (progn (setq window-list (do-test-menu-Setup "Arglist"))) :after (progn (do-test-menu-Cleanup window-list)) (do-test "Arglist: no selection/no caret" (do-test-menu-Message window-list 'high " Testing Arglist If there is no free Xerox Common Lisp exec, bring up one and type: \"(cl:in-package 'xcl-test)\" In the exec type: (setq number 3) (defun temp-double (number) (* 2 number)) (defun temp-add-five (number) (+ 5 number)) (defun temp-call-other (number) (+ (temp-add-five number) (temp-double number))) (defun temp-garbage (start) (concatenate 'string start 23 5 (4 cd \"hi\") \" more\")) (il:df temp-call-other) Select Arglist from the popup menu. Does SEdit display in its prompt window: \"Select function you want the arguments for.\"? ")) (do-test "Make sure the functions got entered in correctly" (and (eq 3 number) (eq 26 (temp-double 13)) (eq 50 (temp-double 25)) (eq 10 (temp-add-five 5)) (eq 28 (temp-add-five 23)) (eq 11 (temp-call-other 2)) (eq 14 (temp-call-other 3)) )) (do-test "Arglist: no selection/edit caret" (do-test-menu-Message window-list 'low " Testing: no selection/edit caret Assuming SEdit is editing the function temp-call-other Want to place the edit caret right after the litatom \"temp-double\" without selecting it. Do this by pressing the left mouse button with the mouse cursor just to the right of \"temp-double\". Type meta-H. Does SEdit display in the SEdit prompt window \"(TEMP-DOUBLE NUMBER)\"? ")) (do-test "Arglist: no selection/structure caret" (do-test-menu-Message window-list 'low " Testing: no selection/structure caret Assuming SEdit is editing the function temp-call-other Want to place the structure caret right between the \"temp-add-five\" and \"number\" without selecting either item. Do this by positioning the mouse cursor between the two items and press the middle button. Type meta-H. Does SEdit display in the SEdit prompt window \"(TEMP-ADD-FIVE NUMBER)\"? ")) (do-test "Arglist: select a litatom" (do-test-menu-Message window-list 'low " Testing: select a litatom Assuming SEdit is editing the function temp-call-other Select the last litatom \"number\" as a structure, by pressing the middle button with the cursor over the litatom. Type meta-H. Does SEdit display in the SEdit prompt window: \"Arguments not available for NUMBER\"? ")) ; The response to this may change when AR 7703 is answered/fixed. (do-test "Arglist: select a string" (do-test-menu-Message window-list 'low " Testing: select a string Assuming SEdit is editing the function temp-call-other Close the SEdit window for temp-call-other In the exec type: \"(il:df temp-garbage)\" Select the string \" more\" as a structure, by pressing the middle button, with the cursor over the string. Type meta-H. Does it display a message of: \"Arguments not available for more\"? ")) (do-test "Arglist: select a number" (do-test-menu-Message window-list 'low " Testing: select a number Assuming SEdit is editing the function temp-garbage. Select the number \"5\" as a structure, by pressing the middle button, with the cursor over the number. Type meta-H. Does SEdit display in the SEdit prompt window: \"Arguments not available for 5\"? ")) (do-test "Arglist: select a list" (do-test-menu-Message window-list 'low " Testing: select a list Assuming SEdit is editing the function temp-garbage. Select the list \"(4 cd \"hi\")\" as a structure, by pressing the middle button, with the cursor over one of the parentheses. Type meta-H. Does SEdit display in the SEdit prompt window: \"Arguments not available for (4 cd hi)\"? ")) (do-test "Arglist: select part of a litatom" (do-test-menu-Message window-list 'low " Testing: select part of a litatom Assuming SEdit is editing the function temp-garbage. Select the \"d\" in the litatom \"cd\". Type meta-H. Does SEdit display in the SEdit prompt window: \"Arguments not available for CD\"?")) (do-test "Arglist: select part of a string" (do-test-menu-Message window-list 'low " Testing: select part of a string Assuming SEdit is editing the function temp-garbage. Select the \"h\" in the string \"hi\". Type meta-H. Does SEdit display in the SEdit prompt window: \"Select function you want the arguments for.\"? ")) (do-test "Arglist: select part of a number" (do-test-menu-Message window-list 'low " Testing: select part of a number Assuming SEdit is editing the function temp-garbage. Select the \"2\" in the number \"23\". Type meta-H. Does SEdit display in the SEdit prompt window: \"Arguments not available for 23\"? ")) (do-test "Arglist: delete a litatom" (do-test-menu-Message window-list 'low " Testing: try after deleting a litatom Assuming SEdit is editing the function temp-garbage. Close the SEdit window for temp-garbage. In the exec type: \"(il:df temp-call-other)\" Place the structure caret after the second litatom \"number\". Type in the litatom \"ab\" Type control-W, meta-H. Does SEdit display in the SEdit prompt window: \"(TEMP-ADD-FIVE NUMBER)\"? ")) (do-test "Arglist: delete a string" (do-test-menu-Message window-list 'low " Testing: try after deleting a string Assuming SEdit is editing the function temp-call-other. Place the structure caret after the third litatom \"number\". Type in the string \"hello\" Type control-W, meta-H. Does SEdit display in the SEdit prompt window: \"(TEMP-DOUBLE NUMBER)\"? ")) (do-test "Arglist: delete a number" (do-test-menu-Message window-list 'low " Testing: try after deleting a number Assuming SEdit is editing the function temp-call-other. Place the structure caret before the third litatom \"number\". Type in the number \"34\" Type control-W, meta-H. Does SEdit display in the SEdit prompt window: \"(TEMP-DOUBLE NUMBER)\"? ")) (do-test "Arglist: delete a list" (do-test-menu-Message window-list 'low " Testing: try after deleting a list Assuming SEdit is editing the function temp-call-other. Place the structure caret before the second litatom \"number\". Type in the list \"(have a \"nice\" day)\" Type control-W, meta-H. Does SEdit display in the SEdit prompt window: \"(TEMP-ADD-FIVE NUMBER)\"? ")) (do-test "Arglist: extended selection of litatoms" (do-test-menu-Message window-list 'low " Testing: try extended selection of litatoms Assuming SEdit is editing the function temp-call-other. Place the edit caret after the second litatom \"number\". Type \" ef gh\". Now select the litatom \"number\" as a structure, and extend the selection to include the next two litatoms. Type meta-H Does SEdit display in the SEdit prompt window: \"Select function you want the arguments for.\"? ")) (do-test "Arglist: extended selection of strings" (do-test-menu-Message window-list 'low " Testing: extended selection of strings Assuming SEdit is editing the function temp-call-other. Place the edit caret after the litatom \"gh\". Type \" 12 3.4 5/6 (hi) (bye) \"string\" \"string2\" (list)\". Now select the first string as a structure, and extend the selection to include the second string. Type meta-H Does SEdit display in the SEdit prompt window: \"Select function you want the arguments for.\"? ")) (do-test "Arglist: extended selection of numbers" (do-test-menu-Message window-list 'low " Testing: extended selection of numbers Assuming SEdit is editing the function temp-call-other. Select the number \"12\" as a structure, and extend the selection to include the next two numbers. Type meta-H Does SEdit display in the SEdit prompt window: \"Select function you want the arguments for.\"? ")) (do-test "Arglist: extended selection of lists" (do-test-menu-Message window-list 'low " Testing: extended selection of lists Assuming SEdit is editing the function temp-call-other. Select the list \"(hi)\" as a structure, and extend the selection to include the next list. Type meta-H. Does SEdit display in the SEdit prompt window: \"Select function you want the arguments for.\"? ")) (do-test "Arglist: 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 function temp-call-other. Select the litatoms \"ef\" as a structure, and extend the selection to include the next four items. Type meta-H. Does SEdit display in the SEdit prompt window: \"Select function you want the arguments for.\"? ")) (do-test "Arglist: 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 function temp-call-other. Select the litatom \"hi\" as a structure, and extend the selection to include the next four items. Type meta-H. Does SEdit display in the SEdit prompt window: \"Select function you want the arguments for.\"? ")) (do-test "Arglist: extended selection of several things" (do-test-menu-Message window-list 'low " Testing: extended selection of several things Assuming SEdit is editing the function temp-call-other. Select the litatom \"ef\" as a structure, and extend the selection to include the rest. Type meta-H. Does SEdit display in the SEdit prompt window: \"Select function you want the arguments for.\"? Type meta-H a couple times if neccesary to see.")) (do-test "Arglist: selection of entire structure" (do-test-menu-Message window-list 'low " Testing: selection of entire structure Assuming SEdit is editing the function temp-call-other. Select the entire structure. Type meta-H. Does SEdit display in the SEdit prompt window: \"Arguments not available for (DEFUN TEMP-CALL-OTHER (NUMBER) (+ (TEMP-ADD-FIVE NUMBER EF GH 12 3.4 5/6 (HI) (BYE) \"string\" \"string2\" (list)) (TEMP-DOUBLE NUMBER)))\"? ")) (do-test "Clean up" (do-test-menu-message window-list 'high "Close the SEdit window by selecting Close from the popup menu.")) ) ; end of do-test-group STOP