mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-12-31 22:07:25 -08:00
chore(path): add home tests for mapped locations
This commit is contained in:
parent
f04bf09802
commit
a1801f717c
|
@ -1355,6 +1355,8 @@ func TestReplaceMappedLocations(t *testing.T) {
|
|||
{Pwd: "/f/g/h/e", Expected: "^/e"},
|
||||
{Pwd: "/a/b/c/d", Expected: "#"},
|
||||
{Pwd: "/a/b/c/d/e", Expected: "#/e"},
|
||||
{Pwd: "/a/b/c/d/e", Expected: "#/e"},
|
||||
{Pwd: "/a/b/k/j/e", Expected: "e"},
|
||||
}
|
||||
|
||||
for _, tc := range cases {
|
||||
|
@ -1363,6 +1365,7 @@ func TestReplaceMappedLocations(t *testing.T) {
|
|||
env.On("Pwd").Return(tc.Pwd)
|
||||
env.On("Shell").Return(shell.FISH)
|
||||
env.On("GOOS").Return(platform.DARWIN)
|
||||
env.On("Home").Return("/a/b/k")
|
||||
path := &Path{
|
||||
env: env,
|
||||
props: properties.Map{
|
||||
|
@ -1371,6 +1374,7 @@ func TestReplaceMappedLocations(t *testing.T) {
|
|||
"/a/b/c/d": "#",
|
||||
"/f/g/h/*": "^",
|
||||
"/c/l/k/*": "",
|
||||
"~/j/*": "",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue