Re: com php-src: Test function quotemeta() - using an empty string is given as str.: ext/standard/tests/strings/quotemeta_basic_1.phpt
| From: | Nikita Popov | Date: | Sun, 10 Feb 2019 19:18:43 +0000 |
| Subject: | Re: com php-src: Test function quotemeta() - using an empty string is given as str.: ext/standard/tests/strings/quotemeta_basic_1.phpt | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-104517@lists.php.net to get a copy of this message | ||
On Sun, Feb 10, 2019 at 8:07 PM Peter Kokot <petk@php.net> wrote:
> Commit: 27b366c9e4030777f5989407fc708b86f0822e03
> Author: Rodrigo Prado <royopa@gmail.com> Fri, 24 Nov 2017
> 22:46:57 -0200
> Committer: Peter Kokot <peterkokot@gmail.com> Sun, 10 Feb 2019
> 20:06:35 +0100
> Parents: eadfdb96178902f8f46bb6a7673f83863f6beac0
> Branches: PHP-7.4 master
>
> Link:
>
> http://git.php.net/?p=php-src.git;a=commitdiff;h=27b366c9e4030777f5989407fc708b86f0822e03
>
> Log:
> Test function quotemeta() - using an empty string is given as str.
>
> Rodrigo Prado de Jesus <royopa [at] gmail [dot] com>
> User Group: PHPSP #PHPTestFestBrasil
>
> Test function quotemeta() - using an empty string is given as str.
> This test coverage line 2722 from file /ext/standard/string.c and is not a
> ZPP test.
>
> http://gcov.php.net/PHP_HEAD/lcov_html/ext/standard/string.c.gcov.php#L2722
>
> Changed paths:
> A ext/standard/tests/strings/quotemeta_basic_1.phpt
>
>
> Diff:
> diff --git a/ext/standard/tests/strings/quotemeta_basic_1.phpt
> b/ext/standard/tests/strings/quotemeta_basic_1.phpt
> new file mode 100644
> index 0000000..4b479a9
> --- /dev/null
> +++ b/ext/standard/tests/strings/quotemeta_basic_1.phpt
> @@ -0,0 +1,12 @@
> +--TEST--
> +Test function quotemeta() - using an empty string is given as str.
> +--CREDITS--
> +Rodrigo Prado de Jesus <royopa [at] gmail [dot] com>
> +User Group: PHPSP #PHPTestFestBrasil
> +--FILE--
> +<?php
> +$str = "";
> +var_dump(quotemeta($str));
> +?>
> +--EXPECT--
> +bool(false)
>
Huh, that's some really weird behavior. We should change this to return an
empty string in PHP 8.
Nikita