forked from Chaostreff-Potsdam/erika3004
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_manual_tests.sh
executable file
·67 lines (54 loc) · 2.97 KB
/
run_manual_tests.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/usr/bin/env bash
###########################################################################################################
####################################### Codified manual tests #############################################
###########################################################################################################
#
# It showed over time that the mock-based tests are not perfect, and some characteristics of python make it
# difficult to test every line of code and be 100% sure about not breaking existing code.
#
# Thus, here's the attempt to provide a set of simple tests, to be run as a bash script, to help a reviewer
# perform at least some checks on the software.
echo """
###########################################
### Erika 3004 tool suite: manual tests ###
###########################################
Please do run the unit tests first!
Then, just play along: press any key once the
program seems to stop, finish any games that
come up.
Afterward, you can be fairly sure everything
is still working!
"
# fail on error
set -e
# print evvery executed command
set -x
./erika.sh -h
./erika.sh demo -h
./erika.sh demo -d
./erika.sh render_ascii_art -h
./erika.sh render_ascii_art -d -f ./tests/test_resources/test_ascii_art.txt
./erika.sh render_ascii_art -d -f ./tests/test_resources/test_ascii_art.txt -s LineByLine
./erika.sh render_ascii_art -d -f ./tests/test_resources/test_ascii_art.txt -s Interlaced
./erika.sh render_ascii_art -d -f ./tests/test_resources/test_ascii_art.txt -s RandomDotFill
./erika.sh render_ascii_art -d -f ./tests/test_resources/test_ascii_art.txt -s PerpendicularSpiralInward
./erika.sh render_ascii_art -d -f ./tests/test_resources/test_ascii_art.txt -s ArchimedeanSpiralOutward
./erika.sh render_image -h
./erika.sh render_image -d -f ./tests/test_resources/test_image_color.bmp
./erika.sh render_image -d -f ./tests/test_resources/test_image_grayscale_1.bmp -s LineByLine
./erika.sh render_image -d -f ./tests/test_resources/test_image_color.bmp -s Interlaced
./erika.sh render_image -d -f ./tests/test_resources/test_image_color.bmp -s RandomDotFill
./erika.sh render_image -d -f ./tests/test_resources/test_image_color.bmp -s PerpendicularSpiralInward
./erika.sh render_image -d -f ./tests/test_resources/test_image_color.bmp -s ArchimedeanSpiralOutward
./erika.sh render_image -h
./erika.sh render_image -d -f ./tests/test_resources/test_image_color.bmp
./erika.sh render_image -d -f ./tests/test_resources/test_image_color.bmp -s LineByLine
./erika.sh render_image -d -f ./tests/test_resources/test_image_color.bmp -s Interlaced
./erika.sh render_image -d -f ./tests/test_resources/test_image_color.bmp -s RandomDotFill
./erika.sh render_image -d -f ./tests/test_resources/test_image_color.bmp -s PerpendicularSpiralInward
./erika.sh render_image -d -f ./tests/test_resources/test_image_color.bmp -s ArchimedeanSpiralOutward
./erika.sh tictactoe -d
echo """
##############################
### Successful manual test ###
##############################"