func TestSessionOutput(t *testing.T) {
	conn := dial(fixedOutputHandler, t)
	defer conn.Close()
	session, err := conn.NewSession()
	if err != nil {
		t.Fatalf("Unable to request new session: %v", err)
	}
	defer session.Close()

	buf, err := session.Output("") // cmd is ignored by fixedOutputHandler
	if err != nil {
		t.Error("Remote command did not exit cleanly:", err)
	}
	w := "this-is-stdout."
	g := string(buf)
	if g != w {
		t.Error("Remote command did not return expected string:")
		t.Logf("want %q", w)
		t.Logf("got  %q", g)
	}
}
// Test that a simple string is returned via the Output helper,
// and that stderr is discarded.
Test that a simple string is returned via the Output helper,
and that stderr is discarded.
// Test that a simple string is returned via the Output helper // and that stderr is discarded .
func TestSessionOutput(t *testing.T) {
	conn := dial(fixedOutputHandler, t)
	defer conn.Close()
	session, err := conn.NewSession()
	if err != nil {
		t.Fatalf("Unable to request new session: %v", err)
	}
	defer session.Close()
	buf, err := session.Output("") 
	if err != nil {
		t.Error("Remote command did not exit cleanly:", err)
	}
	w := "this-is-stdout."
	g := string(buf)
	if g != w {
		t.Error("Remote command did not return expected string:")
		t.Logf("want %q", w)
		t.Logf("got  %q", g)
	}
}
func TestSessionOutput ( t * testing . T ) { conn := dial ( fixedOutputHandler , t ) defer conn . Close ( ) session , err := conn . NewSession ( ) if err != nil { t . Fatalf ( " " , err ) } defer session . Close ( ) buf , err := session . Output ( " " ) if err != nil { t . Error ( " " , err ) } w := " " g := string ( buf ) if g != w { t . Error ( " " ) t . Logf ( " " , w ) t . Logf ( " " , g ) } }
Test that a simple string is returned via the Output helper,
and that stderr is discarded.
Test that a simple string is returned via the Output helper and that stderr is discarded .
// cmd is ignored by fixedOutputHandler