diff --git a/src/path/example_test.go b/src/path/example_test.go index 07f9de3271..d962e3d331 100644 --- a/src/path/example_test.go +++ b/src/path/example_test.go @@ -47,11 +47,15 @@ func ExampleClean() { func ExampleDir() { fmt.Println(path.Dir("/a/b/c")) fmt.Println(path.Dir("a/b/c")) + fmt.Println(path.Dir("/a/")) + fmt.Println(path.Dir("a/")) fmt.Println(path.Dir("/")) fmt.Println(path.Dir("")) // Output: // /a/b // a/b + // /a + // a // / // . }