Documentation
¶
Overview ¶
Package testpath provides shared test-only path helpers.
Index ¶
- func MustPathRelativeToConfiguredWorkingDirectory(tb testing.TB, currentWorkingDirectory string, configuredPath string) string
- func PathRelativeToConfiguredWorkingDirectory(currentWorkingDirectory string, configuredPath string) (string, error)
- func PathRelativeToCurrentWorkingDirectory(tb testing.TB, configuredPath string) string
- func PathRelativeToRootForJSON(tb testing.TB, root string, configuredPath string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MustPathRelativeToConfiguredWorkingDirectory ¶
func MustPathRelativeToConfiguredWorkingDirectory( tb testing.TB, currentWorkingDirectory string, configuredPath string, ) string
MustPathRelativeToConfiguredWorkingDirectory returns configuredPath as a path relative to currentWorkingDirectory and fails the test on conversion errors.
func PathRelativeToConfiguredWorkingDirectory ¶
func PathRelativeToConfiguredWorkingDirectory( currentWorkingDirectory string, configuredPath string, ) (string, error)
PathRelativeToConfiguredWorkingDirectory returns configuredPath as currentWorkingDirectory-relative when configuredPath is machine-absolute; otherwise it returns configuredPath unchanged.
func PathRelativeToCurrentWorkingDirectory ¶
PathRelativeToCurrentWorkingDirectory returns configuredPath as a current-working-directory-relative path when configuredPath is machine-absolute; otherwise it returns configuredPath unchanged.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.