コード例 #1
0
ファイル: test_ghmarkup.py プロジェクト: google/ghilbert
    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."),
        )
コード例 #2
0
ファイル: test_ghmarkup.py プロジェクト: google/ghilbert
    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.//"),
        )
コード例 #3
0
ファイル: test_ghmarkup.py プロジェクト: google/ghilbert
    def test_unadorned_text(self):
        self.assertEqual(
            """<p>
foo
</p>""",
            ghmarkup.ghmarkup("foo"),
        )
コード例 #4
0
ファイル: test_ghmarkup.py プロジェクト: google/ghilbert
    def test_underscore(self):
        self.assertEqual(
            """<p>
Either _foo or _bar could work.
</p>""",
            ghmarkup.ghmarkup("Either _foo or _bar could work."),
        )
コード例 #5
0
ファイル: test_ghmarkup.py プロジェクト: google/ghilbert
    def test_bold(self):
        self.assertEqual(
            """<p>
the <strong>quick</strong> brown fox
</p>""",
            ghmarkup.ghmarkup("the **quick** brown fox"),
        )
コード例 #6
0
  def test_bullet(self):
    self.assertEqual("""<ul>
<li>
<div>
one
</div>
</li>
</ul>""", ghmarkup.ghmarkup("* one"))
コード例 #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"))
コード例 #8
0
ファイル: test_ghmarkup.py プロジェクト: google/ghilbert
    def test_bullet(self):
        self.assertEqual(
            """<ul>
<li>
<div>
one
</div>
</li>
</ul>""",
            ghmarkup.ghmarkup("* one"),
        )
コード例 #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"))
コード例 #10
0
ファイル: test_ghmarkup.py プロジェクト: google/ghilbert
    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"),
        )
コード例 #11
0
ファイル: test_ghmarkup.py プロジェクト: google/ghilbert
    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"),
        )
コード例 #12
0
 def test_literal(self):
   self.assertEqual(u'<p>\n<tt>#(→ p q)#</tt>\n</p>', ghmarkup.ghmarkup("{{{#(→ p q)#}}}"))
コード例 #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.//"))
コード例 #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."))
コード例 #15
0
  def test_unadorned_text(self):
    self.assertEqual("""<p>
foo
</p>""", ghmarkup.ghmarkup("foo"))
コード例 #16
0
 def test_math(self):
   self.assertEqual(u'<p>\n<span class="sexp">(→ p q)</span>\n</p>', ghmarkup.ghmarkup("#(→ p q)#"))
コード例 #17
0
ファイル: test_ghmarkup.py プロジェクト: google/ghilbert
 def test_math(self):
     self.assertEqual(u'<p>\n<span class="sexp">(→ p q)</span>\n</p>', ghmarkup.ghmarkup("#(→ p q)#"))
コード例 #18
0
  def test_underscore(self):
    self.assertEqual("""<p>
Either _foo or _bar could work.
</p>""", ghmarkup.ghmarkup("Either _foo or _bar could work."))
コード例 #19
0
ファイル: test_ghmarkup.py プロジェクト: google/ghilbert
 def test_literal(self):
     self.assertEqual(u"<p>\n<tt>#(→ p q)#</tt>\n</p>", ghmarkup.ghmarkup("{{{#(→ p q)#}}}"))
コード例 #20
0
  def test_bold(self):
    self.assertEqual("""<p>
the <strong>quick</strong> brown fox
</p>""", ghmarkup.ghmarkup("the **quick** brown fox"))