File: color_test.go

package info (click to toggle)
golang-github-juju-ansiterm 1.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 176 kB
  • sloc: makefile: 9
file content (22 lines) | stat: -rw-r--r-- 589 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Copyright 2016 Canonical Ltd.
// Licensed under the LGPLv3, see LICENCE file for details.

package ansiterm

import gc "gopkg.in/check.v1"

type colorSuite struct{}

var _ = gc.Suite(&colorSuite{})

func (*colorSuite) TestString(c *gc.C) {
	c.Check(Default.String(), gc.Equals, "default")
	c.Check(Yellow.String(), gc.Equals, "yellow")
	c.Check(BrightMagenta.String(), gc.Equals, "brightmagenta")
	var blank Color
	c.Check(blank.String(), gc.Equals, "")
	var huge Color = 1234
	c.Check(huge.String(), gc.Equals, "")
	var negative Color = -1
	c.Check(negative.String(), gc.Equals, "")
}