Skip to content
This repository has been archived by the owner on Oct 13, 2021. It is now read-only.

Commit

Permalink
Add a skipped failing test for the result-repetition bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
erikrose committed Mar 12, 2013
1 parent 9fdcaf4 commit 9135bd9
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/test_strings.py
Original file line number Original file line Diff line number Diff line change
@@ -1,5 +1,6 @@
"""Tests for string searches""" """Tests for string searches"""


from nose import SkipTest
from nose.tools import eq_ from nose.tools import eq_


from dxr.testing import SingleFileTestCase, MINIMAL_MAIN from dxr.testing import SingleFileTestCase, MINIMAL_MAIN
Expand All @@ -14,3 +15,17 @@ class StringTests(SingleFileTestCase):
def test_negated_phrase(self): def test_negated_phrase(self):
"""Make sure a negated phrase search doesn't crash.""" """Make sure a negated phrase search doesn't crash."""
eq_(self.search_results('void -"int"'), []) eq_(self.search_results('void -"int"'), [])


class RepeatedResultTests(SingleFileTestCase):
# Putting code on the first line triggers the bug:
source = """int main(int argc, char* argv[]) {
return 0;
}
"""

def test_repeated_results(self):
"""Make sure we don't get the same line back twice."""
raise SkipTest
self.found_lines_eq('int',
'<b>int</b> main(<b>int</b> argc, char* argv[]) {')

0 comments on commit 9135bd9

Please sign in to comment.