summaryrefslogtreecommitdiff
path: root/Build/source/texk/dviout-util/dvispc.test
blob: 452962ead149ff73ebacac08966c7c8875d76059 (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
#! /bin/sh -vx
# $Id$
# Copyright (C) 2018 Japanese TeX Development Community <issue@texjp.org>
# You may freely use, modify and/or distribute this file.

testdir=$srcdir/tests

./dvispc -s $testdir/test.dvi xtest.spc && \
  diff $testdir/test.spc xtest.spc && echo || exit 1

./dvispc -s $testdir/test.dvi > x1test.spc && \
  diff $testdir/test.spc x1test.spc && echo || exit 2

## invalid usage
#./dvispc -s < $testdir/test.dvi x2test.spc && \
#  diff $testdir/test.spc x2test.spc && echo || exit 3

## stdin is a DVI, random access may not be supported, no test
#./dvispc -s < $testdir/test.dvi > x3test.spc && \
#  diff $testdir/test.spc x3test.spc && echo || exit 4

./dvispc -c $testdir/test.dvi xtestout.dvi && \
  cmp $testdir/testout.dvi xtestout.dvi && echo || exit 5

./dvispc -c $testdir/test.dvi > x1testout.dvi && \
  cmp $testdir/testout.dvi x1testout.dvi && echo || exit 6

## invalid usage
#./dvispc -c < $testdir/test.dvi x2testout.dvi && \
#  cmp $testdir/testout.dvi x2testout.dvi && echo || exit 7

## stdin is a DVI, random access may not be supported, no test
#./dvispc -c < $testdir/test.dvi > x3testout.dvi && \
#  cmp $testdir/testout.dvi x3testout.dvi && echo || exit 8

./dvispc -a $testdir/test.dvi xtesta.txt && \
  ./dvispc -x xtesta.txt xtestax.dvi && \
  cmp $testdir/test.dvi xtestax.dvi && echo || exit 9

./dvispc -a $testdir/test.dvi > x1testa.txt && \
  ./dvispc -x < x1testa.txt > x1testax.dvi && \
  cmp $testdir/test.dvi x1testax.dvi && echo || exit 10

exit 0