diff --git a/Cargo.toml b/Cargo.toml index 7604b9d..5ed0d44 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,10 +25,29 @@ tempfile = "3.1.0" [target.'cfg(windows)'.dependencies] rand = "0.7.3" -[target.'cfg(unix)'.dev-dependencies] +[dev-dependencies] assert_cmd = "1.0.1" seq-macro = "0.2.1" +[features] +default = [] +# Adds tests for code generated by `zoxide init`. +# This requires the following external programs available in $PATH: +# - bash +# - black: +# - dash +# - fish: +# - mypy: +# - powershell: +# - pylint: +# - shellcheck: +# - shfmt: +# - xonsh: +# - zsh: +# Since most users are unlikely to have installed all of the above, these tests +# are disabled by default. +shell_tests = [] + [profile.release] codegen-units = 1 lto = true diff --git a/src/shell.rs b/src/shell.rs index 0636187..56f087d 100644 --- a/src/shell.rs +++ b/src/shell.rs @@ -37,7 +37,7 @@ pub enum Hook { Pwd, } -#[cfg(unix)] +#[cfg(feature = "shell_tests")] #[cfg(test)] mod tests { use super::*;