Beispiel #1
0
    def test_asterisk(self):
        self.assertEqual(
            """<p>
We find *3.42 more helpful than *7.82 here.
</p>""",
            ghmarkup.ghmarkup("We find *3.42 more helpful than *7.82 here."),
        )
Beispiel #2
0
    def test_italics(self):
        self.assertEqual(
            """<p>
, which implies our result. <em>Here we are using the compactness of S.</em>
</p>""",
            ghmarkup.ghmarkup(", which implies our result. //Here we are using the compactness of S.//"),
        )
Beispiel #3
0
    def test_unadorned_text(self):
        self.assertEqual(
            """<p>
foo
</p>""",
            ghmarkup.ghmarkup("foo"),
        )
Beispiel #4
0
    def test_underscore(self):
        self.assertEqual(
            """<p>
Either _foo or _bar could work.
</p>""",
            ghmarkup.ghmarkup("Either _foo or _bar could work."),
        )
Beispiel #5
0
    def test_bold(self):
        self.assertEqual(
            """<p>
the <strong>quick</strong> brown fox
</p>""",
            ghmarkup.ghmarkup("the **quick** brown fox"),
        )
Beispiel #6
0
  def test_bullet(self):
    self.assertEqual("""<ul>
<li>
<div>
one
</div>
</li>
</ul>""", ghmarkup.ghmarkup("* one"))
Beispiel #7
0
  def test_no_blank_line_before_bullet(self):
    self.assertEqual("""<p>
Animals:
</p>
<ul>
<li>
<div>
dog
</div>
</li>
</ul>""", ghmarkup.ghmarkup("Animals:\n* dog"))
Beispiel #8
0
    def test_bullet(self):
        self.assertEqual(
            """<ul>
<li>
<div>
one
</div>
</li>
</ul>""",
            ghmarkup.ghmarkup("* one"),
        )
Beispiel #9
0
  def test_two_bullets(self):
    self.assertEqual("""<ul>
<li>
<div>
one
</div>
</li>
<li>
<div>
two
</div>
</li>
</ul>""", ghmarkup.ghmarkup("* one\n* two\n"))
Beispiel #10
0
    def test_no_blank_line_before_bullet(self):
        self.assertEqual(
            """<p>
Animals:
</p>
<ul>
<li>
<div>
dog
</div>
</li>
</ul>""",
            ghmarkup.ghmarkup("Animals:\n* dog"),
        )
Beispiel #11
0
    def test_two_bullets(self):
        self.assertEqual(
            """<ul>
<li>
<div>
one
</div>
</li>
<li>
<div>
two
</div>
</li>
</ul>""",
            ghmarkup.ghmarkup("* one\n* two\n"),
        )
Beispiel #12
0
 def test_literal(self):
   self.assertEqual(u'<p>\n<tt>#(→ p q)#</tt>\n</p>', ghmarkup.ghmarkup("{{{#(→ p q)#}}}"))
Beispiel #13
0
  def test_italics(self):
    self.assertEqual("""<p>
, which implies our result. <em>Here we are using the compactness of S.</em>
</p>""", ghmarkup.ghmarkup(", which implies our result. //Here we are using the compactness of S.//"))
Beispiel #14
0
  def test_asterisk(self):
    self.assertEqual("""<p>
We find *3.42 more helpful than *7.82 here.
</p>""", ghmarkup.ghmarkup("We find *3.42 more helpful than *7.82 here."))
Beispiel #15
0
  def test_unadorned_text(self):
    self.assertEqual("""<p>
foo
</p>""", ghmarkup.ghmarkup("foo"))
Beispiel #16
0
 def test_math(self):
   self.assertEqual(u'<p>\n<span class="sexp">(→ p q)</span>\n</p>', ghmarkup.ghmarkup("#(→ p q)#"))
Beispiel #17
0
 def test_math(self):
     self.assertEqual(u'<p>\n<span class="sexp">(→ p q)</span>\n</p>', ghmarkup.ghmarkup("#(→ p q)#"))
Beispiel #18
0
  def test_underscore(self):
    self.assertEqual("""<p>
Either _foo or _bar could work.
</p>""", ghmarkup.ghmarkup("Either _foo or _bar could work."))
Beispiel #19
0
 def test_literal(self):
     self.assertEqual(u"<p>\n<tt>#(→ p q)#</tt>\n</p>", ghmarkup.ghmarkup("{{{#(→ p q)#}}}"))
Beispiel #20
0
  def test_bold(self):
    self.assertEqual("""<p>
the <strong>quick</strong> brown fox
</p>""", ghmarkup.ghmarkup("the **quick** brown fox"))