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

Nicolas Le Cam niko.lecam at gmail.com
Thu Apr 9 17:46:03 CDT 2009


---
 dlls/msi/tests/format.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/dlls/msi/tests/format.c b/dlls/msi/tests/format.c
index 316eed6..2b2661c 100644
--- a/dlls/msi/tests/format.c
+++ b/dlls/msi/tests/format.c
@@ -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 );
-- 
1.6.0.4


--=-v39wNRstl5xA9AGMzTn2--




More information about the wine-patches mailing list