diff options
author | Russ Cox <rsc@golang.org> | 2014-04-17 16:25:38 -0400 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2014-04-17 16:25:38 -0400 |
commit | 292e9c9703ae45eed2066b9b8e49f57162339092 (patch) | |
tree | f345d6e36d40a2a0f33d0bf69e9733b3752fe64d /src/cmd/pack | |
parent | 4e0dcdc9722f4eb2b0a0b6b25e3d5406da06c14b (diff) | |
download | go-292e9c9703ae45eed2066b9b8e49f57162339092.tar.gz |
cmd/pack: avoid ./ import in test (fix Windows build)
It is possible to use ./ imports on Windows but it
requires some extra command-line work
('go build' does this automatically, but we can't use 'go build' here).
Instead, use an ordinary import and -I/-L, which are easier to use.
LGTM=iant
R=iant
CC=golang-codereviews
https://codereview.appspot.com/89040043
Diffstat (limited to 'src/cmd/pack')
-rw-r--r-- | src/cmd/pack/pack_test.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cmd/pack/pack_test.go b/src/cmd/pack/pack_test.go index bd4b224af..b2be74b09 100644 --- a/src/cmd/pack/pack_test.go +++ b/src/cmd/pack/pack_test.go @@ -247,7 +247,7 @@ func TestLargeDefs(t *testing.T) { main := filepath.Join(dir, "main.go") prog := ` package main - import "./large" + import "large" var V large.T func main() { println("ok") @@ -267,8 +267,8 @@ func TestLargeDefs(t *testing.T) { run("go", "build", "cmd/pack") // writes pack binary to dir run("go", "tool", char+"g", "large.go") run("./pack", "grc", "large.a", "large."+char) - run("go", "tool", char+"g", "main.go") - run("go", "tool", char+"l", "-o", "a.out", "main."+char) + run("go", "tool", char+"g", "-I", ".", "main.go") + run("go", "tool", char+"l", "-L", ".", "-o", "a.out", "main."+char) out := run("./a.out") if out != "ok\n" { t.Fatal("incorrect output: %q, want %q", out, "ok\n") |