summaryrefslogtreecommitdiff
path: root/internal/cli/kdbx_store_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/cli/kdbx_store_test.go')
-rw-r--r--internal/cli/kdbx_store_test.go14
1 files changed, 9 insertions, 5 deletions
diff --git a/internal/cli/kdbx_store_test.go b/internal/cli/kdbx_store_test.go
index fc79ca6..bff1a0a 100644
--- a/internal/cli/kdbx_store_test.go
+++ b/internal/cli/kdbx_store_test.go
@@ -1,11 +1,15 @@
package cli
-import "testing"
+import (
+ "testing"
+
+ "codeberg.org/snonux/foostore/internal/keepass"
+)
func TestSplitDescriptionPath(t *testing.T) {
- group, title, err := splitDescriptionPath("foo/bar/baz")
+ group, title, err := keepass.SplitDescriptionPath("foo/bar/baz")
if err != nil {
- t.Fatalf("splitDescriptionPath: %v", err)
+ t.Fatalf("SplitDescriptionPath: %v", err)
}
if title != "baz" {
t.Fatalf("title = %q; want baz", title)
@@ -16,8 +20,8 @@ func TestSplitDescriptionPath(t *testing.T) {
}
func TestSanitizeRelativePathRejectsTraversal(t *testing.T) {
- if _, err := sanitizeRelativePath("../secret"); err == nil {
- t.Fatal("sanitizeRelativePath should reject traversal path")
+ if _, err := keepass.SanitizeRelativePath("../secret"); err == nil {
+ t.Fatal("SanitizeRelativePath should reject traversal path")
}
}