aboutsummaryrefslogtreecommitdiff
path: root/file/names_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'file/names_test.go')
-rw-r--r--file/names_test.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/file/names_test.go b/file/names_test.go
index 5c9941a..d57d6ee 100644
--- a/file/names_test.go
+++ b/file/names_test.go
@@ -22,3 +22,23 @@ func TestNames(t *testing.T) {
})
}
}
+
+func TestVerify(t *testing.T) {
+ testCases := []struct {
+ comment string
+ file string
+ }{
+ {"verify with key.pub", "key.pub"},
+ {"verify with s p a c e s.pub", "s p a c e s.pub"},
+ {"verify with key.sec", ""},
+ {"whatever", ""},
+ }
+ for _, tc := range testCases {
+ t.Run(tc.comment, func(t *testing.T) {
+ file, _ := PubFile(tc.comment)
+ if file != tc.file {
+ t.Errorf("got %v, want %v", file, tc.file)
+ }
+ })
+ }
+}