summaryrefslogtreecommitdiff
path: root/Build/source/texk/dvipdfm-x/xdvipdfm-bb.test
blob: 6b08f7ece1b5bf27e75ec223b4250e69255d84ec (plain)
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#! /bin/sh -vx
# $Id$
# Copyright 2017 Karl Berry <tex-live@tug.org>
# Copyright 2013, 2014 Peter Breitenlohner <tex-live@tug.org>
# You may freely use, modify and/or distribute this file.

TEXMFCNF=$srcdir/../kpathsea
DVIPDFMXINPUTS=$srcdir/tests:$srcdir/data
export TEXMFCNF DVIPDFMXINPUTS

testsrc=$srcdir/tests

failed=

rm -f pic*.*

# list of file types
ext='bmp jp2 jpeg pdf png'

for e in $ext; do
	cp $testsrc/image.$e pic$e.$e
done

echo "*** xdvipdfmx --ebb --version" \
	&& ./xdvipdfmx --ebb --version \
	&& echo && echo "ebb-version tests OK" && echo \
	|| failed="$failed ebb-version"

echo "*** xdvipdfmx --ebb --help" \
	&& ./xdvipdfmx --ebb --help \
	&& echo && echo "ebb-help tests OK" && echo \
	|| failed="$failed ebb-help"

# get rid of both %%Creator: and %%CreationDate: lines.
for e in $ext; do
	echo "*** xdvipdfmx --ebb pic$e.$e" \
	&& ./xdvipdfmx --ebb pic$e.$e \
	&& sed '/^%%Creat/d' pic$e.bb >pic$e.bbx \
	&& diff $testsrc/pic$e.bb pic$e.bbx \
	&& echo && echo "ebb-$e tests OK" && echo \
	|| failed="$failed ebb-$e"
done

echo "*** xdvipdfmx --xbb --version" \
	&& ./xdvipdfmx --xbb --version \
	&& echo && echo "xbb-version tests OK" && echo \
	|| failed="$failed xbb-version"

echo "*** xdvipdfmx --xbb --help" \
	&& ./xdvipdfmx --xbb --help \
	&& echo && echo "xbb-help tests OK" && echo \
	|| failed="$failed xbb-help"

for e in $ext; do
	echo "*** xdvipdfmx --xbb img$e.$e" \
	&& ./xdvipdfmx --xbb pic$e.$e \
	&& sed '/^%%Creat/d' pic$e.xbb >pic$e.xbbx \
	&& diff $testsrc/pic$e.xbb pic$e.xbbx \
	&& echo && echo "xbb-$e tests OK" && echo \
	|| failed="$failed xbb-$e"
done

test -z "$failed" && exit 0
echo
echo "failed tests:$failed"
exit 1