Align bundle path validation coverage

This commit is contained in:
2026-06-04 00:40:17 +00:00
parent 5a3fd2b8ac
commit 2ac2bbdf79
6 changed files with 146 additions and 11 deletions

View File

@@ -12,6 +12,10 @@ func TestValidatePath(t *testing.T) {
"report.md",
"daily/report.md",
"a-b_1.2/report.html",
"manifest.json",
StateFileName,
"nested/manifest.json",
"nested/" + StateFileName,
}
for _, path := range valid {
t.Run("valid "+path, func(t *testing.T) {
@@ -23,10 +27,14 @@ func TestValidatePath(t *testing.T) {
invalid := []string{
"",
".",
"./report.md",
"/absolute",
"../outside",
"nested/../outside",
"nested/.",
"nested/./file",
"nested/",
"nested//file",
`nested\file`,
}