Browse code

Update TestBuildWithTabs to allow for the "\t"-equivalent "\u0009" (for Go 1.3 support)

This is literally the only failing test on Go 1.3.3: :tada:
```
--- FAIL: TestBuildWithTabs (0.43 seconds)
docker_cli_build_test.go:4307: Missing tabs.
Got:["/bin/sh","-c","echo\u0009one\u0009\u0009two"]
Exp:["/bin/sh","-c","echo\tone\t\ttwo"]
```

Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>

Tianon Gravi authored on 2015/01/21 04:11:59
Showing 1 changed files
... ...
@@ -4302,9 +4302,10 @@ func TestBuildWithTabs(t *testing.T) {
4302 4302
 	if err != nil {
4303 4303
 		t.Fatal(err)
4304 4304
 	}
4305
-	expected := `["/bin/sh","-c","echo\tone\t\ttwo"]`
4306
-	if res != expected {
4307
-		t.Fatalf("Missing tabs.\nGot:%s\nExp:%s", res, expected)
4305
+	expected1 := `["/bin/sh","-c","echo\tone\t\ttwo"]`
4306
+	expected2 := `["/bin/sh","-c","echo\u0009one\u0009\u0009two"]` // syntactically equivalent, and what Go 1.3 generates
4307
+	if res != expected1 && res != expected2 {
4308
+		t.Fatalf("Missing tabs.\nGot: %s\nExp: %s or %s", res, expected1, expected2)
4308 4309
 	}
4309 4310
 	logDone("build - with tabs")
4310 4311
 }