msi/tests: Fix format test when run on root drive directory.

This commit is contained in:
Nicolas Le Cam 2009-04-10 00:46:03 +02:00 committed by Alexandre Julliard
parent 13dfb9b3a6
commit 7b2a44f257
1 changed files with 4 additions and 2 deletions

View File

@ -2361,12 +2361,14 @@ static void test_formatrecord_tables(void)
/* component with INSTALLSTATE_SOURCE */
lstrcpy( expected, "1: " );
lstrcat( expected, curr_dir );
lstrcat( expected, "\\ " );
if (strlen(curr_dir) > 3)
lstrcat( expected, "\\" );
lstrcat( expected, " " );
size = MAX_PATH;
MsiRecordSetString( hrec, 1, "[$parietal]" );
r = MsiFormatRecord( hpkg, hrec, buf, &size );
ok( r == ERROR_SUCCESS, "format record failed: %d\n", r);
ok( !lstrcmp( buf, expected ), "Expected '%s', got %s\n", expected, buf);
ok( !lstrcmp( buf, expected ), "Expected '%s', got '%s'\n", expected, buf);
sprintf( buf, "%sI am a really long directory\\temporal.txt", root );
DeleteFile( buf );