Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
8907f94a
Commit
8907f94a
authored
Jun 28, 2012
by
Han-Wen Nienhuys
Committed by
Rob Pike
Jun 28, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
path/filepath: add test case for rooted ".."
R=golang-dev, r CC=golang-dev
https://golang.org/cl/6350047
parent
8357dc90
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
path_test.go
src/pkg/path/filepath/path_test.go
+4
-1
No files found.
src/pkg/path/filepath/path_test.go
View file @
8907f94a
...
...
@@ -20,7 +20,6 @@ type PathTest struct {
var
cleantests
=
[]
PathTest
{
// Already clean
{
""
,
"."
},
{
"abc"
,
"abc"
},
{
"abc/def"
,
"abc/def"
},
{
"a/b/c"
,
"a/b/c"
},
...
...
@@ -31,6 +30,9 @@ var cleantests = []PathTest{
{
"/abc"
,
"/abc"
},
{
"/"
,
"/"
},
// Empty is current dir
{
""
,
"."
},
// Remove trailing slash
{
"abc/"
,
"abc"
},
{
"abc/def/"
,
"abc/def"
},
...
...
@@ -61,6 +63,7 @@ var cleantests = []PathTest{
{
"abc/def/../../.."
,
".."
},
{
"/abc/def/../../.."
,
"/"
},
{
"abc/def/../../../ghi/jkl/../../../mno"
,
"../../mno"
},
{
"/../abc"
,
"/abc"
},
// Combinations
{
"abc/./../def"
,
"def"
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment