1 AT_BANNER([command name matching])
3 AT_SETUP([single words])
4 AT_KEYWORDS([command name matching])
5 AT_CHECK([command-name-test DESCRIPTIVES , DESCRIPTIVESX DESCRIPTIVES descr Des DEX DE '' 'DESCRIPTIVES MORE' 'DESCRIPTIVES@<00A0>@MORE'],
7 string="DESCRIPTIVESX":
8 command="DESCRIPTIVES" match=no
9 match: none, missing_words=0
11 string="DESCRIPTIVES":
12 command="DESCRIPTIVES" match=yes exact=yes missing_words=0
13 match: DESCRIPTIVES, missing_words=0
16 command="DESCRIPTIVES" match=yes exact=no missing_words=0
17 match: DESCRIPTIVES, missing_words=0
20 command="DESCRIPTIVES" match=yes exact=no missing_words=0
21 match: DESCRIPTIVES, missing_words=0
24 command="DESCRIPTIVES" match=no
25 match: none, missing_words=0
28 command="DESCRIPTIVES" match=no
29 match: none, missing_words=0
32 command="DESCRIPTIVES" match=yes exact=yes missing_words=1
33 match: none, missing_words=1
35 string="DESCRIPTIVES MORE":
36 command="DESCRIPTIVES" match=yes exact=yes missing_words=-1
37 match: DESCRIPTIVES, missing_words=-1
39 string="DESCRIPTIVES@<00A0>@MORE":
40 command="DESCRIPTIVES" match=yes exact=yes missing_words=-1
41 match: DESCRIPTIVES, missing_words=-1
45 AT_SETUP([two words without prefix match])
46 AT_KEYWORDS([command name matching])
47 AT_CHECK([command-name-test 'DO IF' 'DO REPEAT' , 'DO@<00A0>@IF' 'DO REPEAT' 'DO REP' 'DO OTHER' 'D IF' 'DO I' DO],
49 string="DO@<00A0>@IF":
50 command="DO IF" match=yes exact=yes missing_words=0
51 command="DO REPEAT" match=no
52 match: DO IF, missing_words=0
55 command="DO IF" match=no
56 command="DO REPEAT" match=yes exact=yes missing_words=0
57 match: DO REPEAT, missing_words=0
60 command="DO IF" match=no
61 command="DO REPEAT" match=yes exact=no missing_words=0
62 match: DO REPEAT, missing_words=0
65 command="DO IF" match=no
66 command="DO REPEAT" match=no
67 match: none, missing_words=0
70 command="DO IF" match=no
71 command="DO REPEAT" match=no
72 match: none, missing_words=0
75 command="DO IF" match=no
76 command="DO REPEAT" match=no
77 match: none, missing_words=0
80 command="DO IF" match=yes exact=yes missing_words=1
81 command="DO REPEAT" match=yes exact=yes missing_words=1
82 match: none, missing_words=1
86 AT_SETUP([two words with prefix match])
87 AT_KEYWORDS([command name matching])
88 AT_CHECK([command-name-test GET 'GET DATA' , GET 'GET TYPE' 'GET DAT' 'GET DATA'],
91 command="GET" match=yes exact=yes missing_words=0
92 command="GET DATA" match=yes exact=yes missing_words=1
93 match: none, missing_words=1
96 command="GET" match=yes exact=yes missing_words=-1
97 command="GET DATA" match=no
98 match: GET, missing_words=-1
101 command="GET" match=yes exact=yes missing_words=-1
102 command="GET DATA" match=yes exact=no missing_words=0
103 match: GET DATA, missing_words=0
106 command="GET" match=yes exact=yes missing_words=-1
107 command="GET DATA" match=yes exact=yes missing_words=0
108 match: GET DATA, missing_words=0
112 AT_SETUP([ambiguous single-word names])
113 AT_KEYWORDS([command name matching])
114 AT_CHECK([command-name-test CASEPLOT CASESTOVARS , CAS Case CaseP CaseS], [0],
117 command="CASEPLOT" match=yes exact=no missing_words=0
118 command="CASESTOVARS" match=yes exact=no missing_words=0
119 match: none, missing_words=0
122 command="CASEPLOT" match=yes exact=no missing_words=0
123 command="CASESTOVARS" match=yes exact=no missing_words=0
124 match: none, missing_words=0
127 command="CASEPLOT" match=yes exact=no missing_words=0
128 command="CASESTOVARS" match=no
129 match: CASEPLOT, missing_words=0
132 command="CASEPLOT" match=no
133 command="CASESTOVARS" match=yes exact=no missing_words=0
134 match: CASESTOVARS, missing_words=0
138 AT_SETUP([ambiguous two-word names])
139 AT_KEYWORDS([command name matching])
140 AT_CHECK([command-name-test VARCOMP VARSTOCASES 'VARIABLE ATTRIBUTE' , VAR VARC VARS VARI 'VAR@<00A0>@ATT'],
143 command="VARCOMP" match=yes exact=no missing_words=0
144 command="VARSTOCASES" match=yes exact=no missing_words=0
145 command="VARIABLE ATTRIBUTE" match=yes exact=no missing_words=1
146 match: none, missing_words=1
149 command="VARCOMP" match=yes exact=no missing_words=0
150 command="VARSTOCASES" match=no
151 command="VARIABLE ATTRIBUTE" match=no
152 match: VARCOMP, missing_words=0
155 command="VARCOMP" match=no
156 command="VARSTOCASES" match=yes exact=no missing_words=0
157 command="VARIABLE ATTRIBUTE" match=no
158 match: VARSTOCASES, missing_words=0
161 command="VARCOMP" match=no
162 command="VARSTOCASES" match=no
163 command="VARIABLE ATTRIBUTE" match=yes exact=no missing_words=1
164 match: none, missing_words=1
166 string="VAR@<00A0>@ATT":
167 command="VARCOMP" match=yes exact=no missing_words=-1
168 command="VARSTOCASES" match=yes exact=no missing_words=-1
169 command="VARIABLE ATTRIBUTE" match=yes exact=no missing_words=0
170 match: VARIABLE ATTRIBUTE, missing_words=0
174 AT_SETUP([numbers and punctuation])
175 AT_KEYWORDS([command name matching])
176 AT_CHECK([command-name-test T-TEST 2SLS LIST , T-TEST 'T - Test' 2SLS '2 SLS' List],
179 command="T-TEST" match=yes exact=yes missing_words=0
180 command="2SLS" match=no
181 command="LIST" match=no
182 match: T-TEST, missing_words=0
185 command="T-TEST" match=yes exact=yes missing_words=0
186 command="2SLS" match=no
187 command="LIST" match=no
188 match: T-TEST, missing_words=0
191 command="T-TEST" match=no
192 command="2SLS" match=yes exact=yes missing_words=0
193 command="LIST" match=no
194 match: 2SLS, missing_words=0
197 command="T-TEST" match=no
198 command="2SLS" match=yes exact=yes missing_words=0
199 command="LIST" match=no
200 match: 2SLS, missing_words=0
203 command="T-TEST" match=no
204 command="2SLS" match=no
205 command="LIST" match=yes exact=yes missing_words=0
206 match: LIST, missing_words=0
210 AT_SETUP([off by more than one word])
211 AT_KEYWORDS([command name matching])
212 AT_CHECK([command-name-test 'a@<00A0>@b c' , a 'a b' 'a b c' 'a@<00A0>@b c d' 'a b c@<00A0>@d e'],
215 command="a@<00A0>@b c" match=yes exact=yes missing_words=2
216 match: none, missing_words=1
219 command="a@<00A0>@b c" match=yes exact=yes missing_words=1
220 match: none, missing_words=1
223 command="a@<00A0>@b c" match=yes exact=yes missing_words=0
224 match: a@<00A0>@b c, missing_words=0
226 string="a@<00A0>@b c d":
227 command="a@<00A0>@b c" match=yes exact=yes missing_words=-1
228 match: a@<00A0>@b c, missing_words=-1
230 string="a b c@<00A0>@d e":
231 command="a@<00A0>@b c" match=yes exact=yes missing_words=-2
232 match: a@<00A0>@b c, missing_words=-2