2019-08-08 13:50:36 +00:00
|
|
|
package cli
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestFishCompletion(t *testing.T) {
|
|
|
|
// Given
|
|
|
|
app := testApp()
|
2020-06-23 00:17:47 +00:00
|
|
|
app.Flags = append(app.Flags, &PathFlag{
|
|
|
|
Name: "logfile",
|
|
|
|
TakesFile: true,
|
|
|
|
})
|
2019-08-08 13:50:36 +00:00
|
|
|
|
|
|
|
// When
|
|
|
|
res, err := app.ToFishCompletion()
|
|
|
|
|
|
|
|
// Then
|
|
|
|
expect(t, err, nil)
|
|
|
|
expectFileContent(t, "testdata/expected-fish-full.fish", res)
|
|
|
|
}
|