fix regression of lang qualifiers

- values-xx was improperly decoded as values-b+xx
 - added unit test
This commit is contained in:
Connor Tumbleson
2015-04-11 12:39:38 -05:00
parent 1bb8ec02b2
commit bb6cd98dfa
3 changed files with 19 additions and 8 deletions

View File

@ -207,6 +207,11 @@ public class BuildAndDecodeTest {
compareValuesFiles("values-ast/strings.xml");
}
@Test
public void twoLetterNotHandledAsBcpTest() throws BrutException, IOException {
checkFolderExists("res/values-fr");
}
@Test
public void twoLetterLangBcp47Test() throws BrutException, IOException {
compareValuesFiles("values-en-rUS/strings.xml");
@ -361,6 +366,12 @@ public class BuildAndDecodeTest {
compareXmlFiles(path, null);
}
private void checkFolderExists(String path) throws BrutException {
File f = new File(sTestNewDir, path);
assertTrue(f.isDirectory());
}
private void compareXmlFiles(String path, ElementQualifier qualifier)
throws BrutException {
DetailedDiff diff;