mirror of
https://github.com/nextcloud/notes-android.git
synced 2024-11-26 06:47:03 +03:00
Update MarkdownUtilTest.java
This commit is contained in:
parent
7a81d82592
commit
3924618164
1 changed files with 8 additions and 8 deletions
|
@ -244,42 +244,42 @@ public class MarkdownUtilTest extends TestCase {
|
|||
|
||||
// Special use-case: toggle from italic to bold and back
|
||||
|
||||
// TODO Toggle italic on bold text
|
||||
// Toggle italic on bold text
|
||||
builder = new SpannableStringBuilder("Lorem **ipsum** dolor sit amet.");
|
||||
assertEquals(17, MarkdownUtil.togglePunctuation(builder, 8, 13, "*"));
|
||||
assertEquals("Lorem ***ipsum*** dolor sit amet.", builder.toString());
|
||||
|
||||
// TODO Toggle bold on italic text
|
||||
// Toggle bold on italic text
|
||||
builder = new SpannableStringBuilder("Lorem *ipsum* dolor sit amet.");
|
||||
assertEquals(17, MarkdownUtil.togglePunctuation(builder, 7, 12, "**"));
|
||||
assertEquals("Lorem ***ipsum*** dolor sit amet.", builder.toString());
|
||||
|
||||
// TODO Toggle bold to italic
|
||||
// Toggle bold to italic
|
||||
builder = new SpannableStringBuilder("Lorem **ipsum** dolor sit amet.");
|
||||
assertEquals(17, MarkdownUtil.togglePunctuation(builder, 0, 31, "*"));
|
||||
assertEquals("Lorem ***ipsum*** dolor sit amet.", builder.toString());
|
||||
|
||||
// TODO Toggle multiple bold parts to italic
|
||||
// Toggle multiple bold parts to italic
|
||||
builder = new SpannableStringBuilder("Lorem **ipsum** dolor **sit** amet.");
|
||||
assertEquals(33, MarkdownUtil.togglePunctuation(builder, 0, 34, "*"));
|
||||
assertEquals("Lorem ***ipsum*** dolor ***sit*** amet.", builder.toString());
|
||||
|
||||
// TODO Toggle italic and bold to bold
|
||||
// Toggle italic and bold to bold
|
||||
builder = new SpannableStringBuilder("Lorem ***ipsum*** dolor sit amet.");
|
||||
assertEquals(13, MarkdownUtil.togglePunctuation(builder, 0, 14, "*"));
|
||||
assertEquals("Lorem **ipsum** dolor sit amet.", builder.toString());
|
||||
|
||||
// TODO Toggle italic and bold to italic
|
||||
// Toggle italic and bold to italic
|
||||
builder = new SpannableStringBuilder("Lorem ***ipsum*** dolor sit amet.");
|
||||
assertEquals(12, MarkdownUtil.togglePunctuation(builder, 9, 14, "**"));
|
||||
assertEquals("Lorem *ipsum* dolor sit amet.", builder.toString());
|
||||
|
||||
// TODO Toggle multiple italic and bold to bold
|
||||
// Toggle multiple italic and bold to bold
|
||||
builder = new SpannableStringBuilder("Lorem ***ipsum*** dolor ***sit*** amet.");
|
||||
assertEquals(27, MarkdownUtil.togglePunctuation(builder, 0, 38, "*"));
|
||||
assertEquals("Lorem **ipsum** dolor **sit** amet.", builder.toString());
|
||||
|
||||
// TODO Toggle multiple italic and bold to italic
|
||||
// Toggle multiple italic and bold to italic
|
||||
builder = new SpannableStringBuilder("Lorem ***ipsum*** dolor ***sit*** amet.");
|
||||
assertEquals(24, MarkdownUtil.togglePunctuation(builder, 0, 38, "**"));
|
||||
assertEquals("Lorem *ipsum* dolor *sit* amet.", builder.toString());
|
||||
|
|
Loading…
Reference in a new issue