func TestEmptyRootCommand(t *testing.T) {
	cmd := exec.Command("go", "run", "demo/cmd.go")
	if output, err := cmd.Output(); err != nil {
		fmt.Println("Error:", err)
	} else {
		lines := []string{
			`sub-command => ""`,
			`argument(output) => &clapper.Arg{Name:"output", IsVariadic:false, DefaultValue:"", Value:""}`,
			`flag(force) => &clapper.Flag{Name:"force", ShortName:"f", IsBoolean:true, IsInverted:false, DefaultValue:"false", Value:""}`,
			`flag(verbose) => &clapper.Flag{Name:"verbose", ShortName:"v", IsBoolean:true, IsInverted:false, DefaultValue:"false", Value:""}`,
			`flag(version) => &clapper.Flag{Name:"version", ShortName:"V", IsBoolean:false, IsInverted:false, DefaultValue:"", Value:""}`,
			`flag(dir) => &clapper.Flag{Name:"dir", ShortName:"", IsBoolean:false, IsInverted:false, DefaultValue:"/var/users", Value:""}`,
		}
		for _, line := range lines {
			if !strings.Contains(fmt.Sprintf("%s", output), line) {
				t.Fail()
			}
		}
	}
}
test empty root command
package clapper
import (
	"fmt"
	"os"
	"os/exec"
	"strings"
	"testing"
)
func TestUnsupportedAssignment(t *testing.T) {
	options := map[string][]string{
		"---version": []string{"---version"},
		"---v":       []string{"---v=1.0.0"},
		"-version":   []string{"-version"},
	}
	for flag, options := range options {
		cmd := exec.Command("go", append([]string{"run", "demo/cmd.go"}, options...)...)
		if output, err := cmd.Output(); err != nil {
			fmt.Println("Error:", err)
		} else {
			if !strings.Contains(fmt.Sprintf("%s", output), fmt.Sprintf(`error => clapper.ErrorUnsupportedFlag{Name:"%s"}`, flag)) {
				t.Fail()
			}
		}
	}
}