Improved interface
This commit is contained in:
parent
cd70550a0a
commit
6db2852d9e
5 changed files with 58 additions and 20 deletions
|
@ -36,6 +36,20 @@ func TestPrint(t *testing.T) {
|
|||
color.RGB(0, 0, 1).Print("blue\n")
|
||||
}
|
||||
|
||||
func TestPrintf(t *testing.T) {
|
||||
color.Terminal = true
|
||||
|
||||
color.RGB(1, 0, 0).Printf("%s\n", "red")
|
||||
color.RGB(0, 1, 0).Printf("%s\n", "green")
|
||||
color.RGB(0, 0, 1).Printf("%s\n", "blue")
|
||||
|
||||
color.Terminal = false
|
||||
|
||||
color.RGB(1, 0, 0).Printf("%s\n", "red")
|
||||
color.RGB(0, 1, 0).Printf("%s\n", "green")
|
||||
color.RGB(0, 0, 1).Printf("%s\n", "blue")
|
||||
}
|
||||
|
||||
func TestPrintln(t *testing.T) {
|
||||
color.Terminal = true
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue