summaryrefslogtreecommitdiffstats
path: root/hl/test/test_table.c
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2004-11-23 15:50:53 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2004-11-23 15:50:53 (GMT)
commit56951d947c339184c7f9f78b2c804623a42e0678 (patch)
tree2c316168074a0a2928dca0581a5c0d1bdea7702f /hl/test/test_table.c
parentdee149bfc4ae91116358f3f2261c75443589c130 (diff)
downloadhdf5-56951d947c339184c7f9f78b2c804623a42e0678.zip
hdf5-56951d947c339184c7f9f78b2c804623a42e0678.tar.gz
hdf5-56951d947c339184c7f9f78b2c804623a42e0678.tar.bz2
[svn-r9562] Purpose:
bug fix Description: the Makefile.in of the hl tests was not including a "srcdir" include path the test table .c file was missing also the srcdir path Solution: add it Platforms tested: Misc. update:
Diffstat (limited to 'hl/test/test_table.c')
-rw-r--r--hl/test/test_table.c39
1 files changed, 35 insertions, 4 deletions
diff --git a/hl/test/test_table.c b/hl/test/test_table.c
index 5dd4855..fa1fbc1 100644
--- a/hl/test/test_table.c
+++ b/hl/test/test_table.c
@@ -11,7 +11,10 @@
* *
****************************************************************************/
-#include "H5HL.h"
+
+
+#include "H5TA.h"
+
#include <stdlib.h>
#include <assert.h>
@@ -1443,6 +1446,10 @@ int main(void)
{
hid_t fid; /* identifier for the file */
unsigned flags=H5F_ACC_RDONLY;
+ char *srcdir = getenv("srcdir"); /* the source directory */
+ char data_file[512]=""; /* buffer to hold name of existing data file */
+
+
/*-------------------------------------------------------------------------
* test1: create a file for the write/read test
@@ -1467,7 +1474,15 @@ int main(void)
*/
puts("Testing table with file open mode (read big-endian data):");
- fid=h5file_open("test_table_be.hdf5",flags);
+ /* compose the name of the file to open, using the srcdir, if appropriate */
+ if ( srcdir )
+ {
+ strcpy(data_file, srcdir);
+ strcat(data_file, "/");
+ }
+ strcat( data_file, "test_table_be.hdf5");
+
+ fid=h5file_open(data_file,flags);
/* test, do not write */
if (test_table(fid,0)<0)
@@ -1482,7 +1497,15 @@ int main(void)
*/
puts("Testing table with file open mode (read little-endian data):");
- fid=h5file_open("test_table_le.hdf5",flags);
+ /* compose the name of the file to open, using the srcdir, if appropriate */
+ if ( srcdir )
+ {
+ strcpy(data_file, srcdir);
+ strcat(data_file, "/");
+ }
+ strcat( data_file, "test_table_le.hdf5");
+
+ fid=h5file_open(data_file,flags);
/* test, do not write */
if (test_table(fid,0)<0)
@@ -1497,7 +1520,15 @@ int main(void)
*/
puts("Testing table with file open mode (read Cray data):");
- fid=h5file_open("test_table_cray.hdf5",flags);
+ /* compose the name of the file to open, using the srcdir, if appropriate */
+ if ( srcdir )
+ {
+ strcpy(data_file, srcdir);
+ strcat(data_file, "/");
+ }
+ strcat( data_file, "test_table_cray.hdf5");
+
+ fid=h5file_open(data_file,flags);
/* test, do not write */
if (test_table(fid,0)<0)