forked from Exiv2/exiv2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathimagetest.sh
executable file
·59 lines (49 loc) · 1.73 KB
/
imagetest.sh
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
#!/usr/bin/env bash
# Test driver for image file i/o
# **********************************************************************
# main
source ./functions.source
( cd "$testdir"
test_files="table.jpg smiley1.jpg smiley2.jpg"
erase_test_files="glider.exv \
iptc-noAPP13.jpg \
iptc-psAPP13-noIPTC.jpg \
iptc-psAPP13-noIPTC-psAPP13-wIPTC.jpg \
iptc-psAPP13s-noIPTC-psAPP13s-wIPTC.jpg \
iptc-psAPP13s-wIPTC-psAPP13s-noIPTC.jpg \
iptc-psAPP13s-wIPTCs-psAPP13s-wIPTCs.jpg \
iptc-psAPP13-wIPTC1-psAPP13-wIPTC2.jpg \
iptc-psAPP13-wIPTCbeg.jpg \
iptc-psAPP13-wIPTCempty.jpg \
iptc-psAPP13-wIPTCempty-psAPP13-wIPTC.jpg \
iptc-psAPP13-wIPTCend.jpg \
iptc-psAPP13-wIPTCmid1-wIPTCempty-wIPTCmid2.jpg \
iptc-psAPP13-wIPTCmid.jpg \
iptc-psAPP13-wIPTC-psAPP13-noIPTC.jpg"
errors=0
echo
printf "Erase all tests"
for i in $test_files $erase_test_files; do eraseTest $i; done
echo
printf "Copy all tests"
c=0
for src in $test_files; do
c=`expr $c + 1`
for dst in $test_files; do copyTest $c $src $dst; done
done
echo
printf "Copy iptc tests"
c=0
for src in $test_files; do
c=`expr $c + 1`
for dst in $test_files; do iptcTest $c $src $dst; done
done
printf "\n---------------------------------------------------------\n"
if [ $errors -eq 0 ]; then
echo 'All test cases passed'
else
echo $errors 'test case(s) failed!'
fi
)
# That's all Folks!
##