mirror of
https://github.com/danog/ext-uv.git
synced 2024-11-30 04:29:01 +01:00
20 lines
345 B
PHP
20 lines
345 B
PHP
--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
|