File: style_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 (21 lines) | stat: -rw-r--r-- 536 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
// Copyright 2016 Canonical Ltd.
// Licensed under the LGPLv3, see LICENCE file for details.

package ansiterm

import gc "gopkg.in/check.v1"

type styleSuite struct{}

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

func (*styleSuite) TestString(c *gc.C) {
	c.Check(Bold.String(), gc.Equals, "bold")
	c.Check(Strikethrough.String(), gc.Equals, "strikethrough")
	var blank Style
	c.Check(blank.String(), gc.Equals, "")
	var huge Style = 1234
	c.Check(huge.String(), gc.Equals, "")
	var negative Style = -1
	c.Check(negative.String(), gc.Equals, "")
}