diff options
author | Urban Müller | 2018-06-19 23:11:45 +0200 |
---|---|---|
committer | Urban Müller | 2018-06-19 23:11:45 +0200 |
commit | c8319c784267f81e2884a076365b8ca36f4ce0b2 (patch) | |
tree | e5158a849b1a218f9f1857d4e95b7b5bc075f9b2 /tests/it.t | |
parent | 4cd6a23b8c2a5f20f51d2a53b65bd7586e367a3c (diff) | |
download | itools-c8319c784267f81e2884a076365b8ca36f4ce0b2.tar.gz itools-c8319c784267f81e2884a076365b8ca36f4ce0b2.tar.bz2 itools-c8319c784267f81e2884a076365b8ca36f4ce0b2.zip |
remove unused $context in it::fopen (null not allowed), add and fix tests
Diffstat (limited to 'tests/it.t')
-rwxr-xr-x | tests/it.t | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -463,9 +463,12 @@ is(it::split("(b)", "aba", ['delim_capture' => true]), ["a", "b", "a"]); is(it::split("b", "aabaa", ['offset_capture' => true]), [["aa", 0], ["aa", 3]]); it::file_put_contents("/tmp/it_test", "aa"); -is(($fh = fopen("/tmp/it_test", "r")) ? fgets($fh) : null, "aa"); +is(($fh = it::fopen("/tmp/it_test", "r")) ? fgets($fh) : null, "aa"); is(it::file_get_contents("/tmp/it_test"), "aa"); is(it::file("/tmp/it_test"), ["aa"]); +ob_start(); +it::readfile("/tmp/it_test"); +is(ob_get_clean(), "aa"); it::file_put("/tmp/it_test", "bb"); is(it::file_get("/tmp/it_test"), "bb"); |