feat(docs): rework CLI docs (#6312)

This commit is contained in:
Ammar Bandukwala
2023-02-22 19:53:21 -06:00
committed by GitHub
parent 43e8ba0811
commit f6a8c360e5
71 changed files with 2342 additions and 2087 deletions

View File

@ -0,0 +1,40 @@
package main
import (
_ "embed"
"testing"
)
func Test_parseEnv(t *testing.T) {
t.Parallel()
type args struct {
flagUsage string
}
tests := []struct {
name string
args args
want string
}{
{
"no env",
args{"Perform a trial run with no changes made, showing a diff at the end."},
"",
},
{
"env",
args{`Specifies the path to an SSH config.
Consumes $CODER_SSH_CONFIG_FILE`},
"$CODER_SSH_CONFIG_FILE",
},
}
for _, tt := range tests {
tt := tt
t.Run(tt.name, func(t *testing.T) {
t.Parallel()
if got := parseEnv(tt.args.flagUsage); got != tt.want {
t.Errorf("parseEnv() = %v, want %v", got, tt.want)
}
})
}
}