示例#1
0
def test_last_sgr():
    assert utils.find_last_sgr(weekheader) == (0, 4, '\x1b[1m')
    assert utils.find_last_sgr(today_line) == (0, 4, '\x1b[1m')
    assert utils.find_last_sgr(calendarline) == (92, 97, '\x1b[32m')
    assert utils.find_last_sgr('Hello World') == (-2, -1, '')
示例#2
0
文件: utils_test.py 项目: pdav/khal
def test_last_sgr():
    assert utils.find_last_sgr(weekheader) == (0, 4, '\x1b[1m')
    assert utils.find_last_sgr(today_line) == (0, 4, '\x1b[1m')
    assert utils.find_last_sgr(calendarline) == (92, 97, '\x1b[32m')
    assert utils.find_last_sgr('Hello World') == (-2, -1, '')