summaryrefslogtreecommitdiffstats
path: root/tools/testfiles
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2008-05-06 20:08:11 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2008-05-06 20:08:11 (GMT)
commiteb9ba954a5ed7200cc3d3c165c1ce630576c2a75 (patch)
tree541e05b8947a7415e06d32c29d643c8952f0fb06 /tools/testfiles
parent41bf2001b12eb45be944d44dd99b56a5a15bfb92 (diff)
downloadhdf5-eb9ba954a5ed7200cc3d3c165c1ce630576c2a75.zip
hdf5-eb9ba954a5ed7200cc3d3c165c1ce630576c2a75.tar.gz
hdf5-eb9ba954a5ed7200cc3d3c165c1ce630576c2a75.tar.bz2
[svn-r14948] Add a test for the floating point user defined printf format
Usage is -m T, --format=T Where T - is a string containing the floating point format, e.g '%.3f' The test consists of writing a number with 7 fractional digits (default precision display of %f is 6 digits) and have the 7 digits displayed with -m %.7f fpformat.h5 Tested: windows, linux, solaris Note: the output file was generated in linux, it may be possible that platforms other than the ones tested have a different representation of the number
Diffstat (limited to 'tools/testfiles')
-rw-r--r--tools/testfiles/tfpformat.ddl21
-rw-r--r--tools/testfiles/tfpformat.h5bin0 -> 2120 bytes
-rw-r--r--tools/testfiles/tnofilename.ddl2
3 files changed, 23 insertions, 0 deletions
diff --git a/tools/testfiles/tfpformat.ddl b/tools/testfiles/tfpformat.ddl
new file mode 100644
index 0000000..2336822
--- /dev/null
+++ b/tools/testfiles/tfpformat.ddl
@@ -0,0 +1,21 @@
+#############################
+Expected output for 'h5dump -m %.7f tfpformat.h5'
+#############################
+HDF5 "tfpformat.h5" {
+GROUP "/" {
+ DATASET "double" {
+ DATATYPE H5T_IEEE_F64LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ DATA {
+ (0): -0.1234567, 0.1234567, 0.0000000, 0.0000000, 0.0000000, 0.0000000
+ }
+ }
+ DATASET "float" {
+ DATATYPE H5T_IEEE_F32LE
+ DATASPACE SIMPLE { ( 6 ) / ( 6 ) }
+ DATA {
+ (0): -0.1234567, 0.1234567, 0.0000000, 0.0000000, 0.0000000, 0.0000000
+ }
+ }
+}
+}
diff --git a/tools/testfiles/tfpformat.h5 b/tools/testfiles/tfpformat.h5
new file mode 100644
index 0000000..4b7cb00
--- /dev/null
+++ b/tools/testfiles/tfpformat.h5
Binary files differ
diff --git a/tools/testfiles/tnofilename.ddl b/tools/testfiles/tnofilename.ddl
index b7b802b..756b88f 100644
--- a/tools/testfiles/tnofilename.ddl
+++ b/tools/testfiles/tnofilename.ddl
@@ -23,6 +23,7 @@ usage: h5dump [OPTIONS] file
-b B, --binary=B Binary file output, of form B
-t P, --datatype=P Print the specified named datatype
-w N, --width=N Set the number of columns of output
+ -m T, --format=T Set the floating point output format
-q Q, --sort_by=Q Sort groups and attributes by index Q
-z Z, --sort_order=Z Sort groups and attributes by order Z
-x, --xml Output in XML using Schema
@@ -52,6 +53,7 @@ usage: h5dump [OPTIONS] file
F - is a filename.
P - is the full path from the root group to the object.
N - is an integer greater than 1.
+ T - is a string containing the floating point format, e.g '%.3f'
L - is a list of integers the number of which are equal to the
number of dimensions in the dataspace being queried
U - is a URI reference (as defined in [IETF RFC 2396],