Index: trunk/psLib/test/fileUtils/tst_psFits.c
===================================================================
--- trunk/psLib/test/fileUtils/tst_psFits.c	(revision 2965)
+++ trunk/psLib/test/fileUtils/tst_psFits.c	(revision 2967)
@@ -6,6 +6,6 @@
 *  @author Robert DeSonia, MHPCC
 *
-*  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-01-13 01:54:26 $
+*  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-01-13 02:08:30 $
 *
 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -16,4 +16,5 @@
 
 #include <unistd.h>
+#include <string.h>
 
 static bool makeMulti(void);
@@ -21,6 +22,6 @@
 
 static psS32 tst_psFitsAlloc( void );
-static psS32 tst_psFitsMoveExtName( void );
-static psS32 tst_psFitsMoveExtNum( void );
+static psS32 tst_psFitsMoveExtName( void ); // also tests psFitsGetExtName
+static psS32 tst_psFitsMoveExtNum( void );  // also tests psFitsGetExtNum
 
 testDescription tests[] = {
@@ -125,4 +126,14 @@
         }
 
+        // check to see if I can retrieve the name back from the psFits object.
+        char* nameFromFile = psFitsGetExtName(fits);
+        if (strcmp(nameFromFile,extName) != 0) { // hey, it didn't move?
+            psError(PS_ERR_UNKNOWN, false,
+                    "Failed to retrieve the extension name back ('%s' vs '%s'",
+                    nameFromFile, extName);
+            return 3;
+        }
+        psFree(nameFromFile);
+
         // check that the image is associated to the extension moved, i.e.,
         // did we really move to the proper extension?
@@ -148,4 +159,14 @@
         }
 
+        // check to see if I can retrieve the name back from the psFits object.
+        char* nameFromFile = psFitsGetExtName(fits);
+        if (strcmp(nameFromFile,extName) != 0) { // hey, it didn't move?
+            psError(PS_ERR_UNKNOWN, false,
+                    "Failed to retrieve the extension name back ('%s' vs '%s'",
+                    nameFromFile, extName);
+            return 5;
+        }
+        psFree(nameFromFile);
+
         // check that the image is associated to the extension moved, i.e.,
         // did we really move to the proper extension?
@@ -217,4 +238,12 @@
                     lcv);
             return 3;
+        }
+
+        // check to see if I can retrieve the number back from the psFits object.
+        if (psFitsGetExtNum(fits) != lcv) { // hey, it didn't move?
+            psError(PS_ERR_UNKNOWN, false,
+                    "Failed to retrieve the extension number back (%d vs %d)",
+                    psFitsGetExtNum(fits), lcv);
+            return 5;
         }
 
@@ -265,4 +294,12 @@
         }
 
+        // check to see if I can retrieve the number back from the psFits object.
+        if (psFitsGetExtNum(fits) != lcv) { // hey, it didn't move?
+            psError(PS_ERR_UNKNOWN, false,
+                    "Failed to retrieve the extension number back (%d vs %d)",
+                    psFitsGetExtNum(fits), lcv);
+            return 13;
+        }
+
         // check that the image is associated to the extension moved, i.e.,
         // did we really move to the proper extension?
@@ -284,4 +321,12 @@
                     "Failed to move to extension %d.",
                     lcv);
+            return 15;
+        }
+
+        // check to see if I can retrieve the number back from the psFits object.
+        if (psFitsGetExtNum(fits) != lcv) { // hey, it didn't move?
+            psError(PS_ERR_UNKNOWN, false,
+                    "Failed to retrieve the extension number back (%d vs %d)",
+                    psFitsGetExtNum(fits), lcv);
             return 15;
         }
