Page MenuHomePhabricator

Add unit tests for `ArcanistFilenameLinter`
ClosedPublic

Authored by joshuaspence on Jan 12 2015, 8:06 AM.
Tags
None
Referenced Files
F13983997: D11341.diff
Sun, Oct 20, 10:12 AM
F13979259: D11341.id27267.diff
Sat, Oct 19, 3:35 AM
F13977206: D11341.id27247.diff
Fri, Oct 18, 5:37 PM
F13974491: D11341.id27266.diff
Fri, Oct 18, 5:51 AM
F13967419: D11341.id27245.diff
Wed, Oct 16, 1:31 PM
F13958492: D11341.id.diff
Mon, Oct 14, 3:04 PM
Unknown Object (File)
Sat, Oct 12, 9:12 AM
Unknown Object (File)
Oct 3 2024, 3:18 AM
Subscribers

Details

Summary

Self-explanatory.

Test Plan

arc unit

Diff Detail

Repository
rARC Arcanist
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

joshuaspence retitled this revision from to Add unit tests for `ArcanistFilenameLinter`.
joshuaspence updated this object.
joshuaspence edited the test plan for this revision. (Show Details)
joshuaspence added a reviewer: epriestley.
epriestley edited edge metadata.

See inline.

src/lint/linter/__tests__/ArcanistLinterTestCase.php
211

I don't think this is right? $pos will alway be a scalar, and this will always cast it into array($pos) and always discard character information.

$ php -r 'list($a, $b) = explode(":", "1:2:3"); $b = (array)$b; print_r($b);'
Array
(
    [0] => 2
)
This revision now requires changes to proceed.Jan 12 2015, 4:06 PM

The code would work as written if list($a, $b) unpacked the first argument into $a and all remaining arguments into $b, but list() does not do that. Maybe that was the thinking?

The code would work as written if list($a, $b) unpacked the first argument into $a and all remaining arguments into $b, but list() does not do that. Maybe that was the thinking?

Yeah, for some reason I thought that PHP was a sane language.

joshuaspence edited edge metadata.

Learn how PHP works

epriestley edited edge metadata.
This revision is now accepted and ready to land.Jan 12 2015, 7:46 PM
This revision was automatically updated to reflect the committed changes.