'Asserts that a check of the given lines with the given local bear does
yield exactly the given results.
:param local_bear:       The local bear to check with.
:param lines:            The lines to check. (List of strings)
:param results:          The expected list of results.
:param filename:         The filename, if it matters.
:param force_linebreaks: Whether to append newlines at each line
if needed. (Bears expect a \n for every line)
:param create_tempfile:  Whether to save lines in tempfile if needed.
:param tempfile_kwargs:  Kwargs passed to tempfile.mkstemp().
:param settings:         A dictionary of keys and values (both strings)
from which settings will be created that will
be made available for the tested bear.'

def check_results(self, local_bear, lines, results, filename=None, check_order=False, force_linebreaks=True, create_tempfile=True, tempfile_kwargs={}, settings={}):

    assert isinstance(self, unittest.TestCase)
    self.assertIsInstance(local_bear, LocalBear, msg='The    given    bear    is    not    a    local    bear.')
    self.assertIsInstance(lines, (list, tuple), msg='The    given    lines    are    not    a    list.')
    self.assertIsInstance(results, list, msg='The    given    results    are    not    a    list.')
    if (results in [[], ()]):
        msg = "The    local    bear    '{}'    yields    a    result    although    it    shouldn't.".format(local_bear.__class__.__name__)
        check_order = True
    else:
        msg = "The    local    bear    '{}'    doesn't    yield    the    right    results.".format(local_bear.__class__.__name__)
        if check_order:
            msg += '    Or    the    order    may    be    wrong.'
    bear_output = get_results(local_bear, lines, filename=filename, force_linebreaks=force_linebreaks, create_tempfile=create_tempfile, tempfile_kwargs=tempfile_kwargs, settings=settings)
    if (not check_order):
        self.assertEqual(sorted(bear_output), sorted(results), msg=msg)
    else:
        self.assertEqual(bear_output, results, msg=msg)
    return bear_output
