From e64a19109adda31ee20a384585145db13b46ec75 Mon Sep 17 00:00:00 2001 From: rChaser53 Date: Fri, 20 Dec 2019 11:14:18 +0900 Subject: [PATCH] Backport 3971 test cases fix not to overwrite on other platforms (3971) It's likely that PR 4100 implemented a similar fix, which resolved the original issue. The test cases from PR 3971 seemed useful to backport. --- tests/config/issue-3956.toml | 5 +++++ tests/target/issue-3956/graphics.rs | 2 ++ tests/target/issue-3956/graphics_emu.rs | 2 ++ tests/target/issue-3956/lib.rs | 4 ++++ 4 files changed, 13 insertions(+) create mode 100644 tests/config/issue-3956.toml create mode 100644 tests/target/issue-3956/graphics.rs create mode 100644 tests/target/issue-3956/graphics_emu.rs create mode 100644 tests/target/issue-3956/lib.rs diff --git a/tests/config/issue-3956.toml b/tests/config/issue-3956.toml new file mode 100644 index 00000000000..7669890586b --- /dev/null +++ b/tests/config/issue-3956.toml @@ -0,0 +1,5 @@ +ignore = [ + "tests/**/issue-3956/graphics.rs", + "tests/**/issue-3956/graphics_emu.rs" +] +recursive = true diff --git a/tests/target/issue-3956/graphics.rs b/tests/target/issue-3956/graphics.rs new file mode 100644 index 00000000000..ea98ccf2349 --- /dev/null +++ b/tests/target/issue-3956/graphics.rs @@ -0,0 +1,2 @@ +// rustfmt-config: issue-3956.toml +pub struct A; diff --git a/tests/target/issue-3956/graphics_emu.rs b/tests/target/issue-3956/graphics_emu.rs new file mode 100644 index 00000000000..88e41b515dc --- /dev/null +++ b/tests/target/issue-3956/graphics_emu.rs @@ -0,0 +1,2 @@ +// rustfmt-config: issue-3956.toml +pub struct B; diff --git a/tests/target/issue-3956/lib.rs b/tests/target/issue-3956/lib.rs new file mode 100644 index 00000000000..b0a26c9f0ba --- /dev/null +++ b/tests/target/issue-3956/lib.rs @@ -0,0 +1,4 @@ +// rustfmt-config: issue-3956.toml +#[cfg_attr(windows, path = "graphics.rs")] +#[cfg_attr(not(windows), path = "graphics_emu.rs")] +mod graphics;