diff options
author | Nuno Lopes <nlopess@php.net> | 2006-12-01 16:37:39 +0000 |
---|---|---|
committer | Nuno Lopes <nlopess@php.net> | 2006-12-01 16:37:39 +0000 |
commit | e65bdffab503c973319c2cb460b782f3f2628752 (patch) | |
tree | 9db93c87d9d99b25e60e7e39c0fb74fd070782e4 /ext/ftp/tests/bug39458-2.phpt | |
parent | 8e0cf441646af567924633452cdbd1af782cdaff (diff) | |
download | php-git-e65bdffab503c973319c2cb460b782f3f2628752.tar.gz |
tests + BFN
Diffstat (limited to 'ext/ftp/tests/bug39458-2.phpt')
-rw-r--r-- | ext/ftp/tests/bug39458-2.phpt | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/ext/ftp/tests/bug39458-2.phpt b/ext/ftp/tests/bug39458-2.phpt new file mode 100644 index 0000000000..4cd2a45236 --- /dev/null +++ b/ext/ftp/tests/bug39458-2.phpt @@ -0,0 +1,36 @@ +--TEST-- +Bug #39458: ftp_nlist() returns false on empty directories (other server behaviour) +--SKIPIF-- +<?php +require 'skipif.inc'; +?> +--FILE-- +<?php +$bug39458=1; +require 'server.inc'; + +$ftp = ftp_connect('127.0.0.1', $port); +if (!$ftp) die("Couldn't connect to the server"); + +var_dump(ftp_login($ftp, 'user', 'pass')); + +var_dump(ftp_nlist($ftp, '')); +var_dump(ftp_nlist($ftp, 'emptydir')); +var_dump(ftp_nlist($ftp, 'bogusdir')); + +ftp_close($ftp); +?> +--EXPECT-- +bool(true) +array(3) { + [0]=> + string(5) "file1" + [1]=> + string(5) "file1" + [2]=> + string(9) "file +b0rk" +} +array(0) { +} +bool(false) |