Skip to content

Commit

Permalink
fix(tests): delete test_all_alias_binaries_exist
Browse files Browse the repository at this point in the history
It looks like at some point we deleted all the individual subcommand binaries that used to be built with the `man-pages` feature. This test therefore is no longer useful/valid.
  • Loading branch information
arxanas committed Oct 6, 2024
1 parent 1fc2d6f commit d650e43
Showing 1 changed file with 1 addition and 25 deletions.
26 changes: 1 addition & 25 deletions git-branchless-init/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,7 @@ pub fn command_install_man_pages(ctx: CommandContext, args: InstallManPagesArgs)

#[cfg(test)]
mod tests {
use super::{update_between_lines, ALL_ALIASES, UPDATE_MARKER_END, UPDATE_MARKER_START};
use super::{update_between_lines, UPDATE_MARKER_END, UPDATE_MARKER_START};

#[test]
fn test_update_between_lines() {
Expand Down Expand Up @@ -732,28 +732,4 @@ contents 3
expected
)
}

#[test]
fn test_all_alias_binaries_exist() {
let all_alias_binaries_installed = cfg!(feature = "man-pages");
if !all_alias_binaries_installed {
return;
}

for (_from, to) in ALL_ALIASES {
let executable_name = format!("git-branchless-{to}");

// For each subcommand that's been aliased, asserts that a binary
// with the corresponding name exists in `Cargo.toml`. If this test
// fails, then it may mean that a new binary entry should be added.
//
// Note that this check may require a `cargo clean` to clear out any
// old executables in order to produce deterministic results.
assert_cmd::cmd::Command::cargo_bin(executable_name)
.unwrap()
.arg("--help")
.assert()
.success();
}
}
}

0 comments on commit d650e43

Please sign in to comment.