-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefaultset_test.go
69 lines (60 loc) · 1.55 KB
/
defaultset_test.go
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
package defaultset
import (
"testing"
)
func TestRed(t *testing.T) {
expected := "\033[31m\033[01mtest\033[0m"
result := Red("test")
if result != expected {
t.Errorf("Red(\"test\") = %v; want %v", result, expected)
}
}
func TestGreen(t *testing.T) {
expected := "\033[32m\033[01mtest\033[0m"
result := Green("test")
if result != expected {
t.Errorf("Green(\"test\") = %v; want %v", result, expected)
}
}
func TestDarkGreen(t *testing.T) {
expected := "\033[32m\033[02mtest\033[0m"
result := DarkGreen("test")
if result != expected {
t.Errorf("DarkGreen(\"test\") = %v; want %v", result, expected)
}
}
func TestYellow(t *testing.T) {
expected := "\033[33m\033[01mtest\033[0m"
result := Yellow("test")
if result != expected {
t.Errorf("Yellow(\"test\") = %v; want %v", result, expected)
}
}
func TestBlue(t *testing.T) {
expected := "\033[36m\033[01mtest\033[0m"
result := Blue("test")
if result != expected {
t.Errorf("Blue(\"test\") = %v; want %v", result, expected)
}
}
func TestPurple(t *testing.T) {
expected := "\033[35m\033[01mtest\033[0m"
result := Purple("test")
if result != expected {
t.Errorf("Purple(\"test\") = %v; want %v", result, expected)
}
}
func TestCyan(t *testing.T) {
expected := "\033[36m\033[01mtest\033[0m"
result := Cyan("test")
if result != expected {
t.Errorf("Cyan(\"test\") = %v; want %v", result, expected)
}
}
func TestWhite(t *testing.T) {
expected := "\033[37m\033[01mtest\033[0m"
result := White("test")
if result != expected {
t.Errorf("White(\"test\") = %v; want %v", result, expected)
}
}