Improved interface

This commit is contained in:
Eduard Urbach 2024-03-11 22:08:28 +01:00
parent cd70550a0a
commit 6db2852d9e
Signed by: eduard
GPG key ID: 49226B848C78F6C8
5 changed files with 58 additions and 20 deletions

View file

@ -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