Add support for 4 non-positional attributes

- adds tests
 - fixes #1611
This commit is contained in:
Connor Tumbleson
2017-09-19 17:02:42 -04:00
parent f0f87c844e
commit bc00cce9bd
2 changed files with 12 additions and 2 deletions

View File

@ -51,6 +51,16 @@ public class PositionalEnumerationTest {
assertEquals(" %1$s, %2$s and %3$d other", enumerateArguments(" %1$s, %2$s and %3$d other"));
}
@Test
public void fourArgumentsTest() {
assertEquals("%1$s, %2$s, and %3$d other and %4$d.", enumerateArguments("%s, %s, and %d other and %d."));
}
@Test
public void fourPositionalArgumentsTest() {
assertEquals(" %1$s, %2$s and %3$d other and %4$d.", enumerateArguments(" %1$s, %2$s and %3$d other and %4$d."));
}
private String enumerateArguments(String value) {
return ResXmlEncoders.enumerateNonPositionalSubstitutionsIfRequired(value);
}