Skip to content

Commit 7efb4bd

Browse files
committed
feat(test): accept more than one args in for_host*!()
1 parent da63a8d commit 7efb4bd

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/test.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,8 @@ pub fn this_host_triple() -> String {
178178
// Format a string with this host triple.
179179
#[macro_export]
180180
macro_rules! for_host {
181-
($s: expr) => {
182-
&format!($s, $crate::test::this_host_triple())
181+
($s:tt $($arg:tt)*) => {
182+
&format!($s, $crate::test::this_host_triple() $($arg)*)
183183
};
184184
}
185185

tests/suite/cli_rustup.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ use rustup::test::{
1515
use rustup::utils::raw;
1616

1717
macro_rules! for_host_and_home {
18-
($config:expr, $s: expr) => {
19-
&format!($s, this_host_triple(), $config.rustupdir)
18+
($config:expr, $s:tt $($arg:tt)*) => {
19+
&format!($s, this_host_triple(), $config.rustupdir $($arg)*)
2020
};
2121
}
2222

0 commit comments

Comments
 (0)