summaryrefslogtreecommitdiffstats
path: root/windows
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2010-02-23 21:06:48 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2010-02-23 21:06:48 (GMT)
commita3d0c3b1deeca451a79f77a40eed111c340a0edd (patch)
treedb5fa20cd33f7afc68f34e4b31982a1911642cd4 /windows
parentd18ac8f5621a885d6db0aa2d1c9c8447286ae1a3 (diff)
downloadhdf5-a3d0c3b1deeca451a79f77a40eed111c340a0edd.zip
hdf5-a3d0c3b1deeca451a79f77a40eed111c340a0edd.tar.gz
hdf5-a3d0c3b1deeca451a79f77a40eed111c340a0edd.tar.bz2
[svn-r18323] Updated test script to match *nix shell script.
Tested: windows
Diffstat (limited to 'windows')
-rw-r--r--windows/tools/h5copy/testh5copy.bat39
1 files changed, 36 insertions, 3 deletions
diff --git a/windows/tools/h5copy/testh5copy.bat b/windows/tools/h5copy/testh5copy.bat
index dc665b2..a0e164a 100644
--- a/windows/tools/h5copy/testh5copy.bat
+++ b/windows/tools/h5copy/testh5copy.bat
@@ -26,6 +26,9 @@ rem setup to support it if we do in the future. --SJW 8/22/07
setlocal enabledelayedexpansion
pushd %~dp0
+set EXIT_SUCCESS=0
+set EXIT_FAILURE=1
+
rem The tool name
set h5copy=h5copy%2
rem The path of the tool binary
@@ -44,7 +47,8 @@ set h5ls_bin=%CD%\..\%h5ls%\%1\%h5ls%
set /a nerrors=0
set verbose=yes
-set srcfile=h5copytst.h5
+set srcfile1=h5copytst.h5
+set srcfile2=h5copy_ref.h5
set indir=%CD%\testfiles
set outdir=%CD%\..\testfiles
@@ -293,8 +297,8 @@ rem Assumed arguments:
rem <none>
:copyobjects
- set testfile=%indir%\%srcfile%
- set fileout=%outdir%\%srcfile:.h5=.out.h5%
+ set testfile=%indir%\%srcfile1%
+ set fileout=%outdir%\%srcfile1:.h5=.out.h5%
rem Remove any output file left over from previous test run
del /f %fileout% 2> nul
@@ -346,6 +350,34 @@ rem <none>
exit /b
+
+rem Copy references in various way.
+rem adding to the destination file each time compare the result
+rem
+rem Assumed arguments:
+rem <none>
+:copyreferences
+
+ set testfile=%indir%\%srcfile2%
+ set fileout=%outdir%\%srcfile2:.h5=.out.h5%
+
+ rem Remove any output file left over from previous test run
+ del /f %fileout% 2> nul
+
+ echo.Test copying object and region references
+ rem echo.TOOLTEST -f ref -i $TESTFILE -o $FILEOUT -v -s / -d /COPY
+ call :tooltest -f ref -i %testfile% -o %fileout% -v -s / -d /COPY
+
+ rem Verify that the file created above is correct
+ call :h5lstest %fileout%
+
+ rem Remove output file created, if the "no cleanup" environment variable is
+ rem not defined
+ if not defined HDF5_NOCLEANUP (
+ del /f %fileout%
+ )
+
+ exit /b
rem ##############################################################################
rem ### T H E T E S T S ###
@@ -353,6 +385,7 @@ rem ############################################################################
:main
call :copyobjects
+ call :copyreferences
if %nerrors% equ 0 (
echo.All h5copy tests passed.