summaryrefslogtreecommitdiffstats
path: root/generic/tclTest.c
diff options
context:
space:
mode:
authorjingham <jingham>1998-11-10 06:54:11 (GMT)
committerjingham <jingham>1998-11-10 06:54:11 (GMT)
commit554f088073f47913899360f71b5da8d097b61c72 (patch)
tree71770a510a25e2c3cbb138639beb8a88005cb995 /generic/tclTest.c
parent0b7d54658da48c639f446247709d0f7677c52ba2 (diff)
downloadtcl-554f088073f47913899360f71b5da8d097b61c72.zip
tcl-554f088073f47913899360f71b5da8d097b61c72.tar.gz
tcl-554f088073f47913899360f71b5da8d097b61c72.tar.bz2
Fixed some tests which were failing on the Mac because of path differences. Added a test to the resource tests to cover the but I fixed. Fixed the stat test commands - the mac files were getting a leading :, which the test commands did not expect
Diffstat (limited to 'generic/tclTest.c')
-rw-r--r--generic/tclTest.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/generic/tclTest.c b/generic/tclTest.c
index d989fa5..7454771 100644
--- a/generic/tclTest.c
+++ b/generic/tclTest.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclTest.c,v 1.5 1998/09/14 18:40:02 stanton Exp $
+ * RCS: @(#) $Id: tclTest.c,v 1.6 1998/11/10 06:54:33 jingham Exp $
*/
#define TCL_TEST
@@ -2824,14 +2824,18 @@ TeststatprocCmd (dummy, interp, argc, argv)
return retVal;
}
-
+/* Be careful in the compares in these tests, since the Macintosh puts a
+ * leading : in the beginning of non-absolute paths before passing them
+ * into the file command procedures.
+ */
+
static int
TestStatProc1(path, buf)
CONST char *path;
TclStat_ *buf;
{
buf->st_size = 1234;
- return (strcmp("testStat1%.fil", path) ? -1 : 0);
+ return ((strstr(path, "testStat1%.fil") == NULL) ? -1 : 0);
}
@@ -2841,7 +2845,7 @@ TestStatProc2(path, buf)
TclStat_ *buf;
{
buf->st_size = 2345;
- return (strcmp("testStat2%.fil", path) ? -1 : 0);
+ return ((strstr(path, "testStat2%.fil") == NULL) ? -1 : 0);
}
@@ -2851,7 +2855,7 @@ TestStatProc3(path, buf)
TclStat_ *buf;
{
buf->st_size = 3456;
- return (strcmp("testStat3%.fil", path) ? -1 : 0);
+ return ((strstr(path, "testStat3%.fil") == NULL) ? -1 : 0);
}
/*
@@ -2934,7 +2938,7 @@ TestAccessProc1(path, mode)
CONST char *path;
int mode;
{
- return (strcmp("testAccess1%.fil", path) ? -1 : 0);
+ return ((strstr(path, "testAccess1%.fil") == NULL) ? -1 : 0);
}
@@ -2943,7 +2947,7 @@ TestAccessProc2(path, mode)
CONST char *path;
int mode;
{
- return (strcmp("testAccess2%.fil", path) ? -1 : 0);
+ return ((strstr(path, "testAccess2%.fil") == NULL) ? -1 : 0);
}
@@ -2952,7 +2956,7 @@ TestAccessProc3(path, mode)
CONST char *path;
int mode;
{
- return (strcmp("testAccess3%.fil", path) ? -1 : 0);
+ return ((strstr(path, "testAccess3%.fil") == NULL) ? -1 : 0);
}
/*