llvm-project/llvm/utils/lit/tests/Inputs/shtest-shell/write-to-stdout-and-stderr.py
Brian Gesiak d256538b3a [lit] Fix order of checks in shtest-shell.py test
Summary:
An expectation in `utils/lit/tests/Inputs/shtest-shell/redirects.txt`
expects that first a string printed to stdout is seen, and then a
string printed to stderr. Add `flush()` calls to ensure that stdout is
printed before stderr, as expected.

Reviewers: rnk, mgorny, jroelofs

Reviewed By: rnk

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D35947

llvm-svn: 309292
2017-07-27 16:50:40 +00:00

11 lines
153 B
Python

#!/usr/bin/env python
import sys
sys.stdout.write("a line on stdout\n")
sys.stdout.flush()
sys.stderr.write("a line on stderr\n")
sys.stderr.flush()