>> write path sorter
> correct error in test > rename to sortedPaths
This commit is contained in:
parent
f517f61c55
commit
52c7f8bce6
2 changed files with 24 additions and 3 deletions
|
|
@ -71,7 +71,7 @@ func TestRestrictRuneset(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
func TestSortPaths(t *testing.T) {
|
||||
func TestSortedPaths(t *testing.T) {
|
||||
paths := []string{
|
||||
"./testdata/Tawnee: The Game",
|
||||
"./testdata/birds:/pengiuns?",
|
||||
|
|
@ -83,10 +83,10 @@ func TestSortPaths(t *testing.T) {
|
|||
"./testdata/birds:/pengiuns?/emperor",
|
||||
"./testdata/birds:/pengiuns?/pingu?",
|
||||
"./testdata/birds:/pengiuns?",
|
||||
"./testdata/birds:",
|
||||
"./testdata/Tawnee: The Game",
|
||||
"./testdata/birds:",
|
||||
}
|
||||
have := sortPaths(paths)
|
||||
have := sortedPaths(paths)
|
||||
if len(have) > len(want) {
|
||||
t.Fatal("Sorted list is bigger than original")
|
||||
} else if len(have) < len(want) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue