Ticket #240: test.sh

File test.sh, 601 bytes (added by Dimitar Misev, 11 years ago)
Line 
1#!/bin/bash
2
3RASQL="rasql --user rasadmin --passwd rasadmin --quiet"
4COLL=test_large
5TYPE=GreySet
6
7f=rasql_1.tif
8
9function check()
10{
11 if [ -f $f ]; then
12 output=`file $f`
13 if [ "$output" == "rasql_1.tif: data" ]; then
14 echo bug not fixed.
15 else
16 echo bug fixed.
17 fi
18 else
19 echo select failed, file not found.
20 fi
21}
22
23$RASQL -q "drop collection $COLL" > /dev/null 2>&1
24$RASQL -q "create collection $COLL $TYPE" > /dev/null
25$RASQL -q "insert into $COLL values marray i in [0:999,0:9999] values 2c" > /dev/null
26$RASQL -q 'select tiff(c) from test_large as c' --out file
27
28check