@@ -0,0 +1,1960 @@
+// Copyright (C) 2013 The Android Open Source Project%0A//%0A// Licensed under the Apache License, Version 2.0 (the %22License%22);%0A// you may not use this file except in compliance with the License.%0A// You may obtain a copy of the License at%0A//%0A// http://www.apache.org/licenses/LICENSE-2.0%0A//%0A// Unless required by applicable law or agreed to in writing, software%0A// distributed under the License is distributed on an %22%3Cp%3EAS IS%22 BASIS,%0A// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A// See the License for the specific language governing permissions and%0A// limitations under the License.%0A%0Apackage com.google.gwtexpui.safehtml.client;%0A%0Aimport org.junit.Test;%0A%0Aimport static org.junit.Assert.assertEquals;%0Aimport static org.junit.Assert.assertNotSame;%0A%0Apublic class SafeHtml_WikifyQuoteTest %7B%0A  private static final String B = %22%3Cblockquote class=%5C%22wikiQuote%5C%22%3E%22;%0A  private static final String E = %22%3C/blockquote%3E%22;%0A%0A  private static String quote(String raw) %7B%0A    return B + raw + E;%0A  %7D%0A%0A  @Test%0A  public void testQuote1() %7B%0A    final SafeHtml o = html(%22%3E I'm happy%5Cn %3E with quotes!%5Cn%5CnSee above.%22);%0A    final SafeHtml n = o.wikify();%0A    assertNotSame(o, n);%0A    assertEquals(%0A        quote(%22I&#39;m happy%5Cnwith quotes!%22)%0A        + %22%3Cp%3ESee above.%3C/p%3E%22,%0A      n.asString());%0A  %7D%0A%0A  @Test%0A  public void testQuote2() %7B%0A    final SafeHtml o = html(%22See this said:%5Cn%5Cn %3E a quoted%5Cn %3E string block%5Cn%5CnOK?%22);%0A    final SafeHtml n = o.wikify();%0A    assertNotSame(o, n);%0A    assertEquals(%0A        %22%3Cp%3ESee this said:%3C/p%3E%22%0A        + quote(%22a quoted%5Cnstring block%22)%0A        + %22%3Cp%3EOK?%3C/p%3E%22,%0A      n.asString());%0A  %7D%0A%0A  @Test%0A  public void testNestedQuotes1() %7B%0A    final SafeHtml o = html(%22 %3E %3E prior%5Cn %3E %5Cn %3E next%5Cn%22);%0A    final SafeHtml n = o.wikify();%0A    assertEquals(%0A      quote(quote(%22prior%22) + %22next%5Cn%22),%0A      n.asString());%0A  %7D%0A%0A  private static SafeHtml html(String text) %7B%0A    return new SafeHtmlBuilder().append(text).toSafeHtml();%0A  %7D%0A%7D%0A

Add test for reply quoting in wikify()