summaryrefslogtreecommitdiffstats
path: root/tools/h5copy/testh5copy.sh
diff options
context:
space:
mode:
authorJonathan Kim <jkm@hdfgroup.org>2011-03-08 20:17:17 (GMT)
committerJonathan Kim <jkm@hdfgroup.org>2011-03-08 20:17:17 (GMT)
commit8245bf15728bb73ee4290cb70e08a63ada205657 (patch)
tree3bc66984ad197509630fb361de5f66f629a506d1 /tools/h5copy/testh5copy.sh
parent9d115d89f2297f3c6e1ae6c3ca35be4b1a9a8cc9 (diff)
downloadhdf5-8245bf15728bb73ee4290cb70e08a63ada205657.zip
hdf5-8245bf15728bb73ee4290cb70e08a63ada205657.tar.gz
hdf5-8245bf15728bb73ee4290cb70e08a63ada205657.tar.bz2
[svn-r20203] Purpose:
Fix Bug 2120 - h5copy: improve to copy an object into same HDF file Description: Before the fix users can't copy an object (dataset or group) with different name if input file (-i) and output file (-o) is same. This feature would be useful to clone any object with different name and reuse contents. Tested: jam (linux32-LE), amani (linux64-LE), heiwa (linuxppc64-BE), tejeda (mac32-LE), linew (solaris-BE), Cmake (jam)
Diffstat (limited to 'tools/h5copy/testh5copy.sh')
-rw-r--r--tools/h5copy/testh5copy.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/h5copy/testh5copy.sh b/tools/h5copy/testh5copy.sh
index 7d26b3b..d8838b0 100644
--- a/tools/h5copy/testh5copy.sh
+++ b/tools/h5copy/testh5copy.sh
@@ -443,6 +443,15 @@ TEST_MISC()
echo "Test copying object into group which doesn't exist, without -p"
TOOLTEST_FAIL h5copy_misc1.out -v -i $TESTFILE -o $FILEOUT -s /simple -d /g1/g2/simple
+ echo "Test copying objects to the same file "
+ rm -f $FILEOUT
+ # create temporary test file ($FILEOUT) with some objects
+ TOOLTEST -i $TESTFILE -o $FILEOUT -v -s /simple -d /simple
+ TOOLTEST -i $TESTFILE -o $FILEOUT -v -s /grp_dsets -d /grp_dsets
+ # actual test cases
+ TOOLTEST -i $FILEOUT -o $FILEOUT -v -s /simple -d /simple_cp
+ TOOLTEST -i $FILEOUT -o $FILEOUT -v -s /grp_dsets -d /grp_dsets_cp
+
# Remove output file created, if the "no cleanup" environment variable is
# not defined
if test -z "$HDF5_NOCLEANUP"; then