xref: /PHP-7.2/ext/posix/tests/posix_ttyname.phpt (revision 17ccbeec)
1--TEST--
2Test posix_ttyname()
3--DESCRIPTION--
4Gets the absolute path to the current terminal device that is open on a given file descriptor.
5Source code: ext/posix/posix.c
6--CREDITS--
7Falko Menge, mail at falko-menge dot de
8PHP Testfest Berlin 2009-05-10
9--SKIPIF--
10<?php
11	if (!extension_loaded('posix')) {
12        die('SKIP - POSIX extension not available');
13    }
14?>
15--FILE--
16<?php
17    var_dump(posix_ttyname(STDIN));
18    var_dump(posix_ttyname(STDERR));
19    var_dump(posix_ttyname(STDOUT));
20?>
21===DONE===
22--EXPECTF--
23bool(false)
24bool(false)
25bool(false)
26===DONE===
27