[lldb/test] Fix wrong target command failure message on Windows

This patch fixes the test failure happening on Windows introduced by
`015117411e11458f9816ba4359246132164a4297`.

Since the failure message comes from the OS, the test needs to support both
UNIX and Windows messages.

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
This commit is contained in:
Med Ismail Bennani 2020-05-04 19:17:10 +02:00
parent cb78376433
commit 6b8d6f4459
1 changed files with 2 additions and 2 deletions

View File

@ -326,7 +326,7 @@ class targetCommandTestCase(TestBase):
@no_debug_info_test @no_debug_info_test
def test_target_create_nonexistent_core_file(self): def test_target_create_nonexistent_core_file(self):
self.expect("target create -c doesntexist", error=True, self.expect("target create -c doesntexist", error=True,
substrs=["Cannot open 'doesntexist': No such file or directory"]) patterns=["Cannot open 'doesntexist'", ": (No such file or directory|The system cannot find the file specified)"])
# Write only files don't seem to be supported on Windows. # Write only files don't seem to be supported on Windows.
@skipIfWindows @skipIfWindows
@ -340,7 +340,7 @@ class targetCommandTestCase(TestBase):
@no_debug_info_test @no_debug_info_test
def test_target_create_nonexistent_sym_file(self): def test_target_create_nonexistent_sym_file(self):
self.expect("target create -s doesntexist doesntexisteither", error=True, self.expect("target create -s doesntexist doesntexisteither", error=True,
substrs=["Cannot open '", "': No such file or directory"]) patterns=["Cannot open '", ": (No such file or directory|The system cannot find the file specified)"])
@skipIfWindows @skipIfWindows
@no_debug_info_test @no_debug_info_test