libvips/test/test_seq.sh

46 lines
948 B
Bash
Raw Normal View History

#!/bin/sh
# set -x
. ./variables.sh
# make a large PNG, roughly the size of Chicago.png
2014-12-20 17:17:44 +01:00
printf "building huge test PNG image ... "
2014-12-20 18:12:12 +01:00
$vips replicate $image $tmp/huge.png 30 5
echo "ok"
huge=$tmp/huge.png
2014-12-20 17:17:44 +01:00
printf "testing vipsthumbnail ... "
rm -f $tmp/x.png
2014-12-20 18:12:12 +01:00
$vipsthumbnail $huge -o $tmp/x.png
if ! $vipsheader $tmp/x.png > /dev/null 2>&1 ; then
echo "vipsthumbnail failed in basic mode"
exit 1
fi
echo "ok"
if [ ! -d $tmp/readonly ] ; then
mkdir $tmp/readonly
chmod ugo-wx $tmp/readonly
fi
export TMPDIR=$tmp/readonly
2014-12-20 17:17:44 +01:00
printf "testing vipsthumbnail does not make temps ... "
rm -f $tmp/x.png
2014-12-20 18:12:12 +01:00
$vipsthumbnail $huge -o $tmp/x.png
if ! $vipsheader $tmp/x.png > /dev/null 2>&1 ; then
echo "vipsthumbnail made a temp"
exit 1
fi
echo "ok"
2014-12-20 17:17:44 +01:00
printf "testing shrink does not make temps ... "
rm -f $tmp/x.png
2014-12-20 18:12:12 +01:00
$vips shrink $huge $tmp/x.png 230 230
if ! $vipsheader $tmp/x.png > /dev/null 2>&1 ; then
echo "shrink made a temp"
exit 1
fi
echo "ok"