Commit 1b0f2b47 authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

Merge pull request #2227 from ceh/pp-atlas-util-test-fix

post-processor/atlas: adjust test for cross-platform filepath separator
parents 1e853f9f 1999c83a
package atlas
import (
"path/filepath"
"testing"
)
func TestLongestCommonPrefix(t *testing.T) {
sep := string(filepath.Separator)
cases := []struct {
Input []string
Output string
......@@ -18,12 +20,12 @@ func TestLongestCommonPrefix(t *testing.T) {
"",
},
{
[]string{"foo/", "foo/bar"},
"foo/",
[]string{"foo" + sep, "foo" + sep + "bar"},
"foo" + sep,
},
{
[]string{"/foo/", "/bar"},
"/",
[]string{sep + "foo" + sep, sep + "bar"},
sep,
},
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment