Skip to content

Commit

Permalink
tests: log value of IsTerminal
Browse files Browse the repository at this point in the history
Just log the output of IsTerminal in TestTerminal.

$ go test -v -run TestTerminal
=== RUN   TestTerminal
    isatty_others_test.go:13: os.Stdout: true
--- PASS: TestTerminal (0.00s)
PASS
ok  	github.com/mattn/go-isatty	0.160s
$ go test -v -run TestTerminal | cat
=== RUN   TestTerminal
    isatty_others_test.go:13: os.Stdout: false
--- PASS: TestTerminal (0.00s)
PASS
ok  	github.com/mattn/go-isatty	0.203s
  • Loading branch information
dolmen committed Mar 22, 2023
1 parent 72a590e commit 42997b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion isatty_others_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

func TestTerminal(t *testing.T) {
// test for non-panic
IsTerminal(os.Stdout.Fd())
t.Log("os.Stdout:", IsTerminal(os.Stdout.Fd()))
}

func TestCygwinPipeName(t *testing.T) {
Expand Down

0 comments on commit 42997b3

Please sign in to comment.