(t *testing.T)
| 63 | } |
| 64 | |
| 65 | func TestListRun(t *testing.T) { |
| 66 | tests := []struct { |
| 67 | name string |
| 68 | opts *ListOptions |
| 69 | isTTY bool |
| 70 | httpStubs func(t *testing.T, reg *httpmock.Registry) |
| 71 | wantStdout string |
| 72 | wantStderr string |
| 73 | wantErr bool |
| 74 | errMsg string |
| 75 | }{ |
| 76 | { |
| 77 | name: "gitignore list tty", |
| 78 | isTTY: true, |
| 79 | httpStubs: func(t *testing.T, reg *httpmock.Registry) { |
| 80 | reg.Register( |
| 81 | httpmock.REST("GET", "gitignore/templates"), |
| 82 | httpmock.StringResponse(`[ |
| 83 | "AL", |
| 84 | "Actionscript", |
| 85 | "Ada", |
| 86 | "Agda", |
| 87 | "Android", |
| 88 | "AppEngine", |
| 89 | "AppceleratorTitanium", |
| 90 | "ArchLinuxPackages", |
| 91 | "Autotools", |
| 92 | "Ballerina", |
| 93 | "C", |
| 94 | "C++", |
| 95 | "CFWheels", |
| 96 | "CMake", |
| 97 | "CUDA", |
| 98 | "CakePHP", |
| 99 | "ChefCookbook", |
| 100 | "Clojure", |
| 101 | "CodeIgniter", |
| 102 | "CommonLisp", |
| 103 | "Composer", |
| 104 | "Concrete5", |
| 105 | "Coq", |
| 106 | "CraftCMS", |
| 107 | "D" |
| 108 | ]`, |
| 109 | )) |
| 110 | }, |
| 111 | wantStdout: heredoc.Doc(` |
| 112 | GITIGNORE |
| 113 | AL |
| 114 | Actionscript |
| 115 | Ada |
| 116 | Agda |
| 117 | Android |
| 118 | AppEngine |
| 119 | AppceleratorTitanium |
| 120 | ArchLinuxPackages |
| 121 | Autotools |
| 122 | Ballerina |
nothing calls this directly
no test coverage detected