예제 #1
0
파일: tidy.py 프로젝트: the7day/jabbapylib
def pretty_print(text):
    cmd = "{prg} {options}".format(prg=cfg.TIDY, options=OPTIONS)
    return process.get_cmd_output_input_from_stdin(cmd, text)
예제 #2
0
def test_get_cmd_output_input_from_stdin():
    res = process.get_cmd_output_input_from_stdin("grep es", "test")
    assert res == 'test\n'
    res = process.get_cmd_output_input_from_stdin("wc -w", "a b c d e")
    assert res == '5\n'
예제 #3
0
def test_get_cmd_output_input_from_stdin():
    res = process.get_cmd_output_input_from_stdin("grep es", "test")
    assert res == 'test\n'
    res = process.get_cmd_output_input_from_stdin("wc -w", "a b c d e")
    assert res == '5\n'
예제 #4
0
def pretty_print(text):
    cmd = "{prg} {options}".format(prg=cfg.TIDY, options=OPTIONS)
    return process.get_cmd_output_input_from_stdin(cmd, text)