aboutsummaryrefslogtreecommitdiff
path: root/tests/indexamajig-missing-file
blob: fd65239e93397a440de4c8c4c15b4ed20870c79f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/sh

INDEXAMAJIG=$1
GEOM=$2

INFILES=`echo file_does_not_exist{1..10}.h5`

if [ -f test-input.lst ]; then
	echo test-input.lst exists.  Not proceeding!
	exit 1
fi

if [ -f test-output.stream ]; then
	echo test-output.stream exists.  Not proceeding!
	exit 1
fi

for FILE in $INFILES; do
	if [ -f $FILE ]; then
		echo $FILE exists.  Not proceeding!
		exit 1
	fi
	echo $FILE >> test-input.lst
done

$INDEXAMAJIG -i test-input.lst -o test-output.stream -g $GEOM
OUTVAL=$?

rm -f test-output.stream test-input.lst

# indexamajig should have failed with a specific error code
if [ $OUTVAL -ne 5 ]; then
	echo indexamajig returned $OUTVAL, should be 5
	exit 1;
fi