Skip to content

Commit e58e2fd

Browse files
committed
Improve create_verify_dir() diagnostics
If create_verify_dir() fails[1], we need more info why that happened. [1] <https://ci.appveyor.com/project/cmb69/php-src/builds/25324138/job/dm1n12gqhdqa3ln5#L5753>
1 parent 4e9a654 commit e58e2fd

File tree

1 file changed

+7
-1
lines changed
  • ext/standard/tests/file/windows_mb_path

1 file changed

+7
-1
lines changed

ext/standard/tests/file/windows_mb_path/util.inc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,14 @@ function create_verify_dir($prefix, $basename, $cp = 65001)
9494
{
9595
$full = $prefix . DIRECTORY_SEPARATOR . $basename;
9696

97-
if (!mkdir($full) || get_basename_with_cp($full, $cp, false) !== $basename) {
97+
if (!mkdir($full)) {
9898
echo "failed to create dir '$full'\n";
99+
return;
100+
}
101+
102+
$now = get_basename_with_cp($full, $cp, false);
103+
if ($now !== $basename) {
104+
echo "expected '$basename', got '$now'\n";
99105
}
100106
}
101107

0 commit comments

Comments
 (0)