-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathruntests
executable file
·99 lines (92 loc) · 2.42 KB
/
runtests
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
#!/bin/bash
# $Id: runtests,v 1.6 2016/04/13 02:09:30 bediger Exp $
rm -rf output
mkdir output
for TNAME in zoo/*.php
do
echo test $TNAME
B=$(basename ${TNAME%.*})
OUTPUT=output/$B.out
DESIRED=desired/$B.out
./revphp -R $TNAME > $OUTPUT
if diff -q $OUTPUT $DESIRED
then
:
else
echo Problem with test $TNAME
echo "# diff {output,desired}/$B.out"
#exit 1
fi
done
echo Complicated test t1.php
./revphp -D tests/zork.php tests/t1.php > output/t1.out
if diff -q output/t1.out desired/t1.out
then
:
else
echo Problem with complicated test t1.php
echo "# diff {output,desired}/t1.out"
fi
echo Complicated test t1_1.php
./revphp -r zork -D tests/zork.php tests/t1_1.php > output/t1_1.out
if diff -q output/t1_1.out desired/t1_1.out
then
:
else
echo Problem with complicated test t1_1.php
echo "# diff {output,desired}/t1_1.out"
fi
echo Complicated test f3x.php
./revphp -f l__3 -f l__14 -f l__15 -f l__18 -r _1825599023 -D tests/f3xdecode.php tests/f3x.php > output/f3x.out
if diff -q output/f3x.out desired/f3x.out
then
:
else
echo Problem with complicated test f3x.php
echo "# diff {output,desired}/f3x.out"
fi
echo Complicated test concat.php
./revphp -D tests/zork.php tests/concat.php > output/concat.out
if diff -q output/concat.out desired/concat.out
then
:
else
echo Problem with complicated test concat.php
echo "# diff {output,desired}/concat.out"
fi
echo Complicated test x.php
./revphp -D tests/xdecode.php tests/x.php > output/x.out
if diff -q output/x.out desired/x.out
then
:
else
echo Problem with complicated test x.php
echo "# diff {output,desired}/x.out"
fi
echo Complicated test appendconcat
./revphp -D tests/xdecode.php tests/appendconcat.php > output/appendconcat.out
if diff -q output/appendconcat.out desired/appendconcat.out
then
:
else
echo Problem with complicated test appendconcat.php
echo "# diff {output,desired}/appendconcat.out"
fi
echo Complicated test arrayassign in a function
./revphp -D tests/xdecode.php tests/arrayassign.php > output/arrayassign.out
if diff -q output/arrayassign.out desired/arrayassign.out
then
:
else
echo Problem with complicated test arrayassign.php
echo "# diff {output,desired}/arrayassign.out"
fi
echo Complicated test replace function name
./revphp -F grobius=obvious tests/replfname.php > output/replfname.out
if diff -q output/replfname.out desired/replfname.out
then
:
else
echo Problem with complicated test replfname.php
echo "# diff {output,desired}/replfname.out"
fi