1
0
mirror of https://github.com/golang/go synced 2024-11-23 03:50:03 -07:00

embed/internal/embedtest: add test for embedded path starting with dash

Fixes #45447

Change-Id: I1b1a0a844ee4345ced1a007bbe53db035183175f
Reviewed-on: https://go-review.googlesource.com/c/go/+/311529
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
This commit is contained in:
Ian Lance Taylor 2021-04-19 12:20:18 -07:00
parent cb0658e624
commit 137be7712f
2 changed files with 4 additions and 2 deletions

View File

@ -102,12 +102,12 @@ func TestHidden(t *testing.T) {
t.Logf("//go:embed testdata")
testDir(t, dir, "testdata",
"ascii.txt", "glass.txt", "hello.txt", "i/", "ken.txt")
"-not-hidden/", "ascii.txt", "glass.txt", "hello.txt", "i/", "ken.txt")
t.Logf("//go:embed testdata/*")
testDir(t, star, "testdata",
".hidden/", "_hidden/", "ascii.txt", "glass.txt", "hello.txt", "i/", "ken.txt")
"-not-hidden/", ".hidden/", "_hidden/", "ascii.txt", "glass.txt", "hello.txt", "i/", "ken.txt")
testDir(t, star, "testdata/.hidden",
"fortune.txt", "more/") // but not .more or _more

View File

@ -0,0 +1,2 @@
WARNING: terminal is not fully functional
- (press RETURN)