Skip to content

Commit 5390999

Browse files
committed
More tests.
1 parent a33aadc commit 5390999

File tree

1 file changed

+63
-2
lines changed

1 file changed

+63
-2
lines changed

Tests/MarkdownTests.cs

Lines changed: 63 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,14 +208,63 @@ public void NestedWithIncreasingLevel()
208208
[TestMethod()]
209209
public void MultipleEquallyNested()
210210
{
211-
DoTest("*this **is** some __nested__ test __again__*",
211+
DoTest("*this **is** some ___nested___ test ***yet*** and __again__*",
212212
("*this ", ClassificationEnum.EmphasisMinor),
213213
("**is**", ClassificationEnum.EmphasisHuge),
214214
(" some ", ClassificationEnum.EmphasisMinor),
215-
("__nested__", ClassificationEnum.EmphasisHuge),
215+
("___nested___", ClassificationEnum.EmphasisHuge),
216216
(" test ", ClassificationEnum.EmphasisMinor),
217+
("***yet***", ClassificationEnum.EmphasisHuge),
218+
(" and ", ClassificationEnum.EmphasisMinor),
217219
("__again__", ClassificationEnum.EmphasisHuge),
218220
("*", ClassificationEnum.EmphasisMinor));
221+
222+
DoTest("**this *is* some ___nested___ test ***yet*** and __again__**",
223+
("**this ", ClassificationEnum.EmphasisMajor),
224+
("*is*", ClassificationEnum.EmphasisHuge),
225+
(" some ", ClassificationEnum.EmphasisMajor),
226+
("___nested___", ClassificationEnum.EmphasisHuge),
227+
(" test ", ClassificationEnum.EmphasisMajor),
228+
("***yet***", ClassificationEnum.EmphasisHuge),
229+
(" and __again__**", ClassificationEnum.EmphasisMajor));
230+
231+
DoTest("***this *is* some ___nested___ test **yet** and __again__***",
232+
("***this *is* some ___nested___ test **yet** and __again__***", ClassificationEnum.EmphasisHuge));
233+
234+
// Not actually nested.
235+
DoTest("*this *is* some ___not nested___ test __beware__*",
236+
("*this *is*", ClassificationEnum.EmphasisMinor),
237+
("___not nested___", ClassificationEnum.EmphasisHuge),
238+
("__beware__", ClassificationEnum.EmphasisMajor));
239+
240+
DoTest("_this __is__ some ***nested*** test ___yet___ and **again**_",
241+
("_this ", ClassificationEnum.EmphasisMinor),
242+
("__is__", ClassificationEnum.EmphasisHuge),
243+
(" some ", ClassificationEnum.EmphasisMinor),
244+
("***nested***", ClassificationEnum.EmphasisHuge),
245+
(" test ", ClassificationEnum.EmphasisMinor),
246+
("___yet___", ClassificationEnum.EmphasisHuge),
247+
(" and ", ClassificationEnum.EmphasisMinor),
248+
("**again**", ClassificationEnum.EmphasisHuge),
249+
("_", ClassificationEnum.EmphasisMinor));
250+
251+
DoTest("__this _is_ some ***nested*** test ___yet___ and **again**__",
252+
("__this ", ClassificationEnum.EmphasisMajor),
253+
("_is_", ClassificationEnum.EmphasisHuge),
254+
(" some ", ClassificationEnum.EmphasisMajor),
255+
("***nested***", ClassificationEnum.EmphasisHuge),
256+
(" test ", ClassificationEnum.EmphasisMajor),
257+
("___yet___", ClassificationEnum.EmphasisHuge),
258+
(" and **again**__", ClassificationEnum.EmphasisMajor));
259+
260+
DoTest("___this _is_ some ***nested*** test __yet__ and **again**___",
261+
("___this _is_ some ***nested*** test __yet__ and **again**___", ClassificationEnum.EmphasisHuge));
262+
263+
// Not actually nested.
264+
DoTest("_this _is_ some ***not nested*** test **beware**_",
265+
("_this _is_", ClassificationEnum.EmphasisMinor),
266+
("***not nested***", ClassificationEnum.EmphasisHuge),
267+
("**beware**", ClassificationEnum.EmphasisMajor));
219268
}
220269

221270

@@ -290,6 +339,18 @@ public void SurroundingCharactersAtMarkers()
290339
DoTest("*_*Some test*_*", ("*_*Some test*", ClassificationEnum.EmphasisMinor));
291340
DoTest("_*_Some test_*_", ("_*_Some test_", ClassificationEnum.EmphasisMinor));
292341
}
342+
343+
344+
[TestMethod()]
345+
public void MultipleSeparateBlocks()
346+
{
347+
DoTest("This *is some* test with _multiple emphasis_ markers. **It continues *on* some** more!",
348+
("*is some*", ClassificationEnum.EmphasisMinor),
349+
("_multiple emphasis_", ClassificationEnum.EmphasisMinor),
350+
("**It continues ", ClassificationEnum.EmphasisMajor),
351+
("*on*", ClassificationEnum.EmphasisHuge),
352+
(" some**", ClassificationEnum.EmphasisMajor));
353+
}
293354
}
294355
}
295356

0 commit comments

Comments
 (0)