Index: trunk/psLib/test/image/tst_psImageIO.c
===================================================================
--- trunk/psLib/test/image/tst_psImageIO.c	(revision 999)
+++ trunk/psLib/test/image/tst_psImageIO.c	(revision 1001)
@@ -6,6 +6,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-06-11 18:50:49 $
+ *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-06-11 19:18:41 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -16,4 +16,6 @@
 #include <string.h>
 #include <stdlib.h>
+#include <sys/stat.h>
+#include <sys/types.h>
 
 #include "psTest.h"
@@ -172,8 +174,9 @@
 
     #define testReadType(TYP,filename) \
-    testReadTypeSize(1,1,0,0,1,1,TYP,"1x1_" filename); \
-    testReadTypeSize(M,1,M/4,0,M/2,1,TYP,"Mx1_" filename); \
-    testReadTypeSize(1,N,0,N/4,1,N/2,TYP,"1xN_" filename); \
-    testReadTypeSize(M,N,M/4,N/4,M/2,N/2,TYP,"MxN_" filename);
+    mkdir("tmpImages",0777); \
+    testReadTypeSize(1,1,0,0,1,1,TYP,"tmpImages/1x1_" filename); \
+    testReadTypeSize(M,1,M/4,0,M/2,1,TYP,"tmpImages/Mx1_" filename); \
+    testReadTypeSize(1,N,0,N/4,1,N/2,TYP,"tmpImages/1xN_" filename); \
+    testReadTypeSize(M,N,M/4,N/4,M/2,N/2,TYP,"tmpImages/MxN_" filename);
 
     testReadType(U8,"U8.fits");
@@ -222,5 +225,5 @@
 
     psLogMsg(__func__,PS_LOG_INFO,"Following should be an error as extnum is invalid.");
-    image = psImageReadSection(image,0,0,M,N,0,NULL,4,"MxN_F32.fits");
+    image = psImageReadSection(image,0,0,M,N,0,NULL,4,"tmpImages/MxN_F32.fits");
     if (image != NULL) {
         psError(__func__,"Image returned though extnum was invalid.");
@@ -228,5 +231,5 @@
     }
     psLogMsg(__func__,PS_LOG_INFO,"Following should be an error as extname is invalid.");
-    image = psImageReadSection(image,0,0,M,N,0,"bogus",0,"MxN_F32.fits");
+    image = psImageReadSection(image,0,0,M,N,0,"bogus",0,"tmpImages/MxN_F32.fits");
     if (image != NULL) {
         psError(__func__,"Image returned though extnum was invalid.");
@@ -288,11 +291,12 @@
     GENIMAGE(img,m,n,F32,0);
     GENIMAGE(img2,m,n,F32,row+2*col);
+    mkdir("tmpImages",0777);
     remove
         ("writeTest.fits");
-    if (psImageWriteSection(img,0,0,0,NULL,0,"writeTest.fits") != 0) {
+    if (psImageWriteSection(img,0,0,0,NULL,0,"tmpImages/writeTest.fits") != 0) {
         psError(__func__,"Couldn't write writeTest.fits.");
         return 14;
     }
-    if (psImageWriteSection(img2,0,0,0,NULL,0,"writeTest.fits") != 0) {
+    if (psImageWriteSection(img2,0,0,0,NULL,0,"tmpImages/writeTest.fits") != 0) {
         psError(__func__,"Couldn't overwrite writeTest.fits.");
         return 15;
@@ -302,5 +306,5 @@
 
     // Did it really overwrite the pixel values?  Let's read it in and see.
-    img = psImageReadSection(NULL,0,0,m,n,0,NULL,0,"writeTest.fits");
+    img = psImageReadSection(NULL,0,0,m,n,0,NULL,0,"tmpImages/writeTest.fits");
     if (img == NULL) {
         psError(__func__,"Could not read in writeTest.fits.");
