コード例 #1
0
def test_latex():
    latex = """
    \documentclass{article}
    \\begin{document}
    Hello
    \\end{document}
    """
    assert_in_output("example.tex|latex", latex, "")
コード例 #2
0
ファイル: test_stdout_filters.py プロジェクト: mrflip/dexy
def test_ragel_ruby():
    machine = """
    %%{
      machine hello;
      expr = "h";
      main := expr @ { puts "hello world!" } ;
    }%%
    """
    assert_in_output("input.rl|rlrbd", machine, "digraph hello")
コード例 #3
0
ファイル: test_pexpect_filters.py プロジェクト: mrflip/dexy
def test_clojure():
    clojure = """(defn factorial
 ([n]
  (factorial n 1))
 ([n acc]
  (if  (= n 0)   acc
   (recur (dec n) (* acc n)))))
(factorial 10)"""
    assert_in_output("example.clj|clj", clojure, "3628800")
コード例 #4
0
def test_wiki2beamer():
    wiki = inspect.cleandoc("""==== A simple frame ====
    * with a funky
    * bullet list
    *# and two
    *# numbered sub-items
    """)

    assert_in_output('wiki2beamer', wiki, "\\begin{frame}")
    assert_in_output('wiki2beamer', wiki, "\\begin{enumerate}")
コード例 #5
0
ファイル: test_stdout_filters.py プロジェクト: aioupload/dexy
def test_wiki2beamer():
    wiki = inspect.cleandoc("""==== A simple frame ====
    * with a funky
    * bullet list
    *# and two
    *# numbered sub-items
    """)

    assert_in_output('wiki2beamer', wiki, "\\begin{frame}")
    assert_in_output('wiki2beamer', wiki, "\\begin{enumerate}")
コード例 #6
0
ファイル: test_stdout_filters.py プロジェクト: aioupload/dexy
def test_rd():
    rd = """
     \\name{load}
     \\alias{load}
     \\title{Reload Saved Datasets}
     \description{
       Reload the datasets written to a file with the function
       \code{save}.
     }
    """
    expected = u"Reload the datasets written to a file with the function \u2018save\u2019."
    assert_in_output('rdconv', rd, expected, ext=".Rd")
コード例 #7
0
def test_rd():
    rd = """
     \\name{load}
     \\alias{load}
     \\title{Reload Saved Datasets}
     \description{
       Reload the datasets written to a file with the function
       \code{save}.
     }
    """
    expected = u"Reload the datasets written to a file with the function \u2018save\u2019."
    assert_in_output('rdconv', rd, expected, ext=".Rd")
コード例 #8
0
ファイル: test_stdout_filters.py プロジェクト: aioupload/dexy
def test_ragel_ruby_dot():
    ragel = inspect.cleandoc("""
        %%{
          machine hello_and_welcome;
          main := ( 'h' @ { puts "hello world!" }
                  | 'w' @ { puts "welcome" }
                  )*;
        }%%
          data = 'whwwwwhw'
          %% write data;
          %% write init;
          %% write exec;
        """)
    assert_in_output('ragelrubydot', ragel, "digraph hello_and_welcome", ext=".rl")
コード例 #9
0
def test_ragel_ruby_dot():
    ragel = inspect.cleandoc("""
        %%{
          machine hello_and_welcome;
          main := ( 'h' @ { puts "hello world!" }
                  | 'w' @ { puts "welcome" }
                  )*;
        }%%
          data = 'whwwwwhw'
          %% write data;
          %% write init;
          %% write exec;
        """)
    assert_in_output('ragelrubydot',
                     ragel,
                     "digraph hello_and_welcome",
                     ext=".rl")
コード例 #10
0
def test_jirb_filter():
    assert_in_output('jirb', "puts 1+1",  ">> puts 1+1")
コード例 #11
0
def test_matlab_filter():
    assert_in_output('matlabint', "fprintf (1, 'Hello, world\\n')\n", "< M A T L A B (R) >")
コード例 #12
0
ファイル: test_easyhtml_filters.py プロジェクト: tomspur/dexy
def test_easyhtml_filter():
    some_html = "<p>This is some HTML</p>"
    assert_in_output("easyhtml", some_html, some_html, ".html")
    assert_in_output("easyhtml", some_html, "<html>", ".html")
コード例 #13
0
def test_irb_filter():
    assert_in_output('irb', "puts 'hello'", ">> puts 'hello'")
コード例 #14
0
def test_ipython_filter():
    assert_in_output('ipython', "print 'hello'", ">>> print 'hello'")
コード例 #15
0
def test_ksh_filter():
    assert_in_output('kshint', 'ls', "example.txt")
コード例 #16
0
def test_php_filter():
    assert_in_output('phpint', '1+1', "php > 1+1")
コード例 #17
0
def test_rst2latex():
    assert_in_output('rst2latex', RST, "\item a bullet point using")
    assert_in_output('rst2latex', RST, "\\begin{document}")
コード例 #18
0
def test_rhino_filter():
    assert_in_output('rhinoint', '1+1', "js> 1+1")
コード例 #19
0
def test_irb_filter():
    assert_in_output('irb', "puts 'hello'", ">> puts 'hello'")
コード例 #20
0
def test_matlab_filter():
    assert_in_output('matlabint', "fprintf (1, 'Hello, world\\n')\n",
                     "< M A T L A B (R) >")
コード例 #21
0
def test_irb_subprocess_stdout_filter():
    assert_in_output('irbout', 'puts "hello"', '> puts "hello"')
