Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestEcho (0.11 sec)

  1. src/os/exec/exec_test.go

    	if len(args) == 0 {
    		args = []string{"y"}
    	}
    	s := strings.Join(args, " ") + "\n"
    	for {
    		_, err := os.Stdout.WriteString(s)
    		if err != nil {
    			os.Exit(1)
    		}
    	}
    }
    
    func TestEcho(t *testing.T) {
    	t.Parallel()
    
    	bs, err := helperCommand(t, "echo", "foo bar", "baz").Output()
    	if err != nil {
    		t.Errorf("echo: %v", err)
    	}
    	if g, e := string(bs), "foo bar baz\n"; g != e {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 20:13:53 UTC 2024
    - 48.4K bytes
    - Viewed (0)
Back to top