summaryrefslogtreecommitdiffstats
path: root/client/go/internal/cli/cmd/man_test.go
diff options
context:
space:
mode:
authorMartin Polden <mpolden@mpolden.no>2023-02-03 15:20:23 +0100
committerMartin Polden <mpolden@mpolden.no>2023-02-03 15:35:25 +0100
commite1e94812425a487069bf33f781bec987e9e49874 (patch)
tree4a892c3b5c0a7dee2cb76f9971e538cb4aba8a16 /client/go/internal/cli/cmd/man_test.go
parenta08ae588d6035b69f0961dff596fc871fd1c4e58 (diff)
Re-organize Go code
Diffstat (limited to 'client/go/internal/cli/cmd/man_test.go')
-rw-r--r--client/go/internal/cli/cmd/man_test.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/client/go/internal/cli/cmd/man_test.go b/client/go/internal/cli/cmd/man_test.go
new file mode 100644
index 00000000000..0c214698047
--- /dev/null
+++ b/client/go/internal/cli/cmd/man_test.go
@@ -0,0 +1,19 @@
+// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+package cmd
+
+import (
+ "fmt"
+ "path/filepath"
+ "testing"
+
+ "github.com/stretchr/testify/assert"
+ "github.com/vespa-engine/vespa/client/go/internal/util"
+)
+
+func TestMan(t *testing.T) {
+ tmpDir := t.TempDir()
+ cli, stdout, _ := newTestCLI(t)
+ assert.Nil(t, cli.Run("man", tmpDir))
+ assert.Equal(t, fmt.Sprintf("Success: Man pages written to %s\n", tmpDir), stdout.String())
+ assert.True(t, util.PathExists(filepath.Join(tmpDir, "vespa.1")))
+}