Contain prompt content paths within source roots
This commit is contained in:
@@ -161,6 +161,22 @@ func TestResolveFSPath(t *testing.T) {
|
||||
wantPath: "prompts/shared/user.tmpl",
|
||||
wantDisplay: "shared/user.tmpl",
|
||||
},
|
||||
{
|
||||
name: "leading whitespace preserved",
|
||||
root: "prompts",
|
||||
baseDir: "prompts/nested",
|
||||
userPath: " user.tmpl",
|
||||
wantPath: "prompts/nested/ user.tmpl",
|
||||
wantDisplay: "nested/ user.tmpl",
|
||||
},
|
||||
{
|
||||
name: "trailing whitespace preserved",
|
||||
root: "prompts",
|
||||
baseDir: "prompts/nested",
|
||||
userPath: "user.tmpl ",
|
||||
wantPath: "prompts/nested/user.tmpl ",
|
||||
wantDisplay: "nested/user.tmpl ",
|
||||
},
|
||||
{
|
||||
name: "escape rejected",
|
||||
root: "prompts",
|
||||
|
||||
Reference in New Issue
Block a user