コード例 #22
0
def test_sloccount():
    assert_in_output('sloccount', 'puts "hello"', "ruby=1", ext=".rb")
コード例 #23
0
def test_clj_filter():
    assert_in_output('cljint', '1+1', "user=> 1+1")
コード例 #24
0
def test_easyhtml_filter():
    some_html = "<p>This is some HTML</p>"
    assert_in_output("easyhtml", some_html, some_html, ".html")
    assert_in_output("easyhtml", some_html, "<html>", ".html")
コード例 #25
0
def test_git_log_remote():
    assert_in_output("gitlog", REMOTE_REPO_HTTPS, "Rename")
コード例 #26
0
def test_asciidoc_filter():
    assert_in_output("asciidoc", "hello",
                     """<div class="paragraph"><p>hello</p></div>""")
コード例 #27
0
def test_pycon_filter_single_section():
    assert_in_output('pycon', "print 'hello'", ">>> print 'hello'")
コード例 #28
0
def test_asciidoc():
    assert_in_output("example.txt|asciidoc", "Introduction\n------------", """<h2 id="_introduction">Introduction</h2>""")
コード例 #29
0
def test_cowsay():
    assert_in_output('cowsay', 'hello', 'hello')
コード例 #30
0
def test_git_log():
    assert_in_output("gitlog", PATH_TO_LOCAL_REPO, "Add README file.")
コード例 #31
0
def test_cowthink():
    assert_in_output('cowthink', 'hello', 'hello')
コード例 #32
0
def test_ksh_filter():
    assert_in_output('kshint', 'ls', "example.txt")
コード例 #33
0
def test_figlet():
    assert_in_output('figlet', 'hello', "| |__   ___| | | ___  ")
コード例 #34
0
def test_rhino_filter():
    assert_in_output('rhinoint', '1+1', "js> 1+1")
コード例 #35
0
def test_man_page():
    assert_in_output('man', 'ls', 'list directory contents')
コード例 #36
0
def test_pycon_filter_single_section():
    assert_in_output('pycon', "print 'hello'", ">>> print 'hello'")
コード例 #37
0
ファイル: test_stdout_filters.py プロジェクト: aioupload/dexy
def test_cowsay():
    assert_in_output('cowsay', 'hello', 'hello')
コード例 #38
0
def test_r_filter():
    assert_in_output('r', '1+1', '> 1+1')
コード例 #39
0
ファイル: test_stdout_filters.py プロジェクト: aioupload/dexy
def test_cowthink():
    assert_in_output('cowthink', 'hello', 'hello')
コード例 #40
0
def test_clj_filter():
    assert_in_output('cljint', '1+1', "user=> 1+1")
コード例 #41
0
ファイル: test_stdout_filters.py プロジェクト: aioupload/dexy
def test_figlet():
    assert_in_output('figlet', 'hello', "| |__   ___| | | ___  ")
コード例 #42
0
def test_html():
    assert_in_output("pyg|h", "print 'hello'", """<div class="highlight">""")
コード例 #43
0
ファイル: test_stdout_filters.py プロジェクト: aioupload/dexy
def test_man_page():
    assert_in_output('man', 'ls', 'list directory contents')
コード例 #44
0
def test_jythoni_filter():
    raise SkipTest()
    assert_in_output('jythoni', "print 1+1",  ">>> print 1+1")
コード例 #45
0
def test_pandoc():
    assert_in_output("example.txt|pandoc", "## Hello", ">Hello</h2")
コード例 #46
0
def test_ragel_ruby_filter():
    assert_in_output('rlrb',
                     RAGEL,
                     "_keys = _hello_and_welcome_key_offsets[cs]",
                     ext=".rl")
コード例 #47
0
def test_asciidoc_filter():
    assert_in_output("asciidoc", "hello", """<div class="paragraph"><p>hello</p></div>""")
コード例 #48
0
def test_rst2xml():
    assert_in_output(
        'rst2xml', RST,
        """<list_item><paragraph>a sub-list using "-"</paragraph><bullet_list bullet="+"><list_item>"""
    )
コード例 #49
0
def test_ipython_filter():
    assert_in_output('ipython', "print 'hello'", ">>> print 'hello'")
コード例 #50
0
def test_rst2html():
    assert_in_output('rst2html', RST, "<html xmlns")
    assert_in_output('rst2html', RST,
                     "<li>a bullet point using &quot;*&quot;<ul>")
コード例 #51
0
def test_r_filter():
    assert_in_output('r', '1+1', '> 1+1')
コード例 #52
0
ファイル: test_stdout_filters.py プロジェクト: aioupload/dexy
def test_sloccount():
    assert_in_output('sloccount', 'puts "hello"', "ruby=1", ext=".rb")
コード例 #53
0
def test_php_filter():
    assert_in_output('phpint', '1+1', "php > 1+1")
コード例 #54
0
def test_espeak():
    assert_in_output("example.txt|espeak", "Hello", "")
コード例 #55
0
ファイル: test_stdout_filters.py プロジェクト: aioupload/dexy
def test_irb_subprocess_stdout_filter():
    assert_in_output('irbout', 'puts "hello"', '> puts "hello"')
コード例 #56
0
def test_ragel_ruby_filter():
    assert_in_output('rlrb', RAGEL, "_keys = _hello_and_welcome_key_offsets[cs]", ext=".rl")
コード例 #57
0
def test_html():
    assert_in_output("pyg|h", "print 'hello'", """<div class="highlight">""")