Skip to content

Commit

Permalink
feat(test): accept more than one args in for_host*!()
Browse files Browse the repository at this point in the history
  • Loading branch information
rami3l committed Dec 30, 2024
1 parent da63a8d commit 7efb4bd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,8 @@ pub fn this_host_triple() -> String {
// Format a string with this host triple.
#[macro_export]
macro_rules! for_host {
($s: expr) => {
&format!($s, $crate::test::this_host_triple())
($s:tt $($arg:tt)*) => {
&format!($s, $crate::test::this_host_triple() $($arg)*)
};
}

Expand Down
4 changes: 2 additions & 2 deletions tests/suite/cli_rustup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ use rustup::test::{
use rustup::utils::raw;

macro_rules! for_host_and_home {
($config:expr, $s: expr) => {
&format!($s, this_host_triple(), $config.rustupdir)
($config:expr, $s:tt $($arg:tt)*) => {
&format!($s, this_host_triple(), $config.rustupdir $($arg)*)
};
}

Expand Down

0 comments on commit 7efb4bd

Please sign in to comment.