Skip to content

Commit

Permalink
F
Browse files Browse the repository at this point in the history
  • Loading branch information
adambabik committed Oct 20, 2024
1 parent 7fb1620 commit 1e0586c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion internal/command/command_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ func disableEcho(uintptr) error {
"and join our Discord server at https://discord.gg/runme if you have further questions!")
}

func signalPgid(int, os.Signal) error { return errors.New("unsupported") }
func signalPgid(int, os.Signal) error { return errors.New("signalPgid: unsupported") }
16 changes: 8 additions & 8 deletions internal/runnerv2client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func TestClient_ExecuteProgram(t *testing.T) {
sessionResp, err := client.CreateSession(
ctx,
&runnerv2.CreateSessionRequest{
Env: []string{"TEST=test1"},
Env: []string{"TEST=test-output-with-session-env"},
},
)
require.NoError(t, err)
Expand All @@ -50,7 +50,7 @@ func TestClient_ExecuteProgram(t *testing.T) {
Commands: &runnerv2.ProgramConfig_CommandList{
Items: []string{
"echo -n $TEST",
">&2 echo -n test2",
">&2 echo -n test-output-with-session-stderr",
},
},
},
Expand All @@ -68,8 +68,8 @@ func TestClient_ExecuteProgram(t *testing.T) {
},
)
require.NoError(t, err)
require.Equal(t, "test1", stdout.String())
require.Equal(t, "test2", stderr.String())
require.Equal(t, "test-output-with-session-env", stdout.String())
require.Equal(t, "test-output-with-session-stderr", stderr.String())
})

t.Run("InputNonInteractive", func(t *testing.T) {
Expand All @@ -96,12 +96,12 @@ func TestClient_ExecuteProgram(t *testing.T) {
ctx,
cfg,
ExecuteProgramOptions{
InputData: []byte("test1\n"),
InputData: []byte("test-input-non-interactive\n"),
Stdout: stdout,
},
)
require.NoError(t, err)
require.Equal(t, "test1\n", stdout.String())
require.Equal(t, "test-input-non-interactive\n", stdout.String())
})

t.Run("InputInteractive", func(t *testing.T) {
Expand Down Expand Up @@ -129,12 +129,12 @@ func TestClient_ExecuteProgram(t *testing.T) {
ctx,
cfg,
ExecuteProgramOptions{
Stdin: io.NopCloser(bytes.NewBufferString("test1\n")),
Stdin: io.NopCloser(bytes.NewBufferString("test-input-interactive\n")),
Stdout: stdout,
},
)
require.NoError(t, err)
require.Equal(t, "test1\r\n", stdout.String())
require.Equal(t, "test-input-interactive\r\n", stdout.String())
})
}

Expand Down

0 comments on commit 1e0586c

Please sign in to comment.