test(shellrun): build the mergePath fixture with the platform list separator

This commit is contained in:
esengine committed 2026-10-20 03:46:20 -07:00
1 parent 39c6204bdf
commit 301fdea4a8
1 file changed
+4 -2
+4 -2
View File
@@ -45,7 +45,9 @@ func TestLoginEnvironmentFallsBackWhenShellFails(t *testing.T) {
}
func TestMergePathRemovesEmptyAndDuplicateEntries(t *testing.T) {
if got := mergePath("/a::/b:/a", "/b:/c"); got != "/a:/b:/c" {
t.Fatalf("mergePath = %q", got)
sep := string(os.PathListSeparator)
join := func(parts ...string) string { return strings.Join(parts, sep) }
if got, want := mergePath(join("/a", "", "/b", "/a"), join("/b", "/c")), join("/a", "/b", "/c"); got != want {
t.Fatalf("mergePath = %q, want %q", got, want)
}
}