This repository was archived by the owner on Jul 28, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtester
More file actions
executable file
·156 lines (155 loc) · 4.85 KB
/
tester
File metadata and controls
executable file
·156 lines (155 loc) · 4.85 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
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
#!/bin/bash
if [ -z "$1" ]; then
printf "USAGE: %s [tests 1-14]\n" "$0" > /dev/stderr
false
elif [ "$1" == "1" ]; then
pushd 2\ -\ Data\ Types\ and\ Variables > /dev/null
pushd tdd/test > /dev/null
cp ../camper/camper_age_input.py . > /dev/null
printf "1: camper_age_input.py, 2: test_functions.py\n"
./test_functions.py
rm -f camper_age_input.py > /dev/null
popd > /dev/null
popd > /dev/null
true
elif [ "$1" == "2" ]; then
pushd 3\ -\ Strings,\ Basic\ IO,\ Operators > /dev/null
pushd io/test > /dev/null
cp ../average_scores/average_scores.py . > /dev/null
printf "1: average_scores.py, 2: test.py\n"
./test.py
rm -f average_scores.py > /dev/null
popd > /dev/null
popd > /dev/null
true
elif [ "$1" == "3" ]; then
pushd 4\ -\ Conditional\ Operators > /dev/null
pushd Input\ Validation/test > /dev/null
cp ../input_validation/validation_with_if.py . > /dev/null
printf "1: validation_with_if.py, 2: test_validation_with_if.py\n"
./test_validation_with_if.py
rm -f validation_with_if.py > /dev/null
popd > /dev/null
popd > /dev/null
true
elif [ "$1" == "4" ]; then
pushd 4\ -\ Conditional\ Operators > /dev/null
pushd Nested\ If/test > /dev/null
cp ../store/coupon_calculations.py . > /dev/null
printf "1: coupon_calculations.py, 2: test_coupon_calculations.py\n"
./test_coupon_calculations.py
rm -f coupon_calculations.py > /dev/null
popd > /dev/null
popd > /dev/null
true
elif [ "$1" == "5" ]; then
pushd 4\ -\ Conditional\ Operators > /dev/null
pushd Try/test > /dev/null
cp ../validation_try/validation_with_try.py . > /dev/null
printf "1: validation_with_try.py, 2: test_validation_with_try.py\n"
./test_validation_with_try.py
rm -f validation_with_try > /dev/null
popd > /dev/null
popd > /dev/null
true
elif [ "$1" == "6" ]; then
pushd 5\ -\ Loops > /dev/null
pushd input/test > /dev/null
cp ../input_loops/average_input_scores.py . > /dev/null
printf "1: average_input_scores.py, 2: test_loop.py\n"
./test_loop.py
rm -f average_input_scores.py > /dev/null
popd > /dev/null
popd > /dev/null
true
elif [ "$1" == "7" ]; then
pushd 6\ -\ Functions > /dev/null
pushd Module6/test_functions > /dev/null
cp ../more_functions/string_functions.py . > /dev/null
printf "1: string_functions.py, 2: test_string_functions.py\n"
./test_string_functions.py
rm -f string_functions.py > /dev/null
popd > /dev/null
popd > /dev/null
true
elif [ "$1" == "8" ]; then
pushd 6\ -\ Functions > /dev/null
pushd Inner\ Functions/test > /dev/null
cp ../inner_functions/inner_functions_assignment.py . > /dev/null
printf "1: inner_functions_assignment.py, 2: test_inner_functions.py\n"
./test_inner_functions.py
rm -f inner_functions_assignment.py > /dev/null
popd > /dev/null
popd > /dev/null
true
elif [ "$1" == "9" ]; then
pushd 7\ -\ Collections > /dev/null
pushd Module7/test_collections > /dev/null
cp ../fun_with_collections/basic_list.py . > /dev/null
printf "1: basic_list.py, 2: test_basic_list.py\n"
./test_basic_list.py
rm -f basic_list.py > /dev/null
popd > /dev/null
popd > /dev/null
true
elif [ "$1" == "10" ]; then
pushd 8\ -\ Sets\ and\ Dictionaries > /dev/null
pushd Module8/test > /dev/null
cp ../more_fun_with_collections/set_membership.py . > /dev/null
printf "1: set_membership.py, 2: test_set_membership.py\n"
./test_set_membership.py
rm -f set_membership.py > /dev/null
popd > /dev/null
popd > /dev/null
true
elif [ "$1" == "11" ]; then
pushd 8\ -\ Sets\ and\ Dictionaries > /dev/null
pushd Module8/test > /dev/null
cp ../more_fun_with_collections/dict_membership.py . > /dev/null
printf "1: dict_membership.py, 2: test_dict_membership.py\n"
./test_dict_membership.py
rm -f dict_membership.py > /dev/null
popd > /dev/null
popd > /dev/null
true
elif [ "$1" == "12" ]; then
pushd 8\ -\ Sets\ and\ Dictionaries > /dev/null
pushd Module8/test_date_time > /dev/null
cp ../date_time/birthday.py . > /dev/null
printf "1: birthday.py, 2: test_birthday.py\n"
./test_birthday.py
rm -f birthday.py > /dev/null
popd > /dev/null
popd > /dev/null
true
elif [ "$1" == "13" ]; then
pushd 10\ -\ OOP > /dev/null
pushd Module10/test > /dev/null
cp ../class_definitions/student.py . > /dev/null
printf "1: student.py, 2: test_student.py\n"
./test_student.py
rm -f student.py > /dev/null
popd > /dev/null
popd > /dev/null
true
elif [ "$1" == "14" ]; then
pushd 12\ -\ Abstraction > /dev/null
pushd Module12/test_custom_exceptions > /dev/null
cp ../custom_exceptions/customer_exceptions.py . > /dev/null
printf "1: customer_exceptions.py, 2: test_customer_exceptions.py\n"
./test_customer_exceptions.py
rm -f customer_exceptions.py > /dev/null
popd > /dev/null
popd > /dev/null
true
elif [ "$1" == "15" ]; then
pushd 12\ -\ Abstraction > /dev/null
pushd Module12/test_shape > /dev/null
cp ../shape/shape.py . > /dev/null
printf "1: shape.py, 2: test_shape.py\n"
./test_shape.py
rm -f shape.py > /dev/null
popd > /dev/null
popd > /dev/null
true
fi