trawick 01/08/02 13:54:49
Modified: test testfile.c
Log:
rename the temporary scratch directory from testdir to tmpdir
we have a program called testdir, so depending on the order you
build/run stuff the testfile program may not have worked
Revision Changes Path
1.39 +6 -6 apr/test/testfile.c
Index: testfile.c
===================================================================
RCS file: /home/cvs/apr/test/testfile.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- testfile.c 2001/08/02 15:37:34 1.38
+++ testfile.c 2001/08/02 20:54:49 1.39
@@ -274,13 +274,13 @@
fprintf(stdout, "Testing Directory functions.\n");
STD_TEST_NEQ(" Making directory",
- apr_dir_make("testdir",
+ apr_dir_make("tmpdir",
APR_UREAD | APR_UWRITE | APR_UEXECUTE |
APR_GREAD | APR_GWRITE | APR_GEXECUTE |
APR_WREAD | APR_WWRITE | APR_WEXECUTE, pool))
STD_TEST_NEQ(" Creating a file in the new directory",
- apr_file_open(&file, "testdir/testfile",
+ apr_file_open(&file, "tmpdir/testfile",
APR_READ | APR_WRITE | APR_CREATE,
APR_UREAD | APR_UWRITE | APR_UEXECUTE, pool))
@@ -288,7 +288,7 @@
apr_file_write(file, "Another test!!", &bytes);
apr_file_close(file);
- STD_TEST_NEQ(" Opening directory", apr_dir_open(&temp, "testdir",
pool))
+ STD_TEST_NEQ(" Opening directory", apr_dir_open(&temp, "tmpdir",
pool))
STD_TEST_NEQ(" Reading directory",
apr_dir_read(&dirent, APR_FINFO_DIRENT, temp))
@@ -300,7 +300,7 @@
if (apr_dir_read(&dirent, APR_FINFO_DIRENT | APR_FINFO_TYPE
| APR_FINFO_SIZE | APR_FINFO_MTIME, temp)
!= APR_SUCCESS) {
- fprintf(stderr, "Error reading directory testdir");
+ fprintf(stderr, "Error reading directory tmpdir");
exit(-1);
}
} while (dirent.name[0] == '.');
@@ -315,8 +315,8 @@
STD_TEST_NEQ(" Rewind directory", apr_dir_rewind(temp))
STD_TEST_NEQ(" Closing directory", apr_dir_close(temp))
STD_TEST_NEQ(" Removing file from directory",
- apr_file_remove("testdir/testfile", pool))
- STD_TEST_NEQ(" Removing directory", apr_dir_remove("testdir", pool))
+ apr_file_remove("tmpdir/testfile", pool))
+ STD_TEST_NEQ(" Removing directory", apr_dir_remove("tmpdir", pool))
}
#define TESTREAD_BLKSIZE 1024