Permalink
Browse files

Add a skipped failing test for the result-repetition bug.

  • Loading branch information...
erikrose committed Mar 12, 2013
1 parent 9fdcaf4 commit 9135bd99f5668adeb7d8bfbd4e317f58f640e6f5
Showing with 15 additions and 0 deletions.
  1. +15 −0 tests/test_strings.py
View
@@ -1,5 +1,6 @@
"""Tests for string searches"""
+from nose import SkipTest
from nose.tools import eq_
from dxr.testing import SingleFileTestCase, MINIMAL_MAIN
@@ -14,3 +15,17 @@ class StringTests(SingleFileTestCase):
def test_negated_phrase(self):
"""Make sure a negated phrase search doesn't crash."""
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.