-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
cute_test.go
66 lines (57 loc) · 1.5 KB
/
cute_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
package cute
import (
"errors"
"testing"
)
// Test equality of CuteColor type.
func TestCuteColorType(t *testing.T) {
redColor := CuteColor("\033[31m")
if Red != redColor {
t.Fail()
}
}
// Test show case.
func TestCuteFunctions(t *testing.T) {
Println("Println", "Hi! i'm", "Zaki")
Printf("Printf", "UID is %v\n", 1399745)
SetTitleColor(BrightBlue)
SetMessageColor(BrightGreen)
Printlns("Printlns", "Line1", "Line2", "Line3")
Println("Println: No lines")
Printlns("Printlns: No lines")
list := NewList(BrightBlue, "Yummy Juice!")
list.Add(BrightRed, "4 strawberry")
list.Add(BrightGreen, "1 avocado")
list.Addf(White, "%d ml %s", 500, "milk")
list.Print()
Check("Error", errors.New("This is a cute panic!"))
}
// test unicode in title
func TestCuteTitleUnicode(t *testing.T) {
// arabic
Println("﴾ الله خالِقُ كُلِّ شيء ﴿")
// frensh
Println("délicieux pain français")
// spanish
Println("¡Hola! español")
// german
Println("ich möchte Kaffee")
// chinese (simplified)
Println("中国的长城")
// chinese (traditional)
Println("中國的長城")
// japanese (hiragana)
Println("進撃の巨人 すばらしい")
// russian
Println("русская литература")
// turkish
Println("türk şarküteri")
// korean
Println("한국라면 맛있다")
// hindi (devanagari)
Println("मसालों की भूमि")
// emoji
Println("✅ 🚀")
// complex
Println("sweet | sucré | süß | 甜的 | 甘い | मीठा | حلو | 🍬")
}