summaryrefslogtreecommitdiff
path: root/man/man_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'man/man_test.go')
-rw-r--r--man/man_test.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/man/man_test.go b/man/man_test.go
new file mode 100644
index 0000000..4b48c0f
--- /dev/null
+++ b/man/man_test.go
@@ -0,0 +1,18 @@
+//go:build test
+
+package main
+
+import (
+ "github.com/spf13/pflag"
+ "github.com/stretchr/testify/assert"
+ "path/filepath"
+ "testing"
+)
+
+func TestMan(t *testing.T) {
+ d := t.TempDir()
+ err := pflag.Set(manFlagName, d)
+ assert.NoError(t, err)
+ assert.NotPanics(t, main)
+ assert.FileExists(t, filepath.Join(d, "pik.1.man"))
+}