xref: /PHP-8.2/ext/standard/tests/file/gh9227.phpt (revision a1f5c8a5)
1--TEST--
2Bug GH-9227 (Trailing dots and spaces in filenames are ignored)
3--SKIPIF--
4<?php
5if (PHP_OS_FAMILY !== "Windows") die("skip for Windows only");
6?>
7--FILE--
8<?php
9var_dump(realpath(__DIR__ . "/gh9227.txt."));
10var_dump(file_put_contents(__DIR__ . "/gh9227.txt", "bar"));
11var_dump(realpath(__DIR__ . "/gh9227.txt."));
12?>
13--CLEAN--
14<?php
15@unlink(__DIR__ . "/gh9227.txt");
16?>
17--EXPECT--
18bool(false)
19int(3)
20bool(false)
21