Skip to content

Commit ec0b0f1

Browse files
committed
Fix tests
1 parent 21c96f2 commit ec0b0f1

File tree

4 files changed

+12
-1
lines changed

4 files changed

+12
-1
lines changed

crates/fig_integrations/src/shell/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ pub mod inline_shell_completion_plugin {
4545

4646
#[cfg(test)]
4747
mod tests {
48+
use fig_util::CLI_BINARY_NAME;
4849

4950
use super::*;
5051

crates/figterm/tests/cli.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@ use assert_cmd::prelude::*;
44
use predicates::prelude::*;
55

66
#[test]
7+
78
fn version_flag_has_status_code_zero() {
9+
#[cfg(not(target_env = "musl"))]
810
let mut cmd = Command::new(assert_cmd::cargo::cargo_bin!("figterm"));
11+
#[cfg(target_env = "musl")]
12+
let mut cmd = Command::cargo_bin("figterm").unwrap();
913
cmd.arg("--version");
1014

1115
cmd.assert()

crates/q_cli/tests/common/mod.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ pub use predicates::prelude::*;
1010
pub type Result<T, E = Box<dyn std::error::Error>> = std::result::Result<T, E>;
1111

1212
pub fn cli() -> Command {
13-
Command::new(assert_cmd::cargo::cargo_bin!("q_cli"))
13+
#[cfg(not(target_env = "musl"))]
14+
Command::new(assert_cmd::cargo::cargo_bin!("q_cli"));
15+
#[cfg(target_env = "musl")]
16+
Command::cargo_bin("q_cli").unwrap();
1417
}
1518

1619
pub fn is_json() -> FnPredicate<impl Fn(&str) -> bool, str> {

crates/q_cli/tests/init.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ macro_rules! init_test {
2222
paste! {
2323
#[cfg(not(windows))]
2424
fn [<init_output_ $shell _ $stage _ $file>]() -> Result<String, Box<dyn std::error::Error>> {
25+
#[cfg(not(target_env = "musl"))]
2526
let mut cmd = Command::new(assert_cmd::cargo::cargo_bin!("q_cli"));
27+
#[cfg(target_env = "musl")]
28+
let mut cmd = Command::cargo_bin("q_cli").unwrap();
2629
cmd.arg("init").arg($shell).arg($stage).arg("--rcfile").arg($file);
2730
cmd.env("Q_INIT_SNAPSHOT_TEST", "1");
2831
let out = cmd.assert().success().get_output().stdout.clone();

0 commit comments

Comments
 (0)