diff --git a/src/sage/doctest/parsing.py b/src/sage/doctest/parsing.py index 5c37ea1422b..506d3208d47 100644 --- a/src/sage/doctest/parsing.py +++ b/src/sage/doctest/parsing.py @@ -1651,6 +1651,17 @@ def do_fixup(self, want, got): pythran_numpy_warning_regex = re.compile(r'WARNING: Overriding pythran description with argspec information for: numpy\.random\.[a-z_]+') got = pythran_numpy_warning_regex.sub('', got) did_fixup = True + + if "duplicate" in got: + # New warnings as of Sept '23, OS X 13.6, new command-line + # tools. In particular, these seem to come from ld in + # Xcode 15. + dup_rpath_regex = re.compile("ld: warning: duplicate -rpath .* ignored") + dup_lib_regex = re.compile("ld: warning: ignoring duplicate libraries: .*") + got = dup_rpath_regex.sub('', got) + got = dup_lib_regex.sub('', got) + did_fixup = True + return did_fixup, want, got def output_difference(self, example, got, optionflags):