3 # This file is part of vbig.
4 # Copyright (C) 2014 Richard Kettlewell
6 # This program is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program. If not, see <http://www.gnu.org/licenses/>.
20 rm -f testoutput testexpect
22 echo 'ERROR: invalid size: Numerical result out of range' > testexpect
23 if ./vbig testfile 9223372036854775808 2>testoutput; then
24 echo >&2 ERROR: unexpectedly succeeded
27 diff -u testexpect testoutput
29 echo 'ERROR: invalid size' > testexpect
30 if ./vbig testfile 9007199254740992K 2>testoutput; then
31 echo >&2 ERROR: unexpectedly succeeded
34 diff -u testexpect testoutput
36 if ./vbig testfile 8796093022208G 2>testoutput; then
37 echo >&2 ERROR: unexpectedly succeeded
40 diff -u testexpect testoutput
42 echo 'ERROR: invalid scale' > testexpect
43 if ./vbig testfile 1T 2>testoutput; then
44 echo >&2 ERROR: unexpectedly succeeded
47 diff -u testexpect testoutput
49 if ./vbig testfile 1KK 2>testoutput; then
50 echo >&2 ERROR: unexpectedly succeeded
53 diff -u testexpect testoutput
56 rm -f testoutput testexpect