Mod Cplusplus CVS committal
Author : johnksterling
Project : apr_cplusplus
Module : test
Dir : apr_cplusplus/test
Modified Files:
test_anyfile.cpp test_path.cpp test_time.cpp
Log Message:
make tests pass on darwin... some funny ones in there due to darwin softlinks :)
===================================================================
RCS file: /cvsroot/modcplusplus/apr_cplusplus/test/test_anyfile.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- test_anyfile.cpp 23 Feb 2002 21:15:51 -0000 1.2
+++ test_anyfile.cpp 15 Nov 2003 16:11:24 -0000 1.3
@@ -8,15 +8,15 @@
/* this test only works on unix */
static int test_info(apr_pool_t *pool) {
int res = 0;
- APRAnyFile *file = new APRAnyFile(pool, "/etc");
+ APRAnyFile *file = new APRAnyFile(pool, "/private/etc");
APRAnyFile *file2 = NULL;
apr_finfo_t *info = (apr_finfo_t *)apr_pcalloc(pool, sizeof(*info));
- apr_stat(info, "/etc", 0, pool);
+ apr_stat(info, "/private/etc", 0, pool);
file->Stat();
if ((file->Info())->nlink != info->nlink) {
- printf("Number of lnks to /etc mismatch after stat.\n");
+ printf("Number of lnks to /etc mismatch after stat. %d != %d\n", (int)(file->Info())->nlink, (int)info->nlink);
res = 1;
}
===================================================================
RCS file: /cvsroot/modcplusplus/apr_cplusplus/test/test_path.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- test_path.cpp 22 Feb 2002 16:35:51 -0000 1.1
+++ test_path.cpp 15 Nov 2003 16:11:24 -0000 1.2
@@ -36,8 +36,9 @@
static int test_chdir(apr_pool_t *pool) {
int res = 0;
APRPath::SetCwd("/etc", pool);
- if (strcmp(APRPath::GetCwd(0, pool), "/etc")) {
- printf("Oops, unable to chdir to /etc.\n");
+ if (strcmp(APRPath::GetCwd(0, pool), "/etc") &&
+ strcmp(APRPath::GetCwd(0, pool), "/private/etc")) {
+ printf("Oops, unable to chdir to /etc. %s\n", APRPath::GetCwd(0, pool));
res = 1;
}
return res;
===================================================================
RCS file: /cvsroot/modcplusplus/apr_cplusplus/test/test_time.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- test_time.cpp 15 Nov 2003 16:00:01 -0000 1.2
+++ test_time.cpp 15 Nov 2003 16:11:24 -0000 1.3
@@ -9,12 +9,12 @@
#include "cpp_time.h"
-/* this is Thu Jul 22 09:13:20 1976 Pacific */
+/* this is Thu Jul 22 12:13:20 1976 EST */
#define TEST_TIME 206900000
#define RFC822_DATE "Thu, 22 Jul 1976 16:13:20 GMT"
-#define CTIME "Thu Jul 22 09:13:20 1976"
+#define CTIME "Thu Jul 22 12:13:20 1976"
#define FORMAT_STRING "%D %T"
-#define FORMAT_DATE "07/22/76 09:13:20"
+#define FORMAT_DATE "07/22/76 12:13:20"
static int test_sleep(apr_pool_t *pool) {
int res = 0;
@@ -90,7 +90,7 @@
printf("Minutes wrong.\n");
res = 1;
}
- if (pTime->LocalHour() != 9) {
+ if (pTime->LocalHour() != 12) {
printf("Hour wrong.\n");
res = 1;
}
@@ -118,8 +118,8 @@
printf("IsDaylightSaving wrong.\n");
res = 1;
}
- if (pTime->LocalGMTOffset() != -25200) {
- printf("GMTOffset wrong.\n");
+ if (pTime->LocalGMTOffset() != -14400) {
+ printf("GMTOffset wrong: %d.\n", pTime->LocalGMTOffset());
res = 1;
}
|