-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_maps.sh
More file actions
executable file
·103 lines (85 loc) · 2.43 KB
/
test_maps.sh
File metadata and controls
executable file
·103 lines (85 loc) · 2.43 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
#!/bin/bash
printf "\e[32mDo you want to run valgrind with the tests? (y/n) \e[0m"
read yn
if [[ $yn =~ ^[Yy]$ ]]
then
printf "\nRunning so long with valgrind...\n\n"
VALGRIND="valgrind --leak-check=full --show-leak-kinds=all"
else
VALGRIND=
fi
printf "Opening map with 2 exits.\n\n"
$VALGRIND ./so_long maps/2exits.ber
printf "\n\n"
printf "\e[32mPress enter to continue\e[0m."
read
printf "Opening map with 2 players.\n\n"
$VALGRIND ./so_long maps/2players.ber
printf "\n\n"
printf "\e[32mPress enter to continue\e[0m."
read
printf "Opening map that isn't a rectangular shape.\n\n"
$VALGRIND ./so_long maps/line_size.ber
printf "\n\n"
printf "\e[32mPress enter to continue\e[0m."
read
printf "Opening map without collectibles.\n\n"
$VALGRIND ./so_long maps/no_clt.ber
printf "\n\n"
printf "\e[32mPress enter to continue\e[0m."
read
printf "Opening map without an exit.\n\n"
$VALGRIND ./so_long maps/no_exit.ber
printf "\n\n"
printf "\e[32mPress enter to continue\e[0m."
read
printf "Opening map without a path to exit.\n\n"
$VALGRIND ./so_long maps/no_path.ber
printf "\n\n"
printf "\e[32mPress enter to continue\e[0m."
read
printf "Opening map without a path to a collectible.\n\n"
$VALGRIND ./so_long maps/no_path_clt.ber
printf "\n\n"
printf "\e[32mPress enter to continue\e[0m."
read
printf "Opening map without a player.\n\n"
$VALGRIND ./so_long maps/no_plr.ber
printf "\n\n"
printf "\e[32mPress enter to continue\e[0m."
read
printf "Opening map not surrounded by walls.\n\n"
$VALGRIND ./so_long maps/no_wall.ber
printf "\n\n"
printf "\e[32mPress enter to continue\e[0m."
read
printf "Opening map with a wrong character.\n\n"
$VALGRIND ./so_long maps/wrong_char.ber
printf "\n\n"
printf "\e[32mPress enter to continue\e[0m."
read
printf "Starting maps that work...\n"
printf "Opening map square shape (3x3).\n\n"
$VALGRIND ./so_long maps/square.ber
printf "\n\n"
printf "\e[32mPress enter to continue\e[0m."
read
printf "Opening rectangular map on a vertical.\n\n"
$VALGRIND ./so_long maps/rectangular_vert.ber
printf "\n\n"
printf "\e[32mPress enter to continue\e[0m."
read
printf "Opening map test 1.\n\n"
$VALGRIND ./so_long maps/test.ber
printf "\n\n"
printf "\e[32mPress enter to continue\e[0m."
read
printf "Opening map test 2.\n\n"
$VALGRIND ./so_long maps/test2.ber
printf "\n\n"
printf "\e[32mPress enter to continue\e[0m."
read
printf "Opening map test 3.\n\n"
$VALGRIND ./so_long maps/test3.ber
printf "\n\n"
printf "End of tests.\n"