remove this so it doesn't look inconsistent
This commit is contained in:
@@ -1,31 +0,0 @@
|
||||
// Copyright (C) 2021 nytpu
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
// For more license details, see LICENSE or <https://www.gnu.org/licenses/agpl-3.0.html>.
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestVerifyPath(t *testing.T) {
|
||||
given := []string{
|
||||
"~////../hello-world////",
|
||||
"/home/~/../test/../..",
|
||||
"/test/torture/../../../../test/./././torture/./0011/",
|
||||
".local/share/comitium/",
|
||||
"/home/test/.local/share/comitium",
|
||||
}
|
||||
want := []string{
|
||||
"/home/hello-world",
|
||||
"/",
|
||||
"/test/torture/0011",
|
||||
".local/share/comitium",
|
||||
"/home/test/.local/share/comitium",
|
||||
}
|
||||
for i, v := range given {
|
||||
if result := verifyPath(v); result != want[i] {
|
||||
t.Fatalf(`verifyPath("%v") = %v, want %v`, v, result, want[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user