1 /*
2  * PROJECT:         ReactOS API tests
3  * LICENSE:         LGPLv2.1+ - See COPYING.LIB in the top level directory
4  * PURPOSE:         Test for RtlIsNameLegalDOS8Dot3
5  * PROGRAMMER:      Thomas Faber <thomas.faber@reactos.org>
6  */
7 
8 #include "precomp.h"
9 
10 START_TEST(RtlIsNameLegalDOS8Dot3)
11 {
12     UNICODE_STRING Name;
13     CHAR OemNameBuffer[13];
14     OEM_STRING OemName;
15     BOOLEAN NameContainsSpaces;
16     BOOLEAN IsLegal;
17 
18     RtlInitUnicodeString(&Name, L"\x00ae");
19     RtlFillMemory(OemNameBuffer, sizeof(OemNameBuffer), 0x55);
20     OemName.Buffer = OemNameBuffer;
21     OemName.Length = 0;
22     OemName.MaximumLength = sizeof(OemNameBuffer);
23     NameContainsSpaces = 0x55;
24     IsLegal = RtlIsNameLegalDOS8Dot3(&Name, &OemName, &NameContainsSpaces);
25     ok(IsLegal == TRUE, "IsLegal = %u\n", IsLegal);
26     ok(NameContainsSpaces == FALSE, "NameContainsSpaces = %u\n", NameContainsSpaces);
27     ok(OemName.Length == 1, "OemName.Length = %u\n", OemName.Length);
28     ok(OemNameBuffer[0] == 'R', "OemNameBuffer[0] = 0x%x\n", OemNameBuffer[0]);
29     ok(OemNameBuffer[1] == 0x55, "OemNameBuffer[1] = 0x%x\n", OemNameBuffer[1]);
30     ok(OemNameBuffer[2] == 0x55, "OemNameBuffer[2] = 0x%x\n", OemNameBuffer[2]);
31 
32 }
33