1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162
|
# $XConsortium: TextField4.scr /main/5 1995/07/17 20:43:03 drk $
#
# Motif
#
# Copyright (c) 1987-2012, The Open Group. All rights reserved.
#
# These libraries and programs are free software; you can
# redistribute them and/or modify them under the terms of the GNU
# Lesser General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option)
# any later version.
#
# These libraries and programs are distributed in the hope that
# they will be useful, but WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU Lesser General Public License for more
# details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with these librararies and programs; if not, write
# to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
# Floor, Boston, MA 02110-1301 USA
#
#
# HISTORY
#
# @) The client window should have two TextField widgets and
# one Text widget.
# The first TextField has XmNresizeWidth set to False. The second has
# it set to True. The Text widget also has it set to True.
# /* test case for PIR 2914 */
# #) Type "all the king's horses and all the king's men" into the first
# TextField widget. For each character typed that exceeds the width
# of the TextField, the text should shift to the left one character
# to keep the newly typed character in view.
LocatePointer TextF1
ClickMB Btn1
InputString "all the king's horses and all the king's men"
CompareVisual TextF1
# #) Type the same string into the second TextField widget. The behavior should
# be identical. In particular, the text should not jump more than one
# character at a time to the left as the new text in entered on the right.
LocatePointer TextF2
ClickMB Btn1
InputString "all the king's horses and all the king's men"
CompareVisual TextF2
# #) Type the same string again into the third Text widget. The behavior should
# also be identical.
# /* end of test case for PIR 2914 */
LocatePointer Text1
ClickMB Btn1
InputString "all the king's horses and all the king's men"
CompareVisual Text1
# C)
Continue
# #) Resize the shell window to the right by about an inch to give
# the two text fields space
# to grow.
WindowResize Shell1 East 320
# #) Click MB1 after the last character in the first TextField widget.
LocatePointer TextF1
ClickMB Btn1
ClickKey KEndData
# #) Type "couldn't put humpty". The widget should not change size, and
# the text should scroll as it did before.
InputString "couldn't put humpty"
CompareVisual TextF1
# #) Click MB1 at the end of the second TextField widget and type the same
# string there.
LocatePointer TextF2
ClickMB Btn1
ClickKey KEndData
InputString "couldn't put humpty"
# @) This widget should grow to accomodate the new characters until its
# size reaches the new size of the shell window. At that point, the text
# should scroll as more new characters are entered.
CompareVisual TextF2
# #) Click MB1 at the end of the third Text widget. Confirm that is
# behaves the same as the second TextField widget did.
LocatePointer Text1
ClickMB Btn1
ClickKey KEndData
InputString "couldn't put humpty"
CompareVisual Text1
# C)
Continue
# /* test case for PIR 2898 */
# #) Click MB1 at the end of the string in the second TextField widget.
LocatePointer TextF2
ClickMB Btn1
ClickKey KEndData
# #) Type osfBackspaces until the string is slightly shorter than the
# width of the first TextField widget.
# Confirm that one character at a time is
# deleted and the window shrinks by one character each time.
ClickKey KBackSpace
ClickKey KBackSpace
ClickKey KBackSpace
ClickKey KBackSpace
ClickKey KBackSpace
ClickKey KBackSpace
ClickKey KBackSpace
ClickKey KBackSpace
ClickKey KBackSpace
ClickKey KBackSpace
ClickKey KBackSpace
ClickKey KBackSpace
ClickKey KBackSpace
ClickKey KBackSpace
ClickKey KBackSpace
ClickKey KBackSpace
ClickKey KBackSpace
ClickKey KBackSpace
ClickKey KBackSpace
ClickKey KBackSpace
CompareVisual TextF2
# #) Click MB1 at the end of the string in the Text widget and type
# the same number of osfBackspaces.
LocatePointer Text1
ClickMB Btn1
ClickKey KEndData
ClickKey KBackSpace
ClickKey KBackSpace
ClickKey KBackSpace
ClickKey KBackSpace
ClickKey KBackSpace
ClickKey KBackSpace
ClickKey KBackSpace
ClickKey KBackSpace
ClickKey KBackSpace
ClickKey KBackSpace
ClickKey KBackSpace
ClickKey KBackSpace
ClickKey KBackSpace
ClickKey KBackSpace
ClickKey KBackSpace
ClickKey KBackSpace
ClickKey KBackSpace
ClickKey KBackSpace
ClickKey KBackSpace
ClickKey KBackSpace
# #) Confirm that this widget behaves the same as the TextField widget did.
# /* end of test case for PIR 2898 */
CompareVisual Text1
# E)
Exit
|