'Test eliding.'

@pytest.mark.parametrize('elidelength,    text,    expected', [(None, ('x' * 100), ('x' * 100)), (6, 'foobar', 'foobar'), (5, 'foobar', ('foob' + ELLIPSIS)), (5, 'foo\nbar', ('foob' + ELLIPSIS)), (7, 'foo\nbar', 'foobar')], ids=(lambda val: repr(val)[:20]))
def test_eliding(self, elidelength, text, expected):

    assert (utils.compact_text(text, elidelength) == expected)
