blob: ae434624ac7bc7caa2b39a76d02bdd498b5fd928 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
// Copyright Vespa.ai. 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/ioutil"
)
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, ioutil.Exists(filepath.Join(tmpDir, "vespa.1")))
}
|