Index: packages/Python/lldbsuite/test/functionalities/completion/TestCompletion.py =================================================================== --- packages/Python/lldbsuite/test/functionalities/completion/TestCompletion.py +++ packages/Python/lldbsuite/test/functionalities/completion/TestCompletion.py @@ -296,79 +296,3 @@ def test_target_va(self): """Test that 'target va' completes to 'target variable '.""" self.complete_from_to('target va', 'target variable ') - - @expectedFailureAll(hostoslist=["windows"], bugnumber="llvm.org/pr24679") - @expectedFailureAll( - oslist=lldbplatform.darwin_all, - bugnumber="llvm.org/pr25485,") - def test_symbol_name(self): - self.build() - self.complete_from_to('''file %s - breakpoint set -n Fo''' % - self.getBuildArtifact("a.out"), - 'breakpoint set -n Foo::Bar(int,\\ int)', - turn_off_re_match=True) - - def complete_from_to(self, str_input, patterns, turn_off_re_match=False): - """Test that the completion mechanism completes str_input to patterns, - where patterns could be a pattern-string or a list of pattern-strings""" - import pexpect - # Patterns should not be None in order to proceed. - self.assertFalse(patterns is None) - # And should be either a string or list of strings. Check for list type - # below, if not, make a list out of the singleton string. If patterns - # is not a string or not a list of strings, there'll be runtime errors - # later on. - if not isinstance(patterns, list): - patterns = [patterns] - - # The default lldb prompt. - prompt = "(lldb) " - - # So that the child gets torn down after the test. - self.child = pexpect.spawn(lldbtest_config.lldbExec, - [self.lldbOption] + ['--no-use-colors']) - child = self.child - # Turn on logging for input/output to/from the child. - with open('child_send.txt', 'w') as f_send: - with open('child_read.txt', 'w') as f_read: - child.logfile_send = f_send - child.logfile_read = f_read - - child.expect_exact(prompt) - child.setecho(True) - # Sends str_input and a Tab to invoke the completion machinery. - child.send("%s\t" % str_input) - child.sendline('') - child.expect_exact(prompt) - child.sendline('') - child.expect_exact(prompt) - - # Now that the necessary logging is done, restore logfile to None to - # stop further logging. - child.logfile_send = None - child.logfile_read = None - - with open('child_send.txt', 'r') as fs: - if self.TraceOn(): - print("\n\nContents of child_send.txt:") - print(fs.read()) - with open('child_read.txt', 'r') as fr: - from_child = fr.read() - if self.TraceOn(): - print("\n\nContents of child_read.txt:") - print(from_child) - - # The matching could be verbatim or using generic re pattern. - for p in patterns: - # Test that str_input completes to our patterns or substrings. - # If each pattern/substring matches from_child, the completion - # mechanism works! - if turn_off_re_match: - self.expect( - from_child, msg=COMPLETION_MSG( - str_input, p), exe=False, substrs=[p]) - else: - self.expect( - from_child, msg=COMPLETION_MSG( - str_input, p), exe=False, patterns=[p])