func TestSessionCombinedOutput(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.CombinedOutput("") // cmd is ignored by fixedOutputHandler
	if err != nil {
		t.Error("Remote command did not exit cleanly:", err)
	}
	const stdout = "this-is-stdout."
	const stderr = "this-is-stderr."
	g := string(buf)
	if g != stdout+stderr && g != stderr+stdout {
		t.Error("Remote command did not return expected string:")
		t.Logf("want %q, or %q", stdout+stderr, stderr+stdout)
		t.Logf("got  %q", g)
	}
}
// Test that both stdout and stderr are returned
// via the CombinedOutput helper.
Test that both stdout and stderr are returned
via the CombinedOutput helper.
// Test that both stdout and stderr are returned // via the CombinedOutput helper .
func TestSessionCombinedOutput(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.CombinedOutput("") 
	if err != nil {
		t.Error("Remote command did not exit cleanly:", err)
	}
	const stdout = "this-is-stdout."
	const stderr = "this-is-stderr."
	g := string(buf)
	if g != stdout+stderr && g != stderr+stdout {
		t.Error("Remote command did not return expected string:")
		t.Logf("want %q, or %q", stdout+stderr, stderr+stdout)
		t.Logf("got  %q", g)
	}
}
func TestSessionCombinedOutput ( 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 . CombinedOutput ( " " ) if err != nil { t . Error ( " " , err ) } const stdout = " " const stderr = " " g := string ( buf ) if g != stdout + stderr && g != stderr + stdout { t . Error ( " " ) t . Logf ( " " , stdout + stderr , stderr + stdout ) t . Logf ( " " , g ) } }
Test that both stdout and stderr are returned
via the CombinedOutput helper.
Test that both stdout and stderr are returned via the CombinedOutput helper .
// cmd is ignored by fixedOutputHandler