コード例 #1
0
ファイル: anki_card_tests.py プロジェクト: gropax/qcard.py
 def test_format_field_with_tabs(self):
     s = AnkiCard.format_field("str\twith\ttabs")
     assert_equal(s, '"str\twith\ttabs"')
コード例 #2
0
ファイル: anki_card_tests.py プロジェクト: gropax/qcard.py
 def test_format_field_with_latex_option(self):
     s = AnkiCard.format_field("\\superlatex{tag}", format="latex")
     assert_equal(s, "[latex]\\superlatex{tag}[/latex]")
コード例 #3
0
ファイル: anki_card_tests.py プロジェクト: gropax/qcard.py
 def test_format_field_with_quotes(self):
     s = AnkiCard.format_field('str "with" quotes')
     assert_equal(s, "str "with" quotes")
コード例 #4
0
ファイル: anki_card_tests.py プロジェクト: gropax/qcard.py
 def test_format_field_with_newlines(self):
     s = AnkiCard.format_field("str\nwith\nnewlines")
     assert_equal(s, '"str\nwith\nnewlines"')