mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #10223 from tianon/go1.3-TestBuildWithTabs
Update TestBuildWithTabs to allow for the "\t"-equivalent "\u0009" (for Go 1.3 support)
This commit is contained in:
commit
9305020d9f
1 changed files with 4 additions and 3 deletions
|
@ -4302,9 +4302,10 @@ func TestBuildWithTabs(t *testing.T) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
expected := `["/bin/sh","-c","echo\tone\t\ttwo"]`
|
expected1 := `["/bin/sh","-c","echo\tone\t\ttwo"]`
|
||||||
if res != expected {
|
expected2 := `["/bin/sh","-c","echo\u0009one\u0009\u0009two"]` // syntactically equivalent, and what Go 1.3 generates
|
||||||
t.Fatalf("Missing tabs.\nGot:%s\nExp:%s", res, expected)
|
if res != expected1 && res != expected2 {
|
||||||
|
t.Fatalf("Missing tabs.\nGot: %s\nExp: %s or %s", res, expected1, expected2)
|
||||||
}
|
}
|
||||||
logDone("build - with tabs")
|
logDone("build - with tabs")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue