Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F3281697
PhutilGitsprintfTestCase.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
765 B
Referenced Files
None
Subscribers
None
PhutilGitsprintfTestCase.php
View Options
<?php
final
class
PhutilGitsprintfTestCase
extends
PhutilTestCase
{
public
function
testHgsprintf
(
)
{
$selectors
=
array
(
'HEAD'
=>
'HEAD'
,
'master'
=>
'master'
,
'a..b'
=>
'a..b'
,
'feature^'
=>
'feature^'
,
'--flag'
=>
false
,
)
;
foreach
(
$selectors
as
$input
=>
$expect
)
{
$caught
=
null
;
try
{
$output
=
gitsprintf
(
'%s'
,
$input
)
;
}
catch
(
Exception
$ex
)
{
$caught
=
$ex
;
}
catch
(
Throwable
$ex
)
{
$caught
=
$ex
;
}
if
(
$caught
!==
null
)
{
$actual
=
false
;
}
else
{
$actual
=
$output
;
}
$this
->
assertEqual
(
$expect
,
$actual
,
pht
(
'Result for input "%s".'
,
$input
)
)
;
}
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, Mar 24, 00:42 (13 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1119855
Default Alt Text
PhutilGitsprintfTestCase.php (765 B)
Attached To
Mode
rARC Arcanist
Attached
Detach File
Event Timeline
Log In to Comment