From 47d1a55e780f928c9c1613220d6267de530e64b4 Mon Sep 17 00:00:00 2001 From: Xeonacid Date: Wed, 16 Nov 2022 23:07:01 +0800 Subject: [PATCH] Fix test_rust_clippy for rust 1.65 clippy changed output message fix #11004 --- unittests/allplatformstests.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/unittests/allplatformstests.py b/unittests/allplatformstests.py index 1ecbf18e3477..6eced8e396e2 100644 --- a/unittests/allplatformstests.py +++ b/unittests/allplatformstests.py @@ -4352,7 +4352,8 @@ def test_rust_clippy(self) -> None: self.init(testdir, extra_args=['--werror'], override_envvars={'RUSTC': 'clippy-driver'}) with self.assertRaises(subprocess.CalledProcessError) as cm: self.build() - self.assertIn('error: use of a blacklisted/placeholder name `foo`', cm.exception.stdout) + self.assertTrue('error: use of a blacklisted/placeholder name `foo`' in cm.exception.stdout or + 'error: use of a disallowed/placeholder name `foo`' in cm.exception.stdout) @skip_if_not_language('rust') def test_rust_rlib_linkage(self) -> None: