summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2012-04-18 09:49:19 +0200
committerOndřej Surý <ondrej@sury.org>2012-04-18 09:49:19 +0200
commit8f6a83627aeedc82db4fef730715e150bef5e0c2 (patch)
treed88022f76578e687c8cd60d4ec5590c305357105
parent3c5d53d0a391465ceea5acf6c3bc8a7fcfad019e (diff)
downloadgolang-8f6a83627aeedc82db4fef730715e150bef5e0c2.tar.gz
Merge upstream patch to fix homedir issue (http://code.google.com/p/go/source/detail?r=709120aecee0)
-rw-r--r--debian/patches/014-dont_fail_test_with_missing_homedir.patch23
1 files changed, 19 insertions, 4 deletions
diff --git a/debian/patches/014-dont_fail_test_with_missing_homedir.patch b/debian/patches/014-dont_fail_test_with_missing_homedir.patch
index b34686099..ac81dd199 100644
--- a/debian/patches/014-dont_fail_test_with_missing_homedir.patch
+++ b/debian/patches/014-dont_fail_test_with_missing_homedir.patch
@@ -1,11 +1,26 @@
--- a/src/pkg/os/user/user_test.go
+++ b/src/pkg/os/user/user_test.go
-@@ -35,7 +35,7 @@ func TestCurrent(t *testing.T) {
+@@ -5,7 +5,6 @@
+ package user
+
+ import (
+- "os"
+ "runtime"
+ "testing"
+ )
+@@ -34,12 +33,11 @@ func TestCurrent(t *testing.T) {
+ if err != nil {
t.Fatalf("Current: %v", err)
}
- fi, err := os.Stat(u.HomeDir)
+- fi, err := os.Stat(u.HomeDir)
- if err != nil || !fi.IsDir() {
-+ if err != nil {
- t.Errorf("expected a valid HomeDir; stat(%q): err=%v", u.HomeDir, err)
+- t.Errorf("expected a valid HomeDir; stat(%q): err=%v", u.HomeDir, err)
++ if u.HomeDir == "" {
++ t.Errorf("didn't get a HomeDir")
}
if u.Username == "" {
+- t.Fatalf("didn't get a username")
++ t.Errorf("didn't get a username")
+ }
+ }
+