forked from mathog/libUEMF
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtestit.sh
More file actions
74 lines (73 loc) · 2.02 KB
/
testit.sh
File metadata and controls
74 lines (73 loc) · 2.02 KB
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
68
69
70
71
72
73
74
#!/bin/bash
# (The preceding line may need to be modified. On Solaris it is probably /usr/bin/bash)
#
# Test all programs against reference. If all is working correctly
# each output line should end with "are identical".
#
# NOTE! On windows text files may differ by having \n\r instead of \n, which is
# why there is a "b" in the diff.
#
# Edit the following 4 lines as needed.
# diff is gnu diff
# extract & execinput are from http://sourceforge.net/projects/drmtools/
# EPATH is the path to the binaries built by this package
#EPATH=/usr/local/bin
EPATH=${PWD}/bin
#EPATH=.
USEDIFF=`which diff`
EXTRACT=/usr/local/bin/extract
EXECINPUT=/usr/local/bin/execinput
export LD_LIBRARY_PATH=${PWD}/lib
PROBLEMS=0
if [ ! -x $EPATH/testbed_emf ]
then
echo "testit.sh: set EPATH in script, testbed_emf not found!"
PROBLEMS=1
fi
if [ ! -x $EXTRACT ]
then
echo "testit.sh: drm_tools 'extract' program not found. "
PROBLEMS=1
fi
if [ ! -x $EXECINPUT ]
then
echo "testit.sh: drm_tools 'extract' program not found. "
PROBLEMS=1
fi
if [ $PROBLEMS -eq 1 ]
then
exit
fi
#
$EPATH/testbed_emf 4 >/dev/null
mv test_libuemf.emf test_libuemf30.emf
$EPATH/testbed_emf 0 >/dev/null
$EPATH/reademf test_libuemf.emf >test_libuemf_emf.txt
$EPATH/reademf test_libuemf30.emf >test_libuemf30_emf.txt
$EPATH/testbed_wmf 0 >/dev/null
$EPATH/readwmf test_libuemf.wmf >test_libuemf_wmf.txt
$EPATH/test_mapmodes_emf -vX 2000 -vY 1000 >/dev/null
$EPATH/testbed_pmf 0 >/dev/null
$EPATH/reademf test_libuemf_p.emf >test_libuemf_p_emf.txt
ls -1 test*ref* | \
$EXTRACT -fmt " $USEDIFF -bqs [1,] [rtds_ref:1,]" | \
$EXECINPUT
#
# clean up
#
rm -f test_libuemf30.emf
rm -f test_libuemf.emf
rm -f test_libuemf_p.emf
rm -f test_libuemf.wmf
rm -f test_libuemf30_emf.txt
rm -f test_libuemf_emf.txt
rm -f test_libuemf_p_emf.txt
rm -f test_libuemf_wmf.txt
rm -f test_mm_anisotropic.emf
rm -f test_mm_hienglish.emf
rm -f test_mm_himetric.emf
rm -f test_mm_isotropic.emf
rm -f test_mm_loenglish.emf
rm -f test_mm_lometric.emf
rm -f test_mm_text.emf
rm -f test_mm_twips.emf