-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support conditional test #36
Comments
@edouard-lopez Is this related to #34? |
Nope, but that a feature request for next release 😛 |
@edouard-lopez Sure it isn't related? Why can't you do this: if fish_version_at_least '3.0.0'
test "_pure_prompt_ssh_host: use native \$hostname"
(
set pure_color_ssh_host (set_color grey)
_pure_prompt_ssh_host > /dev/null
) $status -eq 0
end
end |
That's what I do but I would prefer a decorator |
@edouard-lopez I think I get it now. You are asking for a pre-processor feature to sieve out tests if they are above or below a specific fish version (or based on the status code after running some arbitrary function) and the proposed syntax is a comment. |
Correct. |
@edouard-lopez if fish_version_equals_or_is_above 3.0.0
@test "something" (
actual operator expected
)
end |
Pure support several version of
fish
(2.5
to3.0.0
). However some of our tests are only meaningful on some version of the platform.To manage this we wrap those tests in a
if…end
block, e.g._pure_prompt_ssh_host.test.fish
:This work as expected but look messy, a decorator would be a lot more elegant, e.g.:
The text was updated successfully, but these errors were encountered: