github.com/4396/glide@v0.13.1-0.20171021123830-906b620caf19/action/about_test.go (about) 1 package action 2 3 import ( 4 "bytes" 5 "testing" 6 7 "github.com/4396/glide/msg" 8 ) 9 10 func TestAbout(t *testing.T) { 11 var buf bytes.Buffer 12 old := msg.Default.Stdout 13 msg.Default.Stdout = &buf 14 About() 15 16 if buf.Len() < len(aboutMessage) { 17 t.Errorf("expected this to match aboutMessage: %q", buf.String()) 18 } 19 20 msg.Default.Stdout = old 21 }