mirror of
https://github.com/golang/go
synced 2024-11-26 06:27:58 -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:
parent
cb0658e624
commit
137be7712f
@ -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
|
||||
|
2
src/embed/internal/embedtest/testdata/-not-hidden/fortune.txt
vendored
Normal file
2
src/embed/internal/embedtest/testdata/-not-hidden/fortune.txt
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
WARNING: terminal is not fully functional
|
||||
- (press RETURN)
|
Loading…
Reference in New Issue
Block a user