-
Notifications
You must be signed in to change notification settings - Fork 1
/
testContainers.sh
executable file
·51 lines (44 loc) · 1.52 KB
/
testContainers.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
#! /bin/sh
BLUE=$'\e[0;36m'
NC=$'\e[0m'
echo "~ Makefile is compiling ~\n";
make re
rm -rf results/*.txt
./containers_test
echo "~ Test diff output from std::vector and your work ~";
if diff results/vector_ft.txt results/vector_std.txt > /dev/null;then
echo "${BLUE}No differences${NC}";
else
diff results/vector_ft.txt results/vector_std.txt > results/vector_diff.txt
echo "${BLUE}Try again${NC}";
fi
echo "~ Test diff output from std::list and your work ~";
if diff results/list_ft.txt results/list_std.txt > /dev/null;then
echo "${BLUE}No differences${NC}";
else
diff results/list_ft.txt results/list_std.txt > results/list_diff.txt
echo "${BLUE}Try again${NC}";
fi
echo "~ Test diff output from std::stack and your work ~";
if diff results/stack_ft.txt results/stack_std.txt > /dev/null;then
echo "${BLUE}No differences${NC}";
else
diff results/stack_ft.txt results/stack_std.txt > results/stack_diff.txt
echo "${BLUE}Try again${NC}";
fi
echo "~ Test diff output from std::queue and your work ~";
if diff results/queue_ft.txt results/queue_std.txt > /dev/null;then
echo "${BLUE}No differences${NC}";
else
diff results/queue_ft.txt results/queue_std.txt > results/queue_diff.txt
echo "${BLUE}Try again${NC}";
fi
echo "~ Test diff output from std::map and your work ~";
if diff results/map_ft.txt results/map_std.txt > /dev/null;then
echo "${BLUE}No differences${NC}";
else
diff results/map_ft.txt results/map_std.txt > results/map_diff.txt
echo "${BLUE}Try again${NC}";
fi
echo "";
make fclean