From c01f6df43e1280c398d921c2d5eff01db8c26f94 Mon Sep 17 00:00:00 2001 From: Jason McVetta Date: Mon, 9 Sep 2013 18:22:58 -0700 Subject: [PATCH] Test dockerfile with line containing literal "\n" --- buildfile_test.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/buildfile_test.go b/buildfile_test.go index aa2cfa4fdf..bdc3680386 100644 --- a/buildfile_test.go +++ b/buildfile_test.go @@ -60,6 +60,19 @@ run [ "$(ls -d /var/run/sshd)" = "/var/run/sshd" ] nil, }, + // Line containing literal "\n" + { + ` +from {IMAGE} +run sh -c 'echo root:testpass > /tmp/passwd' +run echo "foo \n bar"; echo "baz" +run mkdir -p /var/run/sshd +run [ "$(cat /tmp/passwd)" = "root:testpass" ] +run [ "$(ls -d /var/run/sshd)" = "/var/run/sshd" ] +`, + nil, + nil, + }, { ` from {IMAGE}