pathfixture

package
v0.4.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 5, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package pathfixture shares host composition cases across backend and REPL tests.

Index

Constants

This section is empty.

Variables

View Source
var Cases = []Fixture{
	{"", "a/b", "a/b", `a\b`},
	{".", "a/b", "./a/b", `.\a\b`},
	{"..", "a/b", "../a/b", `..\a\b`},
	{"/", "a/b", "/a/b", `/a\b`},
	{"//", "a/b", "//a/b", `//a\b`},
	{"///", "a/b", "///a/b", `///a\b`},
	{"/root//", "a/b", "/root//a/b", `/root//a\b`},
	{"/root/link/..", "a/b", "/root/link/../a/b", `/root/link/..\a\b`},
	{"root", "a/b", "root/a/b", `root\a\b`},
	{`root\`, "a/b", `root\/a/b`, `root\a\b`},
	{"C:", "a/b", "C:/a/b", `C:a\b`},
	{"z:", "a/b", "z:/a/b", `z:a\b`},
	{"1:", "a/b", "1:/a/b", `1:\a\b`},
	{"ab:", "a/b", "ab:/a/b", `ab:\a\b`},
	{"C:/", "a/b", "C:/a/b", `C:/a\b`},
	{`C:\`, "a/b", `C:\/a/b`, `C:\a\b`},
	{`C:link\..`, "a/b", `C:link\../a/b`, `C:link\..\a\b`},
	{`\\server\share`, "a/b", `\\server\share/a/b`, `\\server\share\a\b`},
	{`\\server\share\`, "a/b", `\\server\share\/a/b`, `\\server\share\a\b`},
	{`\\?\C:\`, "a/b", `\\?\C:\/a/b`, `\\?\C:\a\b`},
	{`\\?\UNC\server\share`, "a/b", `\\?\UNC\server\share/a/b`, `\\?\UNC\server\share\a\b`},
	{"日本語/../", "é/😀.txt", "日本語/../é/😀.txt", `日本語/../é\😀.txt`},
	{"$root/~", "file", "$root/~/file", `$root/~\file`},
}

Functions

This section is empty.

Types

type Fixture

type Fixture struct {
	Parent, Child, POSIX, Windows string
}

func (Fixture) Expected

func (f Fixture) Expected(windows bool) string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL