1
0
mirror of https://github.com/fatih/color.git synced 2024-11-24 08:02:14 +02:00
color/color_test.go

32 lines
435 B
Go
Raw Normal View History

2014-02-17 12:12:32 +03:00
package color
import (
"bufio"
"fmt"
"os"
"time"
"testing"
)
func TestColor(t *testing.T) {
go func() {
scanner := bufio.NewScanner(os.Stdout)
for scanner.Scan() {
fmt.Println(scanner.Text()) // Println will add back the final '\n'
}
}()
time.Sleep(time.Millisecond * 300)
c := Cyan.Bold()
c.Println("ankara")
// New(FgGreen, Bold).Begin()
// fmt.Println("san francisco")
// End()
// Output:
// ankara
}