(t *testing.T)
| 170 | } |
| 171 | |
| 172 | func TestOperatorsTry(t *testing.T) { |
| 173 | tests := []test.MurexTest{ |
| 174 | { |
| 175 | Block: `out: 0; false; echo foobar`, |
| 176 | Stdout: "0\nfalsefoobar\n", |
| 177 | }, |
| 178 | { |
| 179 | Block: `out: 1; true || echo foobar`, |
| 180 | Stdout: "1\n", |
| 181 | }, |
| 182 | { |
| 183 | Block: `out: 1.1; true || true || echo foobar`, |
| 184 | Stdout: "1.1\n", |
| 185 | }, |
| 186 | { |
| 187 | Block: `out: 1.2; true || false || echo foobar`, |
| 188 | Stdout: "1.2\n", |
| 189 | }, |
| 190 | { |
| 191 | Block: `out: 1.3; false || true || echo foobar`, |
| 192 | Stdout: "1.3\n", |
| 193 | }, |
| 194 | { |
| 195 | Block: `out: 2; true && echo foobar`, |
| 196 | Stdout: "2\nfoobar\n", |
| 197 | }, |
| 198 | { |
| 199 | Block: `out: 2.1; false && false && echo foobar`, |
| 200 | Stdout: "2.1\n", |
| 201 | ExitNum: 1, |
| 202 | }, |
| 203 | { |
| 204 | Block: `out: 2.2; true && false && echo foobar`, |
| 205 | Stdout: "2.2\n", |
| 206 | ExitNum: 1, |
| 207 | }, |
| 208 | { |
| 209 | Block: `out: 2.3; false && true && echo foobar`, |
| 210 | Stdout: "2.3\n", |
| 211 | ExitNum: 1, |
| 212 | }, |
| 213 | { |
| 214 | Block: `out: 3; false || echo foobar`, |
| 215 | Stdout: "3\nfoobar\n", |
| 216 | }, |
| 217 | { |
| 218 | Block: `out: 4; false && echo foobar`, |
| 219 | Stdout: "4\n", |
| 220 | ExitNum: 1, |
| 221 | }, |
| 222 | { |
| 223 | Block: `out: 4.1; true || true && echo foobar`, |
| 224 | Stdout: "4.1\n", |
| 225 | }, |
| 226 | /// |
| 227 | { |
| 228 | Block: `out: 5; try { false; echo foobar }`, |
| 229 | Stdout: "5\nfalse", |
nothing calls this directly
no test coverage detected