Commit graph

5 commits

Author SHA1 Message Date
C. Scott Ananian
f5bf2f23b7 Parser: remove leftover "transparent hook" code
Followup-To: I8384f47bbcde7604efa41b83db0dbc4f429219a8
Change-Id: I6da8cefad8bc70631277f9b7bd5d1af5474259ab
2020-01-28 20:10:20 -05:00
Thiemo Kreuz
a0770d278b Rewrite confusing loop in TestFileEditor helper class
I had to write a little test to understand what this loop is supposed
to do: All it really does is counting the number of consecutive empty
lines in the $this->lines array, starting at the offset $this->pos.

The only edge-case is when the array does not contain anything but empty
lines. In this case, the last empty line is skipped. This is because
explode( …, "\n\n\n" ) returns 4 elements, but we want to count the
number of newline characters, which is 3.

Change-Id: I74ae1ed6ba0a8d65a92a1dd07f681fd7ae4221b4
2019-11-11 10:29:18 +01:00
Huji Lee
e74bfe13f6 Require indentation of CASE statements in PHP code
Bug: T182546
Change-Id: I91a9555893a08e4ec58da97c6cc4d1e70000ff6b
2017-12-10 22:07:50 -05:00
Kunal Mehta
1deada4f7f parser test editor: Fix emitting of !! hooks
The first newline was missing so a block like:
 !! hooks
 source
 !! endhooks

would turn into:
 !! hookssource
 !! endhooks

Change-Id: I2a4c5e52050d55fb0c9b4f5d0494eb00e34b233c
2017-01-31 03:12:15 +00:00
Tim Starling
d831844364 Parser test file editor
Add editTests.php, which provides an interactive interface to the
parser tests, with semi-automated editing.

Change-Id: I1a20d007ba4627d562a16c03849bbad7aec0e516
2016-10-28 16:15:59 +11:00