func testConfigGet(t *testing.T, g *libkb.GlobalContext, path string, stdout []string, stderr []string, wantErr bool) { ctui := configTestUI{} g.SetUI(&ctui) get := client.NewCmdConfigGetRunner(g) get.Path = path err := get.Run() if wantErr && err == nil { t.Fatal("Expected an error") } if !wantErr && err != nil { t.Fatalf("Wanted no error, but got: %v", err) } compareLists(t, stderr, ctui.stderr, "standard error") compareLists(t, stdout, ctui.stdout, "standard output") }