diff options
Diffstat (limited to 'internal/config/skel_test.go')
| -rw-r--r-- | internal/config/skel_test.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/config/skel_test.go b/internal/config/skel_test.go index 3815336..4e2e802 100644 --- a/internal/config/skel_test.go +++ b/internal/config/skel_test.go @@ -243,7 +243,7 @@ func TestNewDirErrors(t *testing.T) { home := t.TempDir() t.Setenv("HOME", home) writeFiles(t, home, map[string]string{ - "krino.conf": `(include "a")`, "dirs/a.conf": `(path "~")`, "x/.keep": "", "f": "", "lat\xe9n/.keep": "", + "krino.conf": `(include "a")`, "dirs/a.conf": `(path "~")`, "x/.keep": "", "f": "", "lat\xe9n/.keep": "", "ctl\x1bx/.keep": "", }) main := filepath.Join(home, "krino.conf") tests := []struct{ name, path, want string }{ @@ -253,6 +253,7 @@ func TestNewDirErrors(t *testing.T) { {"b", "~/missing", filepath.Join(home, "missing") + " is not a directory"}, {"a", "~/x", `"a" is already included`}, {"b", "~/lat\xe9n", fmt.Sprintf("%q is not valid UTF-8; krino's config is UTF-8 text, so rename the directory first", filepath.Join(home, "lat\xe9n"))}, + {"b", "~/ctl\x1bx", fmt.Sprintf("%q holds control or bidirectional characters; rename the directory first", filepath.Join(home, "ctl\x1bx"))}, } for _, tt := range tests { if _, err := NewDir(main, tt.name, tt.path); err == nil || err.Error() != tt.want { |
