mirror of
https://github.com/danog/ext-uv.git
synced 2024-11-27 04:24:45 +01:00
19 lines
343 B
Plaintext
19 lines
343 B
Plaintext
|
--TEST--
|
||
|
Check for uv_tty
|
||
|
--FILE--
|
||
|
<?php
|
||
|
uv_fs_open(uv_default_loop(), "/dev/tty", UV::O_RDONLY, 0, function($r){
|
||
|
$tty = uv_tty_init(uv_default_loop(), $r, 1);
|
||
|
uv_tty_get_winsize($tty, $width, $height);
|
||
|
if ($width >= 0) {
|
||
|
echo "OK\n";
|
||
|
}
|
||
|
if ($height >= 0) {
|
||
|
echo "OK\n";
|
||
|
}
|
||
|
});
|
||
|
|
||
|
uv_run();
|
||
|
--EXPECT--
|
||
|
OK
|
||
|
OK
|