aboutsummaryrefslogtreecommitdiff
path: root/src/path/example_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/path/example_test.go')
-rw-r--r--src/path/example_test.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/path/example_test.go b/src/path/example_test.go
index 67b9718664..e30ebd13dc 100644
--- a/src/path/example_test.go
+++ b/src/path/example_test.go
@@ -79,13 +79,18 @@ func ExampleJoin() {
fmt.Println(path.Join("a", "b", "c"))
fmt.Println(path.Join("a", "b/c"))
fmt.Println(path.Join("a/b", "c"))
+
+ fmt.Println(path.Join("a/b", "../../../xyz"))
+
fmt.Println(path.Join("", ""))
fmt.Println(path.Join("a", ""))
fmt.Println(path.Join("", "a"))
+
// Output:
// a/b/c
// a/b/c
// a/b/c
+ // ../xyz
//
// a
// a