From d5e00ba6c4c14fb282119199300c9f7e4820e0b2 Mon Sep 17 00:00:00 2001 From: Johnny Chen Date: Thu, 11 Aug 2011 20:51:45 +0000 Subject: [PATCH] Fix the expect patterns to work for both OSX SnowLeopard and Lion. On Lion, printf is defined in libsystem_c.dylib. llvm-svn: 137348 --- lldb/test/lang/c/function_types/TestFunctionTypes.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lldb/test/lang/c/function_types/TestFunctionTypes.py b/lldb/test/lang/c/function_types/TestFunctionTypes.py index 350d3fc51608..e4680ab0189d 100644 --- a/lldb/test/lang/c/function_types/TestFunctionTypes.py +++ b/lldb/test/lang/c/function_types/TestFunctionTypes.py @@ -84,8 +84,13 @@ class FunctionTypesTestCase(TestBase): self.expect("expr string_not_empty", substrs = ['(int (*)(const char *)) $0 = ', '(a.out`']) + if sys.platform.startswith("darwin"): + regexps = ['lib.*\.dylib`printf'] + else: + regexps = ['printf'] self.expect("expr (int (*)(const char*, ...))printf", - substrs = ['(int (*)(const char *, ...)) $1 = ', '(libSystem.']) + substrs = ['(int (*)(const char *, ...)) $1 = '], + patterns = regexps) self.expect("expr $1(\"Hello world\\n\")", startstr = '(int) $2 = 12') -- GitLab