(t *testing.T)
| 162 | } |
| 163 | |
| 164 | func TestRunStandardInputs(t *testing.T) { |
| 165 | var buf bytes.Buffer |
| 166 | log.SetOutput(&buf) |
| 167 | |
| 168 | Run(RunOptions{ |
| 169 | NoRun: true, |
| 170 | HeadlessMode: true, |
| 171 | StandardInputs: true, |
| 172 | }, &testScene{}) |
| 173 | |
| 174 | expected := "Using standard inputs\n" |
| 175 | if !strings.HasSuffix(buf.String(), expected) { |
| 176 | t.Error("setting standard inputs did not write expected output to log") |
| 177 | } |
| 178 | } |
| 179 | |
| 180 | type testRunScene struct { |
| 181 | updates int |