Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F122540867
PhutilPregsprintfTestCase.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Fri, Jul 18, 12:21
Size
533 B
Mime Type
text/x-php
Expires
Sun, Jul 20, 12:21 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
27494144
Attached To
rPHU libphutil
PhutilPregsprintfTestCase.php
View Options
<?php
final
class
PhutilPregsprintfTestCase
extends
PhutilTestCase
{
public
function
testPregsprintf
()
{
$this
->
assertEqual
(
chr
(
7
).
'foobar'
.
chr
(
7
),
pregsprintf
(
'%s'
,
''
,
'foobar'
));
$this
->
assertEqual
(
chr
(
7
).
'
\.\*\[
a
\-
z
\]
'
.
chr
(
7
),
pregsprintf
(
'%s'
,
''
,
'.*[a-z]'
));
$this
->
assertEqual
(
chr
(
7
).
'.*[a-z]'
.
chr
(
7
),
pregsprintf
(
'%R'
,
''
,
'.*[a-z]'
));
$this
->
assertEqual
(
chr
(
7
).
'^abc
\.\*
xyz.*$'
.
chr
(
7
).
'siU'
,
pregsprintf
(
'^abc%sxyz%R$'
,
'siU'
,
'.*'
,
'.*'
));
}
}
Event Timeline
Log In to Comment