Examples: Python Index

This commit is contained in:
Shahram Najm 2017-01-23 11:14:40 +00:00
parent 6d9bc2a811
commit a7280e2069
1 changed files with 18 additions and 2 deletions

View File

@ -2,5 +2,21 @@
. ./include.sh
$PYTHON $examples_src/grib_index.py
rm -f my.idx
TEMP1=temp1.grib_index.py.txt
TEMP2=temp2.grib_index.py.txt
IDX_FILE=my.idx
rm -f $IDX_FILE
# First time it will create the index file
$PYTHON $examples_src/grib_index.py > $TEMP1
[ -f "$IDX_FILE" ]
# Second time it will use the file created before
$PYTHON $examples_src/grib_index.py > $TEMP2
# Check output in both cases is the same
diff $TEMP1 $TEMP2
rm -f $IDX_FILE $TEMP1 $TEMP2