Skip to content

Commit

Permalink
moby#8513 : Add a test for trailing carriage return in output of 'doc…
Browse files Browse the repository at this point in the history
…ker exec -it ..' commands.

Signed-off-by: Frank Carey <frank@devinci.io>
  • Loading branch information
Frank Carey committed Jan 26, 2016
1 parent 8d09611 commit 4856a9b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions integration-cli/docker_cli_exec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,16 @@ func (s *DockerSuite) TestExecParseError(c *check.C) {
c.Assert(stderr, checker.Contains, "See '"+dockerBinary+" exec --help'")
}

func (s *DockerSuite) TestExecTTYCarriageReturn(c *check.C) {
testRequires(c, DaemonIsLinux)
dockerCmd(c, "run", "-d", "-it", "--name", "testing", "busybox", "top")

cmd := exec.Command(dockerBinary, "exec", "-it", "testing", "uname")
out, _, err := runCommandWithOutput(cmd)
c.Assert(err, checker.IsNil, check.Commentf(out))
c.Assert(out, checker.Not(checker.Contains), "\r")
}

func (s *DockerSuite) TestExecStopNotHanging(c *check.C) {
testRequires(c, DaemonIsLinux)
dockerCmd(c, "run", "-d", "--name", "testing", "busybox", "top")
Expand Down

0 comments on commit 4856a9b

Please sign in to comment.