Skip to content

Commit

Permalink
i/prompting: fix typo and add notes to remove test boilerplate
Browse files Browse the repository at this point in the history
Signed-off-by: Oliver Calder <oliver.calder@canonical.com>
  • Loading branch information
olivercalder committed Apr 29, 2024
1 parent 0fae07a commit 1cab837
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion interfaces/prompting/patterns.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func ValidatePathPattern(pattern string) error {
// of ExpandPathPattern.
//
// Paths to directories are received with trailing slashes, but we don't want
// to require the user to including a trailing '/' if they want to match
// to require the user to include a trailing '/' if they want to match
// directories (and end their pattern with `{,/}` if they want to match both
// directories and non-directories). Thus, we want to ensure that patterns
// without trailing slashes match paths with trailing slashes. However,
Expand Down
9 changes: 8 additions & 1 deletion interfaces/prompting/patterns_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,31 @@
package prompting_test

import (
// TODO: remove once PR #13849 is merged
"testing"

. "gopkg.in/check.v1"

doublestar "github.com/bmatcuk/doublestar/v4"

"github.com/snapcore/snapd/dirs"
"github.com/snapcore/snapd/interfaces/prompting"

// TODO: remove once PR #13849 is merged
"github.com/snapcore/snapd/dirs"
)

// TODO: remove once PR #13849 is merged
func Test(t *testing.T) { TestingT(t) }

// TODO: remove once PR #13849 is merged
type promptingSuite struct {
tmpdir string
}

// TODO: remove once PR #13849 is merged
var _ = Suite(&promptingSuite{})

// TODO: remove once PR #13849 is merged
func (s *promptingSuite) SetUpTest(c *C) {
s.tmpdir = c.MkDir()
dirs.SetRootDir(s.tmpdir)
Expand Down

0 comments on commit 1cab837

Please sign in to comment.