summaryrefslogtreecommitdiff
path: root/libgo/go/path
diff options
context:
space:
mode:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2012-10-03 05:27:36 +0000
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2012-10-03 05:27:36 +0000
commitdf721dd80f5e2c6b37ce8e89fc40f50a246a1903 (patch)
tree4f194bdb2e9edcc69ef2ab0dfb4aab15ca259267 /libgo/go/path
parent7bf8bc7dd3bb151e716c3ff34c0e1158d864023d (diff)
downloadgcc-df721dd80f5e2c6b37ce8e89fc40f50a246a1903.tar.gz
libgo: Update to Go 1.0.3.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@192025 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo/go/path')
-rw-r--r--libgo/go/path/path.go3
-rw-r--r--libgo/go/path/path_test.go1
2 files changed, 3 insertions, 1 deletions
diff --git a/libgo/go/path/path.go b/libgo/go/path/path.go
index a7e0415689c..b07534b36f4 100644
--- a/libgo/go/path/path.go
+++ b/libgo/go/path/path.go
@@ -166,7 +166,8 @@ func IsAbs(path string) bool {
}
// Dir returns all but the last element of path, typically the path's directory.
-// The path is Cleaned and trailing slashes are removed before processing.
+// After dropping the final element using Split, the path is Cleaned and trailing
+// slashes are removed.
// If the path is empty, Dir returns ".".
// If the path consists entirely of slashes followed by non-slash bytes, Dir
// returns a single slash. In any other case, the returned path does not end in a
diff --git a/libgo/go/path/path_test.go b/libgo/go/path/path_test.go
index 77f080433b6..65be5506042 100644
--- a/libgo/go/path/path_test.go
+++ b/libgo/go/path/path_test.go
@@ -181,6 +181,7 @@ var dirtests = []PathTest{
{"x/", "x"},
{"abc", "."},
{"abc/def", "abc"},
+ {"abc////def", "abc"},
{"a/b/.x", "a/b"},
{"a/b/c.", "a/b"},
{"a/b/c.x", "a/b"},