You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using fish_indent through vscode-fish-ide which reformat test file as follows:
test "set my_var default value"
- 'default_value' = (+'default_value' = (
__pure_set_default my_var 'default_value'
echo $my_var
- )+ )
end
After formatting my tests fails:
❯ fishtape tests/__pure_set_default.test.fish
TAP version 13
not ok 1 set my_var default valuedefault_value
---
operator: fail
expected: '= or !='
received: '= default_value '
...
not ok 2 skip setting value if default already existsdefault_value
---
operator: fail
expected: '= or !='
received: '= default_value '
...
Is it possible to extends fish_indent to support fishtape syntax?
The text was updated successfully, but these errors were encountered:
test already has a specific meaning in fish, and it does not start blocks. These files are not valid fish script, even if their names end in ".fish".
Honestly, I'd rather figure out a nicer way to write tests in fish-script than hack something like this, which overloads a rather important fish builtin (which we keyworded for 3.0 - not that it matters for fishtape, because that preprocesses the script using awk).
Our own test harness is probably a bit unwieldy, given that we require a ".in" file that includes the actual script to be run, and a ".out" and ".err" file for its stdout and stderr. We also don't ship it with a fish install, so it's not accessible to users.
related: jorgebucaran/fishtape#32, swsnr/vscode-fish-ide#6
I'm using
fish_indent
throughvscode-fish-ide
which reformat test file as follows:After formatting my tests fails:
Is it possible to extends
fish_indent
to supportfishtape
syntax?The text was updated successfully, but these errors were encountered: