summaryrefslogtreecommitdiffstats
path: root/generic/tclTest.c
diff options
context:
space:
mode:
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);
}
/*