Move shell tests into Cargo feature

This commit is contained in:
Ajeet D'Souza 2021-03-15 03:48:48 +05:30
parent efce819832
commit 40622e9c21
2 changed files with 21 additions and 2 deletions

View File

@ -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: <https://github.com/psf/black>
# - dash
# - fish: <https://github.com/fish-shell/fish-shell>
# - mypy: <https://github.com/python/mypy>
# - powershell: <https://github.com/PowerShell/PowerShell>
# - pylint: <https://github.com/PyCQA/pylint>
# - shellcheck: <https://github.com/koalaman/shellcheck>
# - shfmt: <https://github.com/mvdan/sh>
# - xonsh: <https://github.com/xonsh/xonsh>
# - zsh: <https://github.com/zsh-users/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

View File

@ -37,7 +37,7 @@ pub enum Hook {
Pwd,
}
#[cfg(unix)]
#[cfg(feature = "shell_tests")]
#[cfg(test)]
mod tests {
use super::*;