File: libjpeg-progs.test

package info (click to toggle)
libjpeg 6a-12
  • links: PTS
  • area: main
  • in suites: slink
  • size: 2,188 kB
  • ctags: 2,614
  • sloc: ansic: 19,515; asm: 284; makefile: 94; sh: 42
file content (28 lines) | stat: -rw-r--r-- 1,220 bytes parent folder | download | duplicates (2)
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
#!/bin/sh
#
#  Tests for the Debian libjpeg packages. Requires libjpegg6a and
#  libjpeg-gif to be installed. To use, simply run this script from
#  the shell prompt. If successful, it will say so, otherwise it
#  will state which file was not created correctly.


PATH=/usr/bin:/bin
SRCDIR=/usr/doc/libjpeg-progs/tests
TESTDIR=/tmp/libjpeg-progs.$$

cp -r $SRCDIR $TESTDIR
gunzip $TESTDIR/*.gz
djpeg -dct int -ppm -outfile $TESTDIR/testout.ppm  $TESTDIR/testorig.jpg
# djpeg -dct int -gif -outfile $TESTDIR/testout.gif  $TESTDIR/testorig.jpg
cjpeg -dct int -outfile $TESTDIR/testout.jpg  $TESTDIR/testimg.ppm
djpeg -dct int -ppm -outfile $TESTDIR/testoutp.ppm $TESTDIR/testprog.jpg
cjpeg -dct int -progressive -opt -outfile $TESTDIR/testoutp.jpg $TESTDIR/testimg.ppm
jpegtran -outfile $TESTDIR/testoutt.jpg $TESTDIR/testprog.jpg
cmp $TESTDIR/testimg.ppm $TESTDIR/testout.ppm || exit 1
# cmp $TESTDIR/testimg.gif $TESTDIR/testout.gif || exit 1
cmp $TESTDIR/testimg.jpg $TESTDIR/testout.jpg || exit 1
cmp $TESTDIR/testimg.ppm $TESTDIR/testoutp.ppm || exit 1
cmp $TESTDIR/testimgp.jpg $TESTDIR/testoutp.jpg || exit 1
cmp $TESTDIR/testorig.jpg $TESTDIR/testoutt.jpg || exit 1
echo "The test was successful"
rm -rf $TESTDIR