3 # Copyright 1999-2012 ImageMagick Studio LLC, a non-profit organization
4 # dedicated to making software imaging solutions freely available.
6 # You may not use this file except in compliance with the License. You may
7 # obtain a copy of the License at
9 # http://www.imagemagick.org/script/license.php
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
17 # Test for 'validate' utility.
19 set -e # Exit on any error
20 [ "X$srcdir" = "X" ] && srcdir=`pwd`
21 . ${srcdir}/tests/common.sh
23 ${MAGICK} pnm:- null: < ${REFERENCE_IMAGE}
24 ${MAGICK} pnm:- info: < ${REFERENCE_IMAGE}
25 ${MAGICK} pnm:- miff:- < ${REFERENCE_IMAGE} | ${IDENTIFY} -
26 ${MAGICK} pnm:- - < ${REFERENCE_IMAGE} | ${IDENTIFY} -
27 ${MAGICK} ${REFERENCE_IMAGE} -write null: null:
28 ${MAGICK} ${REFERENCE_IMAGE} -write info: null:
29 ${MAGICK} ${REFERENCE_IMAGE} -write miff:- null: | ${IDENTIFY} -
30 ${MAGICK} ${REFERENCE_IMAGE} -write - null: | ${IDENTIFY} -
32 # IMv7 "magick" testing
34 ${MAGICK} -read ${REFERENCE_IMAGE} info:
35 # -exit can be used insted of implicit write
36 ${MAGICK} ${REFERENCE_IMAGE} -write info: -exit
37 # null: does not require an image during write
38 ${MAGICK} -write null: -exit
39 # implied write null: without image
40 ${MAGICK} ${REFERENCE_IMAGE} -write info: +delete null:
41 # Write to file decriptor
42 ${MAGICK} ${REFERENCE_IMAGE} fd:6 6>&1 | ${IDENTIFY} -
43 # Read from file decriptor
44 exec 5<${REFERENCE_IMAGE}
47 # pipelined magick script
48 echo "-read ${REFERENCE_IMAGE} -write info:" | ${MAGICK} -script -
49 # pipelined magick script, input image pre-read
50 echo "-write info:" | ${MAGICK} ${REFERENCE_IMAGE} -script -
51 # pipelined script from file descriptor, read image from stdin
52 echo "-read pnm:- -write info:" |\
53 ${MAGICK} -script fd:5 5<&0 <${REFERENCE_IMAGE}