609 "GetShortPathNameA failed\n");
611 "GetShortPathNameA should not have a trailing \\\n");
615 "GetShortPathNameA failed\n");
617 "GetShortPathNameA should not have a trailing \\\n");
619 if (pGetLongPathNameA) {
622 rc1=(*pGetLongPathNameA)(tmpstr,
NULL,0);
623 rc2=(*pGetLongPathNameA)(curdir,
NULL,0);
625 "GetLongPathNameA: wrong return code, %d instead of %d\n",
629 rc1=(*pGetLongPathNameA)(
dir,tmpstr,
sizeof(tmpstr));
631 "GetLongPathNameA: returned '%s' instead of '%s' (rc=%d)\n",
640 "GetShortPathNameA returned '%s' instead of '%s'\n",tmpstr,tmpstr1);
649 "GetShortPathNameA returned '%s' instead of '%s'\n",tmpstr,tmpstr1);
662 "GetShortPathNameA error: len=%d error=%d tmpstr=[%s]\n",
664 if(pGetLongPathNameA) {
665 ok(passfail.
longlen==0,
"GetLongPathNameA passed when it shouldn't have\n");
667 "GetlongPathA should have returned 'ERROR_FILE_NOT_FOUND'\n");
671 ok(passfail.
shortlen==0,
"GetShortPathNameA passed when it shouldn't have\n");
675 "GetShortPathA should have returned 'ERROR_FILE_NOT_FOUND'\n");
676 if(pGetLongPathNameA) {
677 ok(passfail.
longlen==0,
"GetLongPathNameA passed when it shouldn't have\n");
679 "GetlongPathA should have returned 'ERROR_FILE_NOT_FOUND'\n");
690 "GetShortPathNameA error: len=%d error=%d tmpstr=[%s]\n",
692 if(pGetLongPathNameA) {
693 ok(passfail.
longlen==0,
"GetLongPathNameA passed when it shouldn't have\n");
695 "GetlongPathA should have returned 'ERROR_FILE_NOT_FOUND'\n");
699 ok(passfail.
shortlen==0,
"GetShortPathNameA passed when it shouldn't have\n");
703 "GetShortPathA should have returned 'ERROR_FILE_NOT_FOUND'\n");
704 if(pGetLongPathNameA) {
705 ok(passfail.
longlen==0,
"GetLongPathNameA passed when it shouldn't have\n");
707 "GetlongPathA should have returned 'ERROR_FILE_NOT_FOUND'\n");
717 "GetShortPathNameA error: len=%d error=%d tmpstr=[%s]\n",
719 if(pGetLongPathNameA) {
720 ok(passfail.
longlen==0,
"GetLongPathNameA passed when it shouldn't have\n");
723 "GetLongPathA returned %d and not 'ERROR_PATH_NOT_FOUND'\n",
728 ok(passfail.
shortlen==0,
"GetShortPathNameA passed when it shouldn't have\n");
732 "GetShortPathA returned %d and not 'ERROR_PATH_NOT_FOUND'\n",
734 if(pGetLongPathNameA) {
735 ok(passfail.
longlen==0,
"GetLongPathNameA passed when it shouldn't have\n");
738 "GetLongPathA returned %d and not 'ERROR_PATH_NOT_FOUND'\n",
743 ok(passfail.
shortlen==0,
"GetShortPathNameA passed when it shouldn't have\n");
747 "GetShortPathA returned %d and not 'ERROR_PATH_NOT_FOUND'\n",
749 if(pGetLongPathNameA) {
750 ok(passfail.
longlen==0,
"GetLongPathNameA passed when it shouldn't have\n");
753 "GetLongPathA returned %d and not 'ERROR_PATH_NOT_FOUND'\n",
758 ok(passfail.
shortlen==0,
"GetShortPathNameA passed when it shouldn't have\n");
762 "GetShortPathA returned %d and not 'ERROR_PATH_NOT_FOUND'\n",
764 if(pGetLongPathNameA) {
765 ok(passfail.
longlen==0,
"GetLongPathNameA passed when it shouldn't have\n");
768 "GetLongPathA returned %d and not 'ERROR_PATH_NOT_FOUND'\n",
780 sprintf(tmpstr2,
"%s\\%s",curdir_short,tmpstr);
785 "GetShortPathNameA error: len=%d error=%d tmpstr=[%s]\n",
787 if(pGetLongPathNameA) {
788 ok(passfail.
longlen==0,
"GetLongPathNameA passed when it shouldn't have\n");
790 "GetLongPathA returned %d and not 'ERROR_FILE_NOT_FOUND'\n",
795 ok(passfail.
shortlen==0,
"GetShortPathNameA passed when it shouldn't have\n");
799 "GetShortPathA returned %d and not 'ERROR_FILE_NOT_FOUND'\n",
801 if(pGetLongPathNameA) {
802 ok(passfail.
longlen==0,
"GetLongPathNameA passed when it shouldn't have\n");
804 "GetLongPathA returned %d and not 'ERROR_FILE_NOT_FOUND'\n",
809 sprintf(tmpstr,
"%c:",curdir[0]);
811 "GetFullPathNameA(%c:) failed\n", curdir[0]);
813 sprintf(tmpstr1,
"%s\\",tmpstr);
815 "GetFullPathNameA(%c:) returned '%s' instead of '%s' or '%s'\n",
816 curdir[0],tmpstr2,tmpstr,tmpstr1);
821 "GetFullPathNameA returned '%s' instead of '%s'\n",tmpstr1,tmpstr);
823 "GetFullPathNameA returned part '%s' instead of '%s'\n",strptr,
SHORTFILE);
830 "GetFullPathNameA returned '%s' instead of '%s'\n",tmpstr1,tmpstr);
832 "GetFullPathNameA returned part '%s' instead of '%s'\n",strptr,
SHORTFILE);
840 "GetFullPathNameA returned '%s' instead of '%s'\n",tmpstr1,tmpstr);
842 "GetFullPathNameA returned part '%s' instead of '%s'\n",strptr,
SHORTFILE);
851 "GetFullPathNameA returned '%s' instead of '%s'\n",tmpstr1,tmpstr);
853 "GetFullPathNameA returned part '%s' instead of '%s'\n",strptr,
SHORTFILE);
857 if (pGetLongPathNameA) {
862 "GetLongPathNameA returned '%s' instead of '%s'\n",tmpstr1,tmpstr);
866 "GetLongPathNameA returned '%s' instead of '%s'\n",tmpstr1,tmpstr);
870 "GetLongPathNameA returned '%s' instead of '%s'\n",tmpstr1,tmpstr);
875 "GetLongPathNameA returned '%s' instead of '%s/%s'\n",tmpstr1,
SHORTDIR,
SHORTFILE);
880 "GetShortPathNameA returned '%s' instead of '%s'\n",tmpstr1,tmpstr);
887 "GetFullPathNameA returned '%s' instead of '%s'\n",tmpstr1,tmpstr);
889 "GetFullPathNameA returned part '%s' instead of '%s'\n",strptr,
SHORTFILE);
895 "GetFullPathNameA returned '%s' instead of '%s'\n",tmpstr1,tmpstr);
898 "GetFullPathNameA returned part '%s' instead of '%s'\n",strptr,
SHORTFILE);
903 if(pGetLongPathNameA) {
904 ok(pGetLongPathNameA(tmpstr,tmpstr1,
MAX_PATH),
"GetLongPathNameA failed\n");
906 "GetLongPathNameA returned '%s' instead of '%s'\n",tmpstr1,
LONGDIR);
912 "GetShortPathNameA did not keep relative directory [%s]\n",tmpstr1);
913 if(pGetLongPathNameA) {
914 ok(pGetLongPathNameA(tmpstr1,tmpstr1,
MAX_PATH),
"GetLongPathNameA failed %s\n",
917 "GetLongPathNameA returned '%s' instead of '%s'\n",tmpstr1,tmpstr);
954 "GetShortPathNameA returned '%s' instead of '%s'\n",tmpstr1,tmpstr);
958 "GetShortPathNameA returned '%s' instead of '%s'\n",tmpstr1,tmpstr);
960 if (pGetLongPathNameA) {
962 ok(pGetLongPathNameA(tmpstr,tmpstr1,
MAX_PATH),
"GetLongPathNameA failed\n");
964 "GetLongPathNameA returned '%s' instead of '%s'\n",tmpstr1,tmpstr);
967 ok(pGetLongPathNameA(tmpstr,tmpstr1,
MAX_PATH),
"GetLongPathNameA failed\n");
969 "GetLongPathNameA returned '%s' instead of '%s'\n",tmpstr1,tmpstr);
static const CHAR is_char_ok[]
static void test_ValidPathA(const CHAR *curdir, const CHAR *subdir, const CHAR *filename, CHAR *shortstr, SLpassfail *passfail, const CHAR *errstr)
static void test_LongtoShortA(CHAR *teststr, const CHAR *goodstr, const CHAR *ext, const CHAR *errstr)
#define NOT_A_VALID_DRIVE
int WINAPI lstrcmpiA(LPCSTR lpString1, LPCSTR lpString2)
static void test_SplitShortPathA(CHAR *path, CHAR *dir, CHAR *eight, CHAR *three)
char * strcat(char *DstString, const char *SrcString)
ACPI_SIZE strlen(const char *String)
static const CHAR funny_chars[]
int WINAPI lstrcmpA(LPCSTR lpString1, LPCSTR lpString2)
DWORD WINAPI GetLongPathNameA(IN LPCSTR lpszShortPath, OUT LPSTR lpszLongPath, IN DWORD cchBuffer)
DWORD WINAPI GetFullPathNameA(IN LPCSTR lpFileName, IN DWORD nBufferLength, OUT LPSTR lpBuffer, OUT LPSTR *lpFilePart)
#define sprintf(buf, format,...)
static void test_FunnyChars(CHAR *curdir, CHAR *curdir_short, CHAR *filename, INT valid, CHAR *errstr)
#define ERROR_FILE_NOT_FOUND
DWORD WINAPI GetShortPathNameA(IN LPCSTR lpszLongPath, OUT LPSTR lpszShortPath, IN DWORD cchBuffer)
static void test_ShortPathCase(const char *tmpdir, const char *dirname, const char *filename)
int WINAPI lstrlenA(LPCSTR lpString)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
DWORD WINAPI GetCurrentDirectoryA(IN DWORD nBufferLength, OUT LPSTR lpBuffer)
int strcmp(const char *String1, const char *String2)
#define HAS_TRAIL_SLASH_A(string)
#define ERROR_PATH_NOT_FOUND