add unit test for LanguageTag::isValidBcp47() with bDisallowPrivate
Change-Id: I58089bc00c640bb1d8461d8f482ad623f9566e76
This commit is contained in:
parent
fecde4c709
commit
a31f53d058
1 changed files with 4 additions and 0 deletions
|
@ -592,7 +592,11 @@ void TestLanguageTag::testAllTags()
|
|||
OUString aCanonicalized;
|
||||
CPPUNIT_ASSERT( LanguageTag::isValidBcp47( "en-US", &aCanonicalized) && aCanonicalized == "en-US" );
|
||||
CPPUNIT_ASSERT( LanguageTag::isValidBcp47( "x-foobar", &aCanonicalized) && aCanonicalized == "x-foobar" );
|
||||
CPPUNIT_ASSERT( LanguageTag::isValidBcp47( "qaa", &aCanonicalized) && aCanonicalized == "qaa" );
|
||||
CPPUNIT_ASSERT( !LanguageTag::isValidBcp47( "unreg-and-bad", &aCanonicalized) );
|
||||
CPPUNIT_ASSERT( LanguageTag::isValidBcp47( "en-US", &aCanonicalized, true) && aCanonicalized == "en-US" );
|
||||
CPPUNIT_ASSERT( !LanguageTag::isValidBcp47( "x-foobar", &aCanonicalized, true) && aCanonicalized == "x-foobar" );
|
||||
CPPUNIT_ASSERT( LanguageTag::isValidBcp47( "qaa", &aCanonicalized, true) && aCanonicalized == "qaa" );
|
||||
#if USE_LIBLANGTAG
|
||||
CPPUNIT_ASSERT( LanguageTag::isValidBcp47( "de-Latn-DE", &aCanonicalized) && aCanonicalized == "de-DE" );
|
||||
/* TODO: at least some (those we know) grandfathered tags should be
|
||||
|
|
Loading…
Reference in a new issue