Encode UTF-8 characters used in Java test sources

A pass-through the native2ascii tool.

Issue: SPR-9657
master
Rossen Stoyanchev 12 years ago
parent b3f0b6e2d6
commit de6f74fa40
  1. 3
      spring-webmvc/src/test/java/org/springframework/web/servlet/support/AbstractFlashMapManagerTests.java
  2. 2
      spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/SelectTagTests.java
  3. 2
      spring-webmvc/src/test/java/org/springframework/web/servlet/view/BaseViewTests.java

@ -276,7 +276,8 @@ public class AbstractFlashMapManagerTests {
flashMap.addTargetRequestParam("key", "%D0%92%D0%92"); flashMap.addTargetRequestParam("key", "%D0%92%D0%92");
this.flashMapManager.saveOutputFlashMap(flashMap, this.request, this.response); this.flashMapManager.saveOutputFlashMap(flashMap, this.request, this.response);
assertEquals(Arrays.asList("АА", "ББ", "ВВ"), flashMap.getTargetRequestParams().get("key")); assertEquals(Arrays.asList("\u0410\u0410", "\u0411\u0411", "\u0412\u0412"),
flashMap.getTargetRequestParams().get("key"));
} }

@ -651,7 +651,7 @@ public class SelectTagTests extends AbstractFormTagTests {
// Save original default locale. // Save original default locale.
final Locale defaultLocale = Locale.getDefault(); final Locale defaultLocale = Locale.getDefault();
// Use a locale that doesn't result in the generation of HTML entities // Use a locale that doesn't result in the generation of HTML entities
// (e.g., not German, where ä becomes ä) // (e.g., not German, where \u00e4 becomes ä)
Locale.setDefault(Locale.US); Locale.setDefault(Locale.US);
try { try {

@ -239,7 +239,7 @@ public class BaseViewTests extends TestCase {
public void testAttributeCSVParsingValidWithWeirdCharacters() { public void testAttributeCSVParsingValidWithWeirdCharacters() {
AbstractView v = new ConcreteView(); AbstractView v = new ConcreteView();
String fooval = "owfie fue&3[][[[2 \n\n \r \t 8<EFBFBD>3"; String fooval = "owfie fue&3[][[[2 \n\n \r \t 8\ufffd3";
// Also tests empty value // Also tests empty value
String kingval = ""; String kingval = "";
v.setAttributesCSV("foo=(" + fooval + "),king={" + kingval + "},f1=[we]"); v.setAttributesCSV("foo=(" + fooval + "),king={" + kingval + "},f1=[we]");

Loading…
Cancel
Save