FreeRDP/winpr/libwinpr/path/test/TestPathCchFindExtension.c

25 lines
486 B
C
Raw Normal View History

2012-10-02 00:49:34 +04:00
#include <stdio.h>
#include <winpr/crt.h>
#include <winpr/path.h>
#include <winpr/tchar.h>
#include <winpr/winpr.h>
static const char testPathExtension[] = "C:\\Windows\\System32\\cmd.exe";
2012-10-02 00:49:34 +04:00
int TestPathCchFindExtension(int argc, char* argv[])
{
PCSTR pszExt;
if (PathCchFindExtensionA(testPathExtension, sizeof(testPathExtension), &pszExt) != S_OK)
{
printf("PathCchFindExtensionA failure: expected S_OK\n");
return -1;
}
printf("Extension: %s\n", pszExt);
2012-10-02 00:49:34 +04:00
return 0;
}