[Libreoffice-commits] .: sal/qa
Joseph Powers
jpowers at kemper.freedesktop.org
Tue Feb 8 07:36:54 PST 2011
sal/qa/osl/file/osl_File.cxx | 2
sal/qa/osl/file/osl_File_Const.h | 105 ++++++++++++++++++++-------------------
2 files changed, 56 insertions(+), 51 deletions(-)
New commits:
commit 6b483218393e62af7a622caea1d7c0cd70f292b5
Author: Joseph Powers <jpowers27 at cox.net>
Date: Tue Feb 8 07:36:39 2011 -0800
Work on getting SAL to test on Mac OS X
diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx
index 074d451..85d31b9 100644
--- a/sal/qa/osl/file/osl_File.cxx
+++ b/sal/qa/osl/file/osl_File.cxx
@@ -5944,7 +5944,7 @@ namespace osl_Directory
{
//create directory in /tmpname
nError1 = ::osl::Directory::create( aTmpName7 );
-#if defined (WNT )
+#if defined ( WNT ) || defined ( MACOSX )
nError1 = osl::FileBase::E_ACCES; /// in Windows, you can create directory in c:/ any way.
deleteTestDirectory( aTmpName7 );
#endif
diff --git a/sal/qa/osl/file/osl_File_Const.h b/sal/qa/osl/file/osl_File_Const.h
index c708e7b..41cc033 100644
--- a/sal/qa/osl/file/osl_File_Const.h
+++ b/sal/qa/osl/file/osl_File_Const.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -44,35 +44,35 @@ extern "C"
#endif
-
+
//------------------------------------------------------------------------
// common used string resource
// these common used string will be used as assist resource in test
// they are mostly OS independent, some of the resource can be reused
-// so, acommon test data repository will be better since it can be
-// shared among all test code
+// so, acommon test data repository will be better since it can be
+// shared among all test code
//------------------------------------------------------------------------
-
+
const sal_Char pBuffer_Char[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
const sal_Char pBuffer_Number[] = "1234567890";
const sal_Char pBuffer_Blank[] = "";
-
+
#define TRUNC_LEN 10;
#define ENLARG_LEN 100;
-
+
//------------------------------------------------------------------------
-// OS dependent/independent definitions/includes
-// we use FILE_PREFIX for URL prefix,
-// TEST_PLATFORM for test platform initial,
-// TEST_PLATFORM_ROOT for root dir in comrresponding platform,
-// TEST_PLATFORM_TEMP for temp dir in comrresponding platform,
+// OS dependent/independent definitions/includes
+// we use FILE_PREFIX for URL prefix,
+// TEST_PLATFORM for test platform initial,
+// TEST_PLATFORM_ROOT for root dir in comrresponding platform,
+// TEST_PLATFORM_TEMP for temp dir in comrresponding platform,
// PATH_LIST_DELIMITER for seperator of path list in comrresponding platform,
// PATH_SEPERATOR for seperator in URL or system path in comrresponding platform,
// PATH_MAX/MAX_PATH for max path length in comrresponding platform,
//------------------------------------------------------------------------
-
+
//------------------------------------------------------------------------
// OS independent const definition
//------------------------------------------------------------------------
@@ -89,7 +89,12 @@ const sal_Char pBuffer_Blank[] = "";
# include <errno.h>
# include <fcntl.h>
# include <sys/stat.h>
-# include <sys/statfs.h>
+# if !defined MACOSX
+# include <sys/statfs.h>
+# else
+# include <sys/param.h>
+# include <sys/mount.h>
+# endif
# include <sys/statvfs.h>
# include <sys/types.h>
# define TEST_PLATFORM ""
@@ -98,14 +103,14 @@ const sal_Char pBuffer_Blank[] = "";
# define PATH_LIST_DELIMITER ":"
# define PATH_SEPERATOR "/"
#endif
+
#if (defined WNT ) // Windows
-#include <prewin.h>
-// # include <windows.h>
-# include <tchar.h>
-# include <io.h>
-# include <stdio.h>
-# include <stdlib.h>
-#include <postwin.h>
+# include <prewin.h>
+# include <tchar.h>
+# include <io.h>
+# include <stdio.h>
+# include <stdlib.h>
+# include <postwin.h>
# define PATH_MAX MAX_PATH
# define TEST_PLATFORM "c:/"
# define TEST_PLATFORM_ROOT "c:/"
@@ -116,9 +121,9 @@ const sal_Char pBuffer_Blank[] = "";
//------------------------------------------------------------------------
-// macro definition for the ASCII array/OUString declarations,
-// we use p### for the ASCII array,
-// a### for the OUString,
+// macro definition for the ASCII array/OUString declarations,
+// we use p### for the ASCII array,
+// a### for the OUString,
// n###Len for its length
//------------------------------------------------------------------------
@@ -134,46 +139,46 @@ const sal_Char pBuffer_Blank[] = "";
OSLTEST_DECLARE( NullURL, "" );
OSLTEST_DECLARE( SlashURL, PATH_SEPERATOR );
OSLTEST_DECLARE( PreURL, FILE_PREFIX );
-OSLTEST_DECLARE( RootURL, FILE_PREFIX TEST_PLATFORM );
+OSLTEST_DECLARE( RootURL, FILE_PREFIX TEST_PLATFORM );
-OSLTEST_DECLARE( TempDirectoryURL, FILE_PREFIX TEST_PLATFORM TEST_PLATFORM_TEMP );
-OSLTEST_DECLARE( TempDirectorySys, TEST_PLATFORM_ROOT TEST_PLATFORM_TEMP );
-OSLTEST_DECLARE( UserDirectoryURL, FILE_PREFIX TEST_PLATFORM TEST_PLATFORM_TEMP "" );
+OSLTEST_DECLARE( TempDirectoryURL, FILE_PREFIX TEST_PLATFORM TEST_PLATFORM_TEMP );
+OSLTEST_DECLARE( TempDirectorySys, TEST_PLATFORM_ROOT TEST_PLATFORM_TEMP );
+OSLTEST_DECLARE( UserDirectoryURL, FILE_PREFIX TEST_PLATFORM TEST_PLATFORM_TEMP "" );
OSLTEST_DECLARE( UserDirectorySys, TEST_PLATFORM_ROOT TEST_PLATFORM_TEMP "" );
//------------------------------------------------------------------------
// common used URL:temp, canonical, root, relative, link,etc
//------------------------------------------------------------------------
-OSLTEST_DECLARE( CanURL1, FILE_PREFIX TEST_PLATFORM TEST_PLATFORM_TEMP "/canonical.name" );
-OSLTEST_DECLARE( CanURL2, "ca@#;+.,$///78no\0ni..name" );
-OSLTEST_DECLARE( CanURL3, "ca@#;+.,$//tmp/678nonical//name" );
-OSLTEST_DECLARE( CanURL4, "canonical.name" );
+OSLTEST_DECLARE( CanURL1, FILE_PREFIX TEST_PLATFORM TEST_PLATFORM_TEMP "/canonical.name" );
+OSLTEST_DECLARE( CanURL2, "ca@#;+.,$///78no\0ni..name" );
+OSLTEST_DECLARE( CanURL3, "ca@#;+.,$//tmp/678nonical//name" );
+OSLTEST_DECLARE( CanURL4, "canonical.name" );
OSLTEST_DECLARE( TmpName1, "tmpdir" );
-OSLTEST_DECLARE( TmpName2, "tmpname" );
-OSLTEST_DECLARE( TmpName3, FILE_PREFIX TEST_PLATFORM TEST_PLATFORM_TEMP "/tmpdir" );
-OSLTEST_DECLARE( TmpName4, FILE_PREFIX TEST_PLATFORM TEST_PLATFORM_TEMP "/tmpdir/tmpname" );
-OSLTEST_DECLARE( TmpName5, FILE_PREFIX TEST_PLATFORM TEST_PLATFORM_TEMP "/tmpdir/../tmpdir/./tmpname" );
-OSLTEST_DECLARE( TmpName6, FILE_PREFIX TEST_PLATFORM TEST_PLATFORM_TEMP "/tmpname" );
-OSLTEST_DECLARE( TmpName7, FILE_PREFIX TEST_PLATFORM "tmpname" );
-OSLTEST_DECLARE( TmpName8, FILE_PREFIX TEST_PLATFORM TEST_PLATFORM_TEMP "/tmpname/tmpdir" );
-OSLTEST_DECLARE( TmpName9, FILE_PREFIX TEST_PLATFORM TEST_PLATFORM_TEMP "/tmpdir/../tmpdir/./" );
+OSLTEST_DECLARE( TmpName2, "tmpname" );
+OSLTEST_DECLARE( TmpName3, FILE_PREFIX TEST_PLATFORM TEST_PLATFORM_TEMP "/tmpdir" );
+OSLTEST_DECLARE( TmpName4, FILE_PREFIX TEST_PLATFORM TEST_PLATFORM_TEMP "/tmpdir/tmpname" );
+OSLTEST_DECLARE( TmpName5, FILE_PREFIX TEST_PLATFORM TEST_PLATFORM_TEMP "/tmpdir/../tmpdir/./tmpname" );
+OSLTEST_DECLARE( TmpName6, FILE_PREFIX TEST_PLATFORM TEST_PLATFORM_TEMP "/tmpname" );
+OSLTEST_DECLARE( TmpName7, FILE_PREFIX TEST_PLATFORM "tmpname" );
+OSLTEST_DECLARE( TmpName8, FILE_PREFIX TEST_PLATFORM TEST_PLATFORM_TEMP "/tmpname/tmpdir" );
+OSLTEST_DECLARE( TmpName9, FILE_PREFIX TEST_PLATFORM TEST_PLATFORM_TEMP "/tmpdir/../tmpdir/./" );
OSLTEST_DECLARE_UTF8( TmpName10, FILE_PREFIX TEST_PLATFORM TEST_PLATFORM_TEMP "/%E6%9C%AA%E5%91%BD%E5%90%8Dzhgb18030" );
-OSLTEST_DECLARE( RelURL1, "relative/file1" );
-OSLTEST_DECLARE( RelURL2, "relative/./file2" );
+OSLTEST_DECLARE( RelURL1, "relative/file1" );
+OSLTEST_DECLARE( RelURL2, "relative/./file2" );
OSLTEST_DECLARE( RelURL3, "relative/../file3" );
-OSLTEST_DECLARE( RelURL4, "././relative/../file4" );
-OSLTEST_DECLARE( RelURL5, TEST_PLATFORM_TEMP "/./../" TEST_PLATFORM_TEMP );
+OSLTEST_DECLARE( RelURL4, "././relative/../file4" );
+OSLTEST_DECLARE( RelURL5, TEST_PLATFORM_TEMP "/./../" TEST_PLATFORM_TEMP );
OSLTEST_DECLARE( LnkURL1, FILE_PREFIX TEST_PLATFORM TEST_PLATFORM_TEMP "/link.file" );
OSLTEST_DECLARE( HidURL1, ".hiddenfile" );
//------------------------------------------------------------------------
// common used System Path:temp, root,etc
//------------------------------------------------------------------------
-OSLTEST_DECLARE( RootSys, TEST_PLATFORM_ROOT );
-OSLTEST_DECLARE( SysPath1, TEST_PLATFORM_ROOT TEST_PLATFORM_TEMP "/system.path" );
-OSLTEST_DECLARE( SysPath2, TEST_PLATFORM_ROOT TEST_PLATFORM_TEMP "/system/path" );
-OSLTEST_DECLARE( SysPath3, TEST_PLATFORM_ROOT TEST_PLATFORM_TEMP "/tmpdir" );
+OSLTEST_DECLARE( RootSys, TEST_PLATFORM_ROOT );
+OSLTEST_DECLARE( SysPath1, TEST_PLATFORM_ROOT TEST_PLATFORM_TEMP "/system.path" );
+OSLTEST_DECLARE( SysPath2, TEST_PLATFORM_ROOT TEST_PLATFORM_TEMP "/system/path" );
+OSLTEST_DECLARE( SysPath3, TEST_PLATFORM_ROOT TEST_PLATFORM_TEMP "/tmpdir" );
OSLTEST_DECLARE( SysPath4, TEST_PLATFORM_ROOT TEST_PLATFORM_TEMP "/tmpname" );
OSLTEST_DECLARE_UTF8( SysPath5, TEST_PLATFORM_ROOT TEST_PLATFORM_TEMP "/%E6%9C%AA%E5%91%BD%E5%90%8Dzhgb18030" );
OSLTEST_DECLARE( SysPathLnk, TEST_PLATFORM_ROOT TEST_PLATFORM_TEMP "/link.file" );
@@ -187,7 +192,7 @@ OSLTEST_DECLARE( FifoSys, TEST_PLATFORM_ROOT TEST_PLATFORM_TEMP "/tmpdir/fifo"
#if ( defined UNX ) || ( defined OS2 ) // Unix
OSLTEST_DECLARE( TypeURL1, FILE_PREFIX "dev/ccv"); //socket Solaris/Linux
OSLTEST_DECLARE( TypeURL2, FILE_PREFIX "devices/pseudo/tcp at 0:tcp"); //special Solaris/Linux
-OSLTEST_DECLARE( TypeURL3, FILE_PREFIX "lib" ); //link Solaris
+OSLTEST_DECLARE( TypeURL3, FILE_PREFIX "lib" ); //link Solaris
#else // Windows
OSLTEST_DECLARE( TypeURL1, FILE_PREFIX "" );
OSLTEST_DECLARE( TypeURL2, FILE_PREFIX "" );
@@ -201,7 +206,7 @@ OSLTEST_DECLARE( TypeURL3, FILE_PREFIX "" );
#if ( defined UNX ) || ( defined OS2 ) // Unix
OSLTEST_DECLARE( VolURL1, FILE_PREFIX ""); //ufs Solaris/Linux
#ifdef SOLARIS
-OSLTEST_DECLARE( VolURL2, FILE_PREFIX "dev/fd" ); //fd Solaris
+OSLTEST_DECLARE( VolURL2, FILE_PREFIX "dev/fd" ); //fd Solaris
#else
OSLTEST_DECLARE( VolURL2, FILE_PREFIX "dev/floppy/0u1440" ); //fd0 Linux
#endif
More information about the Libreoffice-commits
mailing list