-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.sh
executable file
·53 lines (39 loc) · 1.43 KB
/
.travis.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
#! /bin/bash
# test tool
VENV=testenv
PYTHON3=python3
SCRIPT=akerun-sum
diff_outputfile() {
outfile=$1
orgfile=$2
inputfile=$3
errmasage="err when used [$3] and [$2]"
diff $outfile $orgfile > log
if [ $? -ne 0 ]; then
echo $errmasage
exit $?;
else
rm log
fi
}
init() {
python3 -m pip install .
}
init
python3 -m pip list
which akerun-sum
${SCRIPT} -i test/input-utf8.csv -o output.csv -d 201610 -f 1 || exit $?
diff_outputfile output.csv test/output-utf8.csv test/input-utf8.csv
${SCRIPT} -i test/input-sjis.csv -o output.csv -d 201610 -f 1 || exit $?
diff_outputfile output.csv test/output-sjis.csv test/input-sjis.csv
${SCRIPT} -i test/input-euc.csv -o output.csv -d 201610 -f 1 || exit $?
diff_outputfile output.csv test/output-euc.csv test/input-euc.csv
${SCRIPT} -i test/input-anotherdate.csv -o output.csv -d 201702 -f 1 || exit $?
diff_outputfile output.csv test/output-anotherdate.csv test/input-anotherdate.csv
${SCRIPT} -i test/input-anotherdate.csv -o output.csv -d 201703 -f 1 || exit $?
diff_outputfile output.csv test/output-empty.csv test/input-anotherdate.csv
${SCRIPT} -i test/input-anotherformat.csv -o output.csv -d 201610 -f 0 || exit $?
diff_outputfile output.csv test/output-anotherformat.csv test/input-anotherformat.csv
${SCRIPT} -i test/input-anotherformat.csv -o output.csv -d 201610 || exit $?
diff_outputfile output.csv test/output-anotherformat.csv test/input-anotherformat.csv
rm output.csv