@@ -0,0 +1,1545 @@
+package yuku.alkitab.test;%0A%0Aimport android.test.AndroidTestCase;%0Aimport android.text.SpannedString;%0Aimport android.widget.TextView;%0Aimport yuku.alkitab.base.widget.PericopeRenderer;%0A%0Apublic class PericopeRendererTest extends AndroidTestCase %7B%0A%09public void testPericopeRenderer() %7B%0A%09%09TextView textView = new TextView(getContext());%0A%0A%09%09// test robustness%0A%09%09PericopeRenderer.render(textView, %22123%22);%0A%09%09assertEquals(%22123%22, textView.getText().toString());%0A%09%09PericopeRenderer.render(textView, %22@123%22);%0A%09%09assertEquals(%22@123%22, textView.getText().toString());%0A%09%09PericopeRenderer.render(textView, %22@@123%22);%0A%09%09assertEquals(%22123%22, textView.getText().toString());%0A%0A%09%09// test italic%0A%09%09PericopeRenderer.render(textView, %22@@@9ab@7%22);%0A%09%09assertEquals(%22ab%22, textView.getText().toString());%0A%09%09PericopeRenderer.render(textView, %22@@@9ab@7cd%22);%0A%09%09assertEquals(%22abcd%22, textView.getText().toString());%0A%09%09PericopeRenderer.render(textView, %22@@ab@9cd@7%22);%0A%09%09assertEquals(%22abcd%22, textView.getText().toString());%0A%0A%09%09PericopeRenderer.render(textView, %22@@ab@9cd@7ef@9gh@7ij%22);%0A%09%09SpannedString text = (SpannedString) textView.getText();%0A%09%09final Object%5B%5D spans = text.getSpans(0, text.length(), Object.class);%0A%09%09assertEquals(2, spans.length);%0A%09%09assertEquals(2, text.getSpanStart(spans%5B0%5D));%0A%09%09assertEquals(4, text.getSpanEnd(spans%5B0%5D));%0A%09%09assertEquals(6, text.getSpanStart(spans%5B1%5D));%0A%09%09assertEquals(8, text.getSpanEnd(spans%5B1%5D));%0A%0A%09%09PericopeRenderer.render(textView, %22@@rr@@ab@9cd@9@@9@9@@&@&7&77@@7@7@7%22);%0A%09%09assertTrue(textView.getText().toString().startsWith(%22rrabcd%22));%0A%09%7D%0A%7D%0A

Add pericope renderer test