4 * Copyright 2010 Pierre Schweitzer <pierre.schweitzer@reactos.org>
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
16 * You should have received a copy of the GNU Library General Public
17 * License along with this library; see the file COPYING.LIB.
18 * If not, write to the Free Software Foundation,
19 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 /* INCLUDES *******************************************************************/
30 /* PRIVATE FUNCTIONS **********************************************************/
32 VOID
FsRtlIsNameInExpressionTest()
34 UNICODE_STRING Expression
, Name
;
36 RtlInitUnicodeString(&Expression
, L
"*");
37 RtlInitUnicodeString(&Name
, L
"");
38 ok(FsRtlIsNameInExpression(&Expression
, &Name
, FALSE
, NULL
) == FALSE
, "expected FALSE, got TRUE");
39 RtlInitUnicodeString(&Expression
, L
"");
40 ok(FsRtlIsNameInExpression(&Expression
, &Name
, FALSE
, NULL
) == TRUE
, "expected TRUE, got FALSE");
42 RtlInitUnicodeString(&Expression
, L
"ntdll.dll");
43 RtlInitUnicodeString(&Name
, L
".");
44 ok(FsRtlIsNameInExpression(&Expression
, &Name
, FALSE
, NULL
) == FALSE
, "expected FALSE, got TRUE");
45 RtlInitUnicodeString(&Name
, L
"~1");
46 ok(FsRtlIsNameInExpression(&Expression
, &Name
, FALSE
, NULL
) == FALSE
, "expected FALSE, got TRUE");
47 RtlInitUnicodeString(&Name
, L
"..");
48 ok(FsRtlIsNameInExpression(&Expression
, &Name
, FALSE
, NULL
) == FALSE
, "expected FALSE, got TRUE");
49 RtlInitUnicodeString(&Name
, L
"ntdll.dll");
50 ok(FsRtlIsNameInExpression(&Expression
, &Name
, FALSE
, NULL
) == TRUE
, "expected TRUE, got FALSE");
52 RtlInitUnicodeString(&Expression
, L
"smss.exe");
53 RtlInitUnicodeString(&Name
, L
".");
54 ok(FsRtlIsNameInExpression(&Expression
, &Name
, FALSE
, NULL
) == FALSE
, "expected FALSE, got TRUE");
55 RtlInitUnicodeString(&Name
, L
"~1");
56 ok(FsRtlIsNameInExpression(&Expression
, &Name
, FALSE
, NULL
) == FALSE
, "expected FALSE, got TRUE");
57 RtlInitUnicodeString(&Name
, L
"..");
58 ok(FsRtlIsNameInExpression(&Expression
, &Name
, FALSE
, NULL
) == FALSE
, "expected FALSE, got TRUE");
59 RtlInitUnicodeString(&Name
, L
"ntdll.dll");
60 ok(FsRtlIsNameInExpression(&Expression
, &Name
, FALSE
, NULL
) == FALSE
, "expected FALSE, got TRUE");
61 RtlInitUnicodeString(&Name
, L
"NTDLL.dll");
62 ok(FsRtlIsNameInExpression(&Expression
, &Name
, FALSE
, NULL
) == FALSE
, "expected FALSE, got TRUE");
64 RtlInitUnicodeString(&Expression
, L
"nt??krnl.???");
65 RtlInitUnicodeString(&Name
, L
"ntoskrnl.exe");
66 ok(FsRtlIsNameInExpression(&Expression
, &Name
, FALSE
, NULL
) == TRUE
, "expected TRUE, got FALSE");
68 RtlInitUnicodeString(&Expression
, L
"he*o");
69 RtlInitUnicodeString(&Name
, L
"hello");
70 ok(FsRtlIsNameInExpression(&Expression
, &Name
, FALSE
, NULL
) == TRUE
, "expected TRUE, got FALSE");
71 RtlInitUnicodeString(&Name
, L
"helo");
72 ok(FsRtlIsNameInExpression(&Expression
, &Name
, FALSE
, NULL
) == TRUE
, "expected TRUE, got FALSE");
73 RtlInitUnicodeString(&Name
, L
"hella");
74 ok(FsRtlIsNameInExpression(&Expression
, &Name
, FALSE
, NULL
) == FALSE
, "expected FALSE, got TRUE");
76 RtlInitUnicodeString(&Expression
, L
"he*");
77 RtlInitUnicodeString(&Name
, L
"hello");
78 ok(FsRtlIsNameInExpression(&Expression
, &Name
, FALSE
, NULL
) == TRUE
, "expected TRUE, got FALSE");
79 RtlInitUnicodeString(&Name
, L
"helo");
80 ok(FsRtlIsNameInExpression(&Expression
, &Name
, FALSE
, NULL
) == TRUE
, "expected TRUE, got FALSE");
81 RtlInitUnicodeString(&Name
, L
"hella");
82 ok(FsRtlIsNameInExpression(&Expression
, &Name
, FALSE
, NULL
) == TRUE
, "expected TRUE, got FALSE");
84 RtlInitUnicodeString(&Expression
, L
"*.cpl");
85 RtlInitUnicodeString(&Name
, L
"kdcom.dll");
86 ok(FsRtlIsNameInExpression(&Expression
, &Name
, FALSE
, NULL
) == FALSE
, "expected FALSE, got TRUE");
87 RtlInitUnicodeString(&Name
, L
"bootvid.dll");
88 ok(FsRtlIsNameInExpression(&Expression
, &Name
, FALSE
, NULL
) == FALSE
, "expected FALSE, got TRUE");
89 RtlInitUnicodeString(&Name
, L
"ntoskrnl.exe");
90 ok(FsRtlIsNameInExpression(&Expression
, &Name
, FALSE
, NULL
) == FALSE
, "expected FALSE, got TRUE");
92 RtlInitUnicodeString(&Expression
, L
".");
93 RtlInitUnicodeString(&Name
, L
"NTDLL.DLL");
94 ok(FsRtlIsNameInExpression(&Expression
, &Name
, FALSE
, NULL
) == FALSE
, "expected FALSE, got TRUE");
96 RtlInitUnicodeString(&Expression
, L
"F0_*.*");
97 RtlInitUnicodeString(&Name
, L
".");
98 ok(FsRtlIsNameInExpression(&Expression
, &Name
, FALSE
, NULL
) == FALSE
, "expected FALSE, got TRUE");
99 RtlInitUnicodeString(&Name
, L
"..");
100 ok(FsRtlIsNameInExpression(&Expression
, &Name
, FALSE
, NULL
) == FALSE
, "expected FALSE, got TRUE");
101 RtlInitUnicodeString(&Name
, L
"SETUP.EXE");
102 ok(FsRtlIsNameInExpression(&Expression
, &Name
, FALSE
, NULL
) == FALSE
, "expected FALSE, got TRUE");
103 RtlInitUnicodeString(&Name
, L
"F0_001");
104 ok(FsRtlIsNameInExpression(&Expression
, &Name
, FALSE
, NULL
) == FALSE
, "expected FALSE, got TRUE");
106 RtlInitUnicodeString(&Expression
, L
"*.TTF");
107 RtlInitUnicodeString(&Name
, L
".");
108 ok(FsRtlIsNameInExpression(&Expression
, &Name
, FALSE
, NULL
) == FALSE
, "expected FALSE, got TRUE");
109 RtlInitUnicodeString(&Name
, L
"..");
110 ok(FsRtlIsNameInExpression(&Expression
, &Name
, FALSE
, NULL
) == FALSE
, "expected FALSE, got TRUE");
111 RtlInitUnicodeString(&Name
, L
"SETUP.INI");
112 ok(FsRtlIsNameInExpression(&Expression
, &Name
, FALSE
, NULL
) == FALSE
, "expected FALSE, got TRUE");
114 RtlInitUnicodeString(&Expression
, L
"*");
115 RtlInitUnicodeString(&Name
, L
".");
116 ok(FsRtlIsNameInExpression(&Expression
, &Name
, FALSE
, NULL
) == TRUE
, "expected TRUE, got FALSE");
117 RtlInitUnicodeString(&Name
, L
"..");
118 ok(FsRtlIsNameInExpression(&Expression
, &Name
, FALSE
, NULL
) == TRUE
, "expected TRUE, got FALSE");
119 RtlInitUnicodeString(&Name
, L
"SETUP.INI");
120 ok(FsRtlIsNameInExpression(&Expression
, &Name
, FALSE
, NULL
) == TRUE
, "expected TRUE, got FALSE");
122 RtlInitUnicodeString(&Expression
, L
"\"ntoskrnl.exe");
123 RtlInitUnicodeString(&Name
, L
"ntoskrnl.exe");
124 ok(FsRtlIsNameInExpression(&Expression
, &Name
, FALSE
, NULL
) == FALSE
, "expected FALSE, got TRUE");
125 RtlInitUnicodeString(&Expression
, L
"ntoskrnl\"exe");
126 ok(FsRtlIsNameInExpression(&Expression
, &Name
, FALSE
, NULL
) == TRUE
, "expected TRUE, got FALSE");
127 RtlInitUnicodeString(&Expression
, L
"ntoskrn\".exe");
128 ok(FsRtlIsNameInExpression(&Expression
, &Name
, FALSE
, NULL
) == FALSE
, "expected FALSE, got TRUE");
129 RtlInitUnicodeString(&Expression
, L
"ntoskrn\"\"exe");
130 ok(FsRtlIsNameInExpression(&Expression
, &Name
, FALSE
, NULL
) == FALSE
, "expected FALSE, got TRUE");
131 RtlInitUnicodeString(&Expression
, L
"ntoskrnl.\"exe");
132 ok(FsRtlIsNameInExpression(&Expression
, &Name
, FALSE
, NULL
) == FALSE
, "expected FALSE, got TRUE");
133 RtlInitUnicodeString(&Expression
, L
"ntoskrnl.exe\"");
134 RtlInitUnicodeString(&Name
, L
"ntoskrnl.exe");
135 ok(FsRtlIsNameInExpression(&Expression
, &Name
, FALSE
, NULL
) == TRUE
, "expected TRUE, got FALSE");
136 RtlInitUnicodeString(&Name
, L
"ntoskrnl.exe.");
137 ok(FsRtlIsNameInExpression(&Expression
, &Name
, FALSE
, NULL
) == TRUE
, "expected TRUE, got FALSE");
139 RtlInitUnicodeString(&Expression
, L
"*.c.d");
140 RtlInitUnicodeString(&Name
, L
"a.b.c.d");
141 ok(FsRtlIsNameInExpression(&Expression
, &Name
, FALSE
, NULL
) == TRUE
, "expected TRUE, got FALSE");
142 RtlInitUnicodeString(&Expression
, L
"*.?.c.d");
143 ok(FsRtlIsNameInExpression(&Expression
, &Name
, FALSE
, NULL
) == TRUE
, "expected TRUE, got FALSE");
144 RtlInitUnicodeString(&Expression
, L
"*?");
145 RtlInitUnicodeString(&Name
, L
"");
146 ok(FsRtlIsNameInExpression(&Expression
, &Name
, FALSE
, NULL
) == FALSE
, "expected FALSE, got TRUE");
147 RtlInitUnicodeString(&Name
, L
"a");
148 ok(FsRtlIsNameInExpression(&Expression
, &Name
, FALSE
, NULL
) == TRUE
, "expected TRUE, got FALSE");
149 RtlInitUnicodeString(&Name
, L
"aa");
150 ok(FsRtlIsNameInExpression(&Expression
, &Name
, FALSE
, NULL
) == TRUE
, "expected TRUE, got FALSE");
151 RtlInitUnicodeString(&Name
, L
"aaa");
152 ok(FsRtlIsNameInExpression(&Expression
, &Name
, FALSE
, NULL
) == TRUE
, "expected TRUE, got FALSE");
153 RtlInitUnicodeString(&Expression
, L
"?*?");
154 RtlInitUnicodeString(&Name
, L
"");
155 ok(FsRtlIsNameInExpression(&Expression
, &Name
, FALSE
, NULL
) == FALSE
, "expected FALSE, got TRUE");
156 RtlInitUnicodeString(&Name
, L
"a");
157 ok(FsRtlIsNameInExpression(&Expression
, &Name
, FALSE
, NULL
) == FALSE
, "expected FALSE, got TRUE");
158 RtlInitUnicodeString(&Name
, L
"aa");
159 ok(FsRtlIsNameInExpression(&Expression
, &Name
, FALSE
, NULL
) == TRUE
, "expected TRUE, got FALSE");
160 RtlInitUnicodeString(&Name
, L
"aaa");
161 ok(FsRtlIsNameInExpression(&Expression
, &Name
, FALSE
, NULL
) == TRUE
, "expected TRUE, got FALSE");
162 RtlInitUnicodeString(&Name
, L
"aaaa");
163 ok(FsRtlIsNameInExpression(&Expression
, &Name
, FALSE
, NULL
) == TRUE
, "expected TRUE, got FALSE");
165 /* Tests from #5923 */
166 RtlInitUnicodeString(&Expression
, L
"C:\\ReactOS\\**");
167 RtlInitUnicodeString(&Name
, L
"C:\\ReactOS\\dings.bmp");
168 ok(FsRtlIsNameInExpression(&Expression
, &Name
, FALSE
, NULL
) == TRUE
, "expected TRUE, got FALSE");
169 RtlInitUnicodeString(&Expression
, L
"C:\\ReactOS\\***");
170 ok(FsRtlIsNameInExpression(&Expression
, &Name
, FALSE
, NULL
) == TRUE
, "expected TRUE, got FALSE");
171 RtlInitUnicodeString(&Expression
, L
"C:\\Windows\\*a*");
172 ok(FsRtlIsNameInExpression(&Expression
, &Name
, FALSE
, NULL
) == FALSE
, "expected FALSE, got TRUE");
174 RtlInitUnicodeString(&Expression
, L
"C:\\ReactOS\\*.bmp");
175 RtlInitUnicodeString(&Name
, L
"C:\\Windows\\explorer.exe");
176 ok(FsRtlIsNameInExpression(&Expression
, &Name
, FALSE
, NULL
) == FALSE
, "expected FALSE, got TRUE");
177 RtlInitUnicodeString(&Expression
, L
"*.bmp;*.dib");
178 RtlInitUnicodeString(&Name
, L
"winhlp32.exe");
179 ok(FsRtlIsNameInExpression(&Expression
, &Name
, FALSE
, NULL
) == FALSE
, "expected FALSE, got TRUE");
182 VOID
FsRtlIsDbcsInExpressionTest()
184 ANSI_STRING Expression
, Name
;
186 RtlInitAnsiString(&Expression
, "*");
187 RtlInitAnsiString(&Name
, "");
188 ok(FsRtlIsDbcsInExpression(&Expression
, &Name
) == FALSE
, "expected FALSE, got TRUE");
189 RtlInitAnsiString(&Expression
, "");
190 ok(FsRtlIsDbcsInExpression(&Expression
, &Name
) == TRUE
, "expected TRUE, got FALSE");
192 RtlInitAnsiString(&Expression
, "ntdll.dll");
193 RtlInitAnsiString(&Name
, ".");
194 ok(FsRtlIsDbcsInExpression(&Expression
, &Name
) == FALSE
, "expected FALSE, got TRUE");
195 RtlInitAnsiString(&Name
, "~1");
196 ok(FsRtlIsDbcsInExpression(&Expression
, &Name
) == FALSE
, "expected FALSE, got TRUE");
197 RtlInitAnsiString(&Name
, "..");
198 ok(FsRtlIsDbcsInExpression(&Expression
, &Name
) == FALSE
, "expected FALSE, got TRUE");
199 RtlInitAnsiString(&Name
, "ntdll.dll");
200 ok(FsRtlIsDbcsInExpression(&Expression
, &Name
) == TRUE
, "expected TRUE, got FALSE");
202 RtlInitAnsiString(&Expression
, "smss.exe");
203 RtlInitAnsiString(&Name
, ".");
204 ok(FsRtlIsDbcsInExpression(&Expression
, &Name
) == FALSE
, "expected FALSE, got TRUE");
205 RtlInitAnsiString(&Name
, "~1");
206 ok(FsRtlIsDbcsInExpression(&Expression
, &Name
) == FALSE
, "expected FALSE, got TRUE");
207 RtlInitAnsiString(&Name
, "..");
208 ok(FsRtlIsDbcsInExpression(&Expression
, &Name
) == FALSE
, "expected FALSE, got TRUE");
209 RtlInitAnsiString(&Name
, "ntdll.dll");
210 ok(FsRtlIsDbcsInExpression(&Expression
, &Name
) == FALSE
, "expected FALSE, got TRUE");
211 RtlInitAnsiString(&Name
, "NTDLL.dll");
212 ok(FsRtlIsDbcsInExpression(&Expression
, &Name
) == FALSE
, "expected FALSE, got TRUE");
214 RtlInitAnsiString(&Expression
, "nt??krnl.???");
215 RtlInitAnsiString(&Name
, "ntoskrnl.exe");
216 ok(FsRtlIsDbcsInExpression(&Expression
, &Name
) == TRUE
, "expected TRUE, got FALSE");
218 RtlInitAnsiString(&Expression
, "he*o");
219 RtlInitAnsiString(&Name
, "hello");
220 ok(FsRtlIsDbcsInExpression(&Expression
, &Name
) == TRUE
, "expected TRUE, got FALSE");
221 RtlInitAnsiString(&Name
, "helo");
222 ok(FsRtlIsDbcsInExpression(&Expression
, &Name
) == TRUE
, "expected TRUE, got FALSE");
223 RtlInitAnsiString(&Name
, "hella");
224 ok(FsRtlIsDbcsInExpression(&Expression
, &Name
) == FALSE
, "expected FALSE, got TRUE");
226 RtlInitAnsiString(&Expression
, "he*");
227 RtlInitAnsiString(&Name
, "hello");
228 ok(FsRtlIsDbcsInExpression(&Expression
, &Name
) == TRUE
, "expected TRUE, got FALSE");
229 RtlInitAnsiString(&Name
, "helo");
230 ok(FsRtlIsDbcsInExpression(&Expression
, &Name
) == TRUE
, "expected TRUE, got FALSE");
231 RtlInitAnsiString(&Name
, "hella");
232 ok(FsRtlIsDbcsInExpression(&Expression
, &Name
) == TRUE
, "expected TRUE, got FALSE");
234 RtlInitAnsiString(&Expression
, "*.cpl");
235 RtlInitAnsiString(&Name
, "kdcom.dll");
236 ok(FsRtlIsDbcsInExpression(&Expression
, &Name
) == FALSE
, "expected FALSE, got TRUE");
237 RtlInitAnsiString(&Name
, "bootvid.dll");
238 ok(FsRtlIsDbcsInExpression(&Expression
, &Name
) == FALSE
, "expected FALSE, got TRUE");
239 RtlInitAnsiString(&Name
, "ntoskrnl.exe");
240 ok(FsRtlIsDbcsInExpression(&Expression
, &Name
) == FALSE
, "expected FALSE, got TRUE");
242 RtlInitAnsiString(&Expression
, ".");
243 RtlInitAnsiString(&Name
, "NTDLL.DLL");
244 ok(FsRtlIsDbcsInExpression(&Expression
, &Name
) == FALSE
, "expected FALSE, got TRUE");
246 RtlInitAnsiString(&Expression
, "F0_*.*");
247 RtlInitAnsiString(&Name
, ".");
248 ok(FsRtlIsDbcsInExpression(&Expression
, &Name
) == FALSE
, "expected FALSE, got TRUE");
249 RtlInitAnsiString(&Name
, "..");
250 ok(FsRtlIsDbcsInExpression(&Expression
, &Name
) == FALSE
, "expected FALSE, got TRUE");
251 RtlInitAnsiString(&Name
, "SETUP.EXE");
252 ok(FsRtlIsDbcsInExpression(&Expression
, &Name
) == FALSE
, "expected FALSE, got TRUE");
253 RtlInitAnsiString(&Name
, "F0_001");
254 ok(FsRtlIsDbcsInExpression(&Expression
, &Name
) == FALSE
, "expected FALSE, got TRUE");
256 RtlInitAnsiString(&Expression
, "*.TTF");
257 RtlInitAnsiString(&Name
, ".");
258 ok(FsRtlIsDbcsInExpression(&Expression
, &Name
) == FALSE
, "expected FALSE, got TRUE");
259 RtlInitAnsiString(&Name
, "..");
260 ok(FsRtlIsDbcsInExpression(&Expression
, &Name
) == FALSE
, "expected FALSE, got TRUE");
261 RtlInitAnsiString(&Name
, "SETUP.INI");
262 ok(FsRtlIsDbcsInExpression(&Expression
, &Name
) == FALSE
, "expected FALSE, got TRUE");
264 RtlInitAnsiString(&Expression
, "*");
265 RtlInitAnsiString(&Name
, ".");
266 ok(FsRtlIsDbcsInExpression(&Expression
, &Name
) == TRUE
, "expected TRUE, got FALSE");
267 RtlInitAnsiString(&Name
, "..");
268 ok(FsRtlIsDbcsInExpression(&Expression
, &Name
) == TRUE
, "expected TRUE, got FALSE");
269 RtlInitAnsiString(&Name
, "SETUP.INI");
270 ok(FsRtlIsDbcsInExpression(&Expression
, &Name
) == TRUE
, "expected TRUE, got FALSE");
272 RtlInitAnsiString(&Expression
, "\"ntoskrnl.exe");
273 RtlInitAnsiString(&Name
, "ntoskrnl.exe");
274 ok(FsRtlIsDbcsInExpression(&Expression
, &Name
) == FALSE
, "expected FALSE, got TRUE");
275 RtlInitAnsiString(&Expression
, "ntoskrnl\"exe");
276 ok(FsRtlIsDbcsInExpression(&Expression
, &Name
) == TRUE
, "expected TRUE, got FALSE");
277 RtlInitAnsiString(&Expression
, "ntoskrn\".exe");
278 ok(FsRtlIsDbcsInExpression(&Expression
, &Name
) == FALSE
, "expected FALSE, got TRUE");
279 RtlInitAnsiString(&Expression
, "ntoskrn\"\"exe");
280 ok(FsRtlIsDbcsInExpression(&Expression
, &Name
) == FALSE
, "expected FALSE, got TRUE");
281 RtlInitAnsiString(&Expression
, "ntoskrnl.\"exe");
282 ok(FsRtlIsDbcsInExpression(&Expression
, &Name
) == FALSE
, "expected FALSE, got TRUE");
283 RtlInitAnsiString(&Expression
, "ntoskrnl.exe\"");
284 RtlInitAnsiString(&Name
, "ntoskrnl.exe");
285 ok(FsRtlIsDbcsInExpression(&Expression
, &Name
) == TRUE
, "expected TRUE, got FALSE");
286 RtlInitAnsiString(&Name
, "ntoskrnl.exe.");
287 ok(FsRtlIsDbcsInExpression(&Expression
, &Name
) == TRUE
, "expected TRUE, got FALSE");
289 RtlInitAnsiString(&Expression
, "*.c.d");
290 RtlInitAnsiString(&Name
, "a.b.c.d");
291 ok(FsRtlIsDbcsInExpression(&Expression
, &Name
) == TRUE
, "expected TRUE, got FALSE");
292 RtlInitAnsiString(&Expression
, "*.?.c.d");
293 ok(FsRtlIsDbcsInExpression(&Expression
, &Name
) == TRUE
, "expected TRUE, got FALSE");
294 RtlInitAnsiString(&Expression
, "*?");
295 RtlInitAnsiString(&Name
, "");
296 ok(FsRtlIsDbcsInExpression(&Expression
, &Name
) == FALSE
, "expected FALSE, got TRUE");
297 RtlInitAnsiString(&Name
, "a");
298 ok(FsRtlIsDbcsInExpression(&Expression
, &Name
) == TRUE
, "expected TRUE, got FALSE");
299 RtlInitAnsiString(&Name
, "aa");
300 ok(FsRtlIsDbcsInExpression(&Expression
, &Name
) == TRUE
, "expected TRUE, got FALSE");
301 RtlInitAnsiString(&Name
, "aaa");
302 ok(FsRtlIsDbcsInExpression(&Expression
, &Name
) == TRUE
, "expected TRUE, got FALSE");
303 RtlInitAnsiString(&Expression
, "?*?");
304 RtlInitAnsiString(&Name
, "");
305 ok(FsRtlIsDbcsInExpression(&Expression
, &Name
) == FALSE
, "expected FALSE, got TRUE");
306 RtlInitAnsiString(&Name
, "a");
307 ok(FsRtlIsDbcsInExpression(&Expression
, &Name
) == FALSE
, "expected FALSE, got TRUE");
308 RtlInitAnsiString(&Name
, "aa");
309 ok(FsRtlIsDbcsInExpression(&Expression
, &Name
) == TRUE
, "expected TRUE, got FALSE");
310 RtlInitAnsiString(&Name
, "aaa");
311 ok(FsRtlIsDbcsInExpression(&Expression
, &Name
) == TRUE
, "expected TRUE, got FALSE");
312 RtlInitAnsiString(&Name
, "aaaa");
313 ok(FsRtlIsDbcsInExpression(&Expression
, &Name
) == TRUE
, "expected TRUE, got FALSE");
315 /* Tests from #5923 */
316 RtlInitAnsiString(&Expression
, "C:\\ReactOS\\**");
317 RtlInitAnsiString(&Name
, "C:\\ReactOS\\dings.bmp");
318 ok(FsRtlIsDbcsInExpression(&Expression
, &Name
) == TRUE
, "expected TRUE, got FALSE");
319 RtlInitAnsiString(&Expression
, "C:\\ReactOS\\***");
320 ok(FsRtlIsDbcsInExpression(&Expression
, &Name
) == TRUE
, "expected TRUE, got FALSE");
321 RtlInitAnsiString(&Expression
, "C:\\Windows\\*a*");
322 ok(FsRtlIsDbcsInExpression(&Expression
, &Name
) == FALSE
, "expected FALSE, got TRUE");
324 RtlInitAnsiString(&Expression
, "C:\\ReactOS\\*.bmp");
325 RtlInitAnsiString(&Name
, "C:\\Windows\\explorer.exe");
326 ok(FsRtlIsDbcsInExpression(&Expression
, &Name
) == FALSE
, "expected FALSE, got TRUE");
327 RtlInitAnsiString(&Expression
, "*.bmp;*.dib");
328 RtlInitAnsiString(&Name
, "winhlp32.exe");
329 ok(FsRtlIsDbcsInExpression(&Expression
, &Name
) == FALSE
, "expected FALSE, got TRUE");
332 /* PUBLIC FUNCTIONS ***********************************************************/
335 NtoskrnlFsRtlTest(HANDLE KeyHandle
)
337 FsRtlIsNameInExpressionTest();
338 FsRtlIsDbcsInExpressionTest();
340 FinishTest(KeyHandle
, L
"FsRtlTest");