diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-03-10 18:43:31 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-03-10 18:43:31 -0800 |
commit | ec9bd63e8c935e1784be2ec1171a8445b7673ea1 (patch) | |
tree | 2d30bfc1550e97187c4104eb9018acaf27f706f4 /tests/runner.py | |
parent | a78a13dc7bee141afc6be2a68e6b19912f2a260c (diff) |
properly implement isatty
Diffstat (limited to 'tests/runner.py')
-rwxr-xr-x | tests/runner.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/runner.py b/tests/runner.py index b43fdfd7..d3f4d7c7 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -3711,16 +3711,18 @@ def process(filename): ''' src = r''' #include <stdio.h> + #include <unistd.h> int main () { char c; + fprintf(stderr, "isatty? %d,%d,%d\n", isatty(fileno(stdin)), isatty(fileno(stdout)), isatty(fileno(stderr))); while ((c = fgetc(stdin)) != EOF) { putc(c+5, stdout); } return 0; } ''' - self.do_run(src, 'got: 35\ngot: 45\ngot: 25\ngot: 15\n', post_build=post) + self.do_run(src, 'isatty? 0,0,1\ngot: 35\ngot: 45\ngot: 25\ngot: 15\n', post_build=post) def test_folders(self): add_pre_run = ''' |