github.com/qri-io/qri@v0.10.1-0.20220104210721-c771715036cb/config/cli_test.go (about) 1 package config 2 3 import ( 4 "reflect" 5 "testing" 6 ) 7 8 func TestCLIValidate(t *testing.T) { 9 err := DefaultCLI().Validate() 10 if err != nil { 11 t.Errorf("error validating default cli: %s", err) 12 } 13 } 14 15 func TestCLICopy(t *testing.T) { 16 cases := []struct { 17 cli *CLI 18 }{ 19 {DefaultCLI()}, 20 } 21 for i, c := range cases { 22 cpy := c.cli.Copy() 23 if !reflect.DeepEqual(cpy, c.cli) { 24 t.Errorf("CLI Copy test case %v, cli structs are not equal: \ncopy: %v, \noriginal: %v", i, cpy, c.cli) 25 continue 26 } 27 } 28 }