3 final class PhabricatorMacroTestCase
4 extends PhabricatorTestCase
{
6 public function testMacroNames() {
7 $lit = "\xF0\x9F\x94\xA5";
8 $combining_diaeresis = "\xCC\x88";
11 // Only 2 glyphs long.
12 "u{$combining_diaeresis}n" => false,
13 "{$lit}{$lit}" => false,
21 "{$lit} {$lit} {$lit}" => false,
26 // Special rejections for only latin symbols.
33 "{$lit}{$lit}{$lit}" => true,
35 "u{$combining_diaeresis}nt" => true,
39 foreach ($cases as $input => $expect) {
42 PhabricatorMacroNameTransaction
::isValidMacroName($input),
43 pht('Validity of macro "%s"', $input));