Add test to detect bad value for DIRECTION in lang file

This commit is contained in:
Laurent Destailleur 2021-05-03 15:24:19 +02:00
parent 914d27990d
commit be8b866b39

View File

@ -184,6 +184,10 @@ class LangTest extends PHPUnit\Framework\TestCase
$tmplangs->setDefaultLang($langcode);
$tmplangs->load("main");
$result=$tmplangs->transnoentitiesnoconv("DIRECTION");
print __METHOD__." DIRECTION=".$result."\n";
$this->assertTrue(in_array($result, array('rtl', 'ltr')), 'Error for vale of DIRECTION in main.lang file '.$code);
$result=$tmplangs->transnoentitiesnoconv("SeparatorDecimal");
print __METHOD__." SeparatorDecimal=".$result."\n";
$this->assertContains($result, array('.',',','/',' ','','None'), 'Error for decimal separator for lang code '.$code); // Note that ، that is coma for RTL languages is not supported