-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathraindrops_test.sh
More file actions
128 lines (109 loc) · 2.52 KB
/
raindrops_test.sh
File metadata and controls
128 lines (109 loc) · 2.52 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
#!/usr/bin/env bash
@test "the sound for 1 is 1" {
#skip
run bash raindrops.sh 1
[ "$status" -eq 0 ]
[ "$output" == "1" ]
}
@test "the sound for 3 is Pling" {
skip
run bash raindrops.sh 3
[ "$status" -eq 0 ]
[ "$output" == "Pling" ]
}
@test "the sound for 5 is Plang" {
skip
run bash raindrops.sh 5
[ "$status" -eq 0 ]
[ "$output" == "Plang" ]
}
@test "the sound for 7 is Plong" {
skip
run bash raindrops.sh 7
[ "$status" -eq 0 ]
[ "$output" == "Plong" ]
}
@test "the sound for 6 is Pling as it has a factor 3" {
skip
run bash raindrops.sh 6
[ "$status" -eq 0 ]
[ "$output" == "Pling" ]
}
@test "2 to the power 3 does not make a raindrop sound as 3 is the exponent not the base" {
skip
run bash raindrops.sh 8
[ "$status" -eq 0 ]
[ "$output" == "8" ]
}
@test "the sound for 9 is Pling as it has a factor 3" {
skip
run bash raindrops.sh 9
[ "$status" -eq 0 ]
[ "$output" == "Pling" ]
}
@test "the sound for 10 is Plang as it has a factor 5" {
skip
run bash raindrops.sh 10
[ "$status" -eq 0 ]
[ "$output" == "Plang" ]
}
@test "the sound for 14 is Plong as it has a factor of 7" {
skip
run bash raindrops.sh 14
[ "$status" -eq 0 ]
[ "$output" == "Plong" ]
}
@test "the sound for 15 is PlingPlang as it has factors 3 and 5" {
skip
run bash raindrops.sh 15
[ "$status" -eq 0 ]
[ "$output" == "PlingPlang" ]
}
@test "the sound for 21 is PlingPlong as it has factors 3 and 7" {
skip
run bash raindrops.sh 21
[ "$status" -eq 0 ]
[ "$output" == "PlingPlong" ]
}
@test "the sound for 25 is Plang as it has a factor 5" {
skip
run bash raindrops.sh 25
[ "$status" -eq 0 ]
[ "$output" == "Plang" ]
}
@test "the sound for 27 is Pling as it has a factor 3" {
skip
run bash raindrops.sh 27
[ "$status" -eq 0 ]
[ "$output" == "Pling" ]
}
@test "the sound for 35 is PlangPlong as it has factors 5 and 7" {
skip
run bash raindrops.sh 35
[ "$status" -eq 0 ]
[ "$output" == "PlangPlong" ]
}
@test "the sound for 49 is Plong as it has a factor 7" {
skip
run bash raindrops.sh 49
[ "$status" -eq 0 ]
[ "$output" == "Plong" ]
}
@test "the sound for 52 is 52" {
skip
run bash raindrops.sh 52
[ "$status" -eq 0 ]
[ "$output" == "52" ]
}
@test "the sound for 105 is PlingPlangPlong as it has factors 3, 5 and 7" {
skip
run bash raindrops.sh 105
[ "$status" -eq 0 ]
[ "$output" == "PlingPlangPlong" ]
}
@test "the sound for 3125 is Plang as it has a factor 5" {
skip
run bash raindrops.sh 3125
[ "$status" -eq 0 ]
[ "$output" == "Plang" ]
}