test_cdf_transformation.in 729 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#! @SHELL@
set -e
[ x${DEBUG+set} != xset ] || set -x
if [ @ENABLE_NETCDF@ != yes ]; then
   exit 77
fi
ncdatafile="test$$.nc"
tempfiles="${ncdatafile}"
trap "EC=\$? ; \rm -f ${tempfiles}; exit \$EC" EXIT
./test_cdf_write "${ncdatafile}"
digest=$(./test_cdf_read "${ncdatafile}")
missValueCount=$(echo "$digest" | @SED@ -n '/^missing values count =/{
s/^missing values count *= *//
p
q
}')
if [ "$missValueCount" -ne 1 ]; then
  echo "Mismatch in expected number of missing values!" >&2
  exit 1
fi
21
22
23
24
25
if ! echo "$digest" | grep 'variable 1 attribute "CDI Text Attribute test, created by", value: "CDI test_cdf_write"' >/dev/null; then
  echo "Expected attribute not found" >&2
  exit 1
fi

26
27
28
29
30
#
# Local Variables:
# mode: sh
# End:
#