(t *testing.T)
| 127 | } |
| 128 | |
| 129 | func TestRunTestStdin(t *testing.T) { |
| 130 | plans := []testUTPs{ |
| 131 | { |
| 132 | Function: "foobar", |
| 133 | TestBlock: `-> set foo; $foo`, |
| 134 | Passed: true, |
| 135 | UTP: lang.UnitTestPlan{ |
| 136 | Stdin: "bar", |
| 137 | StdoutMatch: "bar", |
| 138 | }, |
| 139 | }, |
| 140 | { |
| 141 | Function: "foobar", |
| 142 | TestBlock: `-> set foo; $foo`, |
| 143 | Passed: true, |
| 144 | UTP: lang.UnitTestPlan{ |
| 145 | Stdin: "bar", |
| 146 | StdoutMatch: "bar", |
| 147 | StdoutType: types.Generic, |
| 148 | }, |
| 149 | }, |
| 150 | { |
| 151 | Function: "foobar", |
| 152 | TestBlock: `-> set foo; $foo`, |
| 153 | Passed: true, |
| 154 | UTP: lang.UnitTestPlan{ |
| 155 | Stdin: "[1,2,3]", |
| 156 | StdinType: types.Json, |
| 157 | StdoutMatch: "[1,2,3]", |
| 158 | StdoutType: types.Json, |
| 159 | }, |
| 160 | }, |
| 161 | { |
| 162 | Function: "foobar", |
| 163 | TestBlock: `-> set foo; out $foo`, |
| 164 | Passed: true, |
| 165 | UTP: lang.UnitTestPlan{ |
| 166 | Stdin: "bar", |
| 167 | StdinType: types.Generic, |
| 168 | StdoutMatch: "bar\n", |
| 169 | StdoutType: types.String, |
| 170 | }, |
| 171 | }, |
| 172 | } |
| 173 | |
| 174 | testRunTest(t, plans) |
| 175 | } |
| 176 | |
| 177 | func TestRunTestExitNumber(t *testing.T) { |
| 178 | plans := []testUTPs{ |
nothing calls this directly
no test coverage detected