#![cfg(feature = "vms")]
use foundation_deployment_platform::config::GuestOs;
use foundation_deployment_platform::ssh::{wrap_command, wrap_command_bash, wrap_command_cmd};
#[test]
fn test_wrap_command_linux() {
let wrapped = wrap_command("echo hello", GuestOs::Linux);
assert!(wrapped.starts_with("bash -c"));
}
#[test]
fn test_wrap_command_windows() {
let wrapped = wrap_command("echo hello", GuestOs::Windows);
assert!(wrapped.starts_with("cmd /c"));
}
#[test]
fn test_wrap_command_cmd() {
let wrapped = wrap_command_cmd("echo hello");
assert!(wrapped.starts_with("cmd /c"));
}
#[test]
fn test_wrap_command_bash() {
let wrapped = wrap_command_bash("echo hello");
assert!(wrapped.starts_with("bash -c"));
}
#[test]
fn test_streaming_wraps_in_nushell() {
let cmd = "cargo build";
let wrapped = format!("nu -c {cmd:?}");
assert!(wrapped.contains("cargo build"));
assert!(wrapped.starts_with("nu -c"));
}