Skip to content

Commit 02c98f1

Browse files
committed
up: update tests on windows OS. update readme
1 parent 9f91073 commit 02c98f1

File tree

4 files changed

+23
-6
lines changed

4 files changed

+23
-6
lines changed

.github/workflows/go.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: ${{ matrix.os }}
1515
strategy:
1616
matrix:
17-
go_version: [1.11, 1.12, 1.13, 1.14, 1.15]
17+
go_version: [1.11, 1.12, 1.13, 1.14, 1.15, 1.16]
1818
os: [ubuntu-latest, windows-latest, macOS-latest]
1919

2020
steps:

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,12 @@ there are some useful functions reference
435435
- `RgbToHex(rgb []int) string` Convert RGB to hex code
436436
- More useful func please see https://pkg.go.dev/github.com/gookit/color
437437

438+
## Project use
439+
440+
Check out these projects, which use https://github.com/gookit/color :
441+
442+
- https://github.com/Delta456/box-cli-maker Make Highly Customized Boxes for your CLI
443+
438444
## Gookit packages
439445

440446
- [gookit/ini](https://github.com/gookit/ini) Go config management, use INI files

README.zh-CN.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,12 @@ s.Printf("style with %s\n", "options")
403403
- `RgbToHex(rgb []int) string` Convert RGB to hex code
404404
- 更多请查看文档 https://pkg.go.dev/github.com/gookit/color
405405

406+
## 使用color的项目
407+
408+
看看这些使用了 https://github.com/gookit/color 的项目:
409+
410+
- https://github.com/Delta456/box-cli-maker Make Highly Customized Boxes for your CLI
411+
406412
## Gookit 工具包
407413

408414
- [gookit/ini](https://github.com/gookit/ini) INI配置读取管理,支持多文件加载,数据覆盖合并, 解析ENV变量, 解析变量引用

utils_test.go

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,18 +55,20 @@ ZSH_TMUX_TERM=screen-256color
5555
is.True(IsSupport16Color())
5656
is.True(IsSupportColor())
5757
})
58+
}
59+
60+
func TestIsDetectColorLevel_unix(t *testing.T) {
61+
if IsWindows() {
62+
return
63+
}
64+
is := assert.New(t)
5865

59-
// TERM
6066
mockOsEnvByText("TERM=screen-256color", func() {
6167
is.Equal(Level256, DetectColorLevel())
6268
is.False(IsSupportTrueColor())
6369
is.True(IsSupport256Color())
6470
is.True(IsSupportColor())
6571
})
66-
}
67-
68-
func TestIsDetectColorLevel_unix(t *testing.T) {
69-
is := assert.New(t)
7072

7173
// TERM_PROGRAM=Terminus
7274
mockOsEnvByText(`
@@ -122,6 +124,9 @@ ZSH_TMUX_TERM=screen-256color
122124
}
123125

124126
func TestIsDetectColorLevel_screen(t *testing.T) {
127+
if IsWindows() {
128+
return
129+
}
125130
is := assert.New(t)
126131

127132
// TERM_PROGRAM=Apple_Terminal use screen

0 commit comments

Comments
 (0)