forked from chobie/php-uv
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add test for fs_close issue described in chobie#36, updating travis b…
…uild
- Loading branch information
1 parent
59f74ea
commit 9d6e66d
Showing
3 changed files
with
36 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--TEST-- | ||
Check for fs read and close | ||
--FILE-- | ||
<?php | ||
define("FIXTURE_PATH", dirname(__FILE__) . "/fixtures/hello.data"); | ||
|
||
uv_fs_open(uv_default_loop(),FIXTURE_PATH, UV::O_RDONLY, 0, function($r){ | ||
uv_fs_read(uv_default_loop(),$r,32,function($stream, $nread, $data) { | ||
uv_fs_close(uv_default_loop(), 42, function($result) { | ||
if($result != 42) { | ||
echo "OK"; | ||
} | ||
}); | ||
}); | ||
}); | ||
|
||
uv_run(); | ||
--EXPECT-- | ||
OK |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
set -e | ||
set -o pipefail | ||
|
||
# install 'libuv' | ||
git clone --recursive --branch v1.0.0-rc2 --depth 1 https://github.com/joyent/libuv.git | ||
pushd libuv | ||
./autogen.sh && ./configure && make && sudo make install | ||
popd | ||
|
||
#install 'php-uv' | ||
phpize && ./configure --with-uv --enable-httpparser && make && sudo make install | ||
echo "extension=uv.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"` |