From 97c530fece03bb42b43137b8542d33a4a09f31c7 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Mon, 30 May 2016 12:47:04 +0200 Subject: Add test for bug #72258 --- ext/zip/tests/bug72258.phpt | 26 ++++++++++++++++++++++++++ ext/zip/tests/bug72258.zip | Bin 0 -> 110 bytes 2 files changed, 26 insertions(+) create mode 100644 ext/zip/tests/bug72258.phpt create mode 100644 ext/zip/tests/bug72258.zip (limited to 'ext/zip/tests') diff --git a/ext/zip/tests/bug72258.phpt b/ext/zip/tests/bug72258.phpt new file mode 100644 index 0000000000..0e0c8c1a71 --- /dev/null +++ b/ext/zip/tests/bug72258.phpt @@ -0,0 +1,26 @@ +--TEST-- +Bug #72258 ZipArchive converts fns to unrecoverable form +--SKIPIF-- + +--FILE-- +open($fn); +if ($res !== true) { + echo 'Error opening: ' . $res; + die(); +} + +for ($i = 0; $i < $zip->numFiles; $i++) { + $fnInArc = $zip->getNameIndex($i, ZipArchive::FL_ENC_RAW); + var_dump($fnInArc); +} +?> +--EXPECT-- +string(6) "/" diff --git a/ext/zip/tests/bug72258.zip b/ext/zip/tests/bug72258.zip new file mode 100644 index 0000000000..07ea2e4948 Binary files /dev/null and b/ext/zip/tests/bug72258.zip differ -- cgit v1.2.1 From 933d6b188c62bea6e10e67bea97ac23f51f6ecce Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Mon, 30 May 2016 12:48:00 +0200 Subject: fix test title --- ext/zip/tests/bug72258.phpt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/zip/tests') diff --git a/ext/zip/tests/bug72258.phpt b/ext/zip/tests/bug72258.phpt index 0e0c8c1a71..87ba618450 100644 --- a/ext/zip/tests/bug72258.phpt +++ b/ext/zip/tests/bug72258.phpt @@ -1,5 +1,5 @@ --TEST-- -Bug #72258 ZipArchive converts fns to unrecoverable form +Bug #72258 ZipArchive converts filenames to unrecoverable form --SKIPIF--