diff --git a/README.md b/README.md index 30585d7..13bcbb8 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,9 @@ A simple package to execute shell commands on linux, darwin and windows. ## Installation -`$ go get -u github.com/commander-cli/cmd@v1.5.0` +```bash +$ go get -u github.com/commander-cli/cmd@v1.5.0 +``` ## Usage diff --git a/command_darwin_test.go b/command_darwin_test.go index 057b75a..7a575ba 100644 --- a/command_darwin_test.go +++ b/command_darwin_test.go @@ -36,10 +36,11 @@ func TestCommand_WithValidTimeout(t *testing.T) { // I really don't see the point of mocking this // as the stdlib does so already. So testing here -// seems redundant. This simply checks if we're compliant -// with api changes +// seems redundant. This simple check if we're compliant +// with an api changes func TestCommand_WithUser(t *testing.T) { - cmd := NewCommand("echo hello", WithUser(syscall.Credential{})) + cmd := NewCommand("echo hello", WithUser(syscall.Credential{Uid: 1111})) err := cmd.Execute() + assert.Equal(t, uint32(1111), cmd.baseCommand.SysProcAttr.Credential.Uid) assert.Error(t, err) }