From: Junio C Hamano <gitster@pobox.com>
To: Kana Natsuno <dev@whileimautomaton.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 1/2] t4018: add missing test cases for PHP
Date: Fri, 06 Jul 2018 14:59:23 -0700 [thread overview]
Message-ID: <xmqq36wwhvpg.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <20180703131540.60789-2-dev@whileimautomaton.net> (Kana Natsuno's message of "Tue, 3 Jul 2018 22:15:39 +0900")
Kana Natsuno <dev@whileimautomaton.net> writes:
> A later patch changes the built-in PHP pattern. These test cases
> demonstrate aspects of the pattern that we do not want to change.
>
> Signed-off-by: Kana Natsuno <dev@whileimautomaton.net>
> ---
> t/t4018/php-class | 4 ++++
> t/t4018/php-function | 4 ++++
> t/t4018/php-method | 7 +++++++
> 3 files changed, 15 insertions(+)
> create mode 100644 t/t4018/php-class
> create mode 100644 t/t4018/php-function
> create mode 100644 t/t4018/php-method
>
> diff --git a/t/t4018/php-class b/t/t4018/php-class
> new file mode 100644
> index 0000000..7785b63
> --- /dev/null
> +++ b/t/t4018/php-class
> @@ -0,0 +1,4 @@
> +class RIGHT
> +{
> + const FOO = 'ChangeMe';
> +}
> diff --git a/t/t4018/php-function b/t/t4018/php-function
> new file mode 100644
> index 0000000..35717c5
> --- /dev/null
> +++ b/t/t4018/php-function
> @@ -0,0 +1,4 @@
> +function RIGHT()
> +{
> + return 'ChangeMe';
> +}
> diff --git a/t/t4018/php-method b/t/t4018/php-method
> new file mode 100644
> index 0000000..03af1a6
> --- /dev/null
> +++ b/t/t4018/php-method
> @@ -0,0 +1,7 @@
> +class Klass
> +{
> + public static function RIGHT()
> + {
> + return 'ChangeMe';
> + }
> +}
I no longer speak PHP, and certainly not the modern variant, but
these examples all look good to me.
Whoever invented the convetion to use RIGHT/ChangeMe in t4018 should
get praised---its brilliance shines in new tests like these ;-)
next prev parent reply other threads:[~2018-07-06 21:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-03 13:15 [PATCH 0/2] userdiff: support new keywords in PHP hunk header Kana Natsuno
2018-07-03 13:15 ` [PATCH 1/2] t4018: add missing test cases for PHP Kana Natsuno
2018-07-06 21:59 ` Junio C Hamano [this message]
2018-07-03 13:15 ` [PATCH 2/2] userdiff: support new keywords in PHP hunk header Kana Natsuno
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqq36wwhvpg.fsf@gitster-ct.c.googlers.com \
--to=gitster@pobox.com \
--cc=dev@whileimautomaton.net \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).