fish-shell/tests
Fabian Homborg cb16d9e741 fish_indent: Allow escaped newlines only for certain things
Things like

```fish
\
echo foo
```

or

```fish
echo foo; \
echo bar
```

are a formatting blunder and should be handled.

This makes it so the escaped newline is removed, and the
semicolon/token_type_end handling will then put the statements on
different lines.

One case this doesn't handle brilliantly is an escaped newline after a
pipe:

```fish
echo foo | \
cat
```

is turned into

```fish
echo foo | cat
```

which here works great, but in long pipelines can cause issues.

Pipes at the end of the line cause fish to continue parsing on the
next line, so this can just be written as

```fish
echo foo |
cat
```

for now.
2020-03-15 21:01:00 +01:00
..
checks Reindent final check 2020-03-09 19:46:43 +01:00
test_functions Amend comments incorrectly referring to sed 2020-01-22 17:40:31 +01:00
.gitignore tweak gitignore rules for *tests* directory 2017-02-20 20:29:43 -08:00
bind_mode_events.expect Send events more often for variable sets outside of builtin_set 2020-03-08 23:28:37 -07:00
bind_mode_events.expect.err Send events more often for variable sets outside of builtin_set 2020-03-08 23:28:37 -07:00
bind_mode_events.expect.out Send events more often for variable sets outside of builtin_set 2020-03-08 23:28:37 -07:00
bind.expect Use self-insert-notfirst on spaces during paste 2020-03-07 13:31:55 -08:00
bind.expect.err Reset fish_bind_mode when changing fish_key_bindings 2014-09-18 15:46:17 -07:00
bind.expect.out Use self-insert-notfirst on spaces during paste 2020-03-07 13:31:55 -08:00
commandline.expect Stop unescaping strings with commandline -b 2016-01-10 17:25:22 -08:00
commandline.expect.err Stop unescaping strings with commandline -b 2016-01-10 17:25:22 -08:00
commandline.expect.out Stop unescaping strings with commandline -b 2016-01-10 17:25:22 -08:00
complete.expect Prevent buffer overflow when custom completions edit the commandline 2019-11-01 13:21:49 +01:00
complete.expect.err Prevent buffer overflow when custom completions edit the commandline 2019-11-01 13:21:49 +01:00
complete.expect.out Prevent buffer overflow when custom completions edit the commandline 2019-11-01 13:21:49 +01:00
exit.expect Correct the exit expect test 2019-09-14 12:46:57 -07:00
exit.expect.err correct handling of SIGHUP by interactive fish 2017-01-24 15:24:13 -08:00
exit.expect.out correct handling of SIGHUP by interactive fish 2017-01-24 15:24:13 -08:00
expansion.err Fix caret position of invalid expansion in command position 2019-10-06 13:43:05 -07:00
expansion.in Fix caret position of invalid expansion in command position 2019-10-06 13:43:05 -07:00
expansion.out Test expansion syntax errors. 2019-04-11 21:59:23 -07:00
fkr.expect Clean up the "press a key" prompt in fish_key_reader 2020-02-13 01:08:35 -08:00
fkr.expect.err don't allow f-k-r to run if stdin/stdout not a tty 2016-06-26 21:51:00 -07:00
fkr.expect.out f-k-r should use the user's locale 2016-06-30 20:49:56 -07:00
gen_output.fish Remove caret redirection 2018-04-01 13:48:21 -07:00
generic.expect Move bare source test to expect 2018-12-11 18:23:37 +01:00
generic.expect.err Allow U+F8FF to be typed 2014-09-21 21:03:44 -07:00
generic.expect.out Allow U+F8FF to be typed 2014-09-21 21:03:44 -07:00
histfile.expect Make history tests more robust 2019-06-28 11:16:27 -07:00
histfile.expect.err Make the history session configurable 2017-06-30 17:13:02 -07:00
histfile.expect.out Make the history session configurable 2017-06-30 17:13:02 -07:00
histfile.expect.status Make the history session configurable 2017-06-30 17:13:02 -07:00
history_sample_bash Do import bash history commands containing && or || 2019-11-07 23:33:35 +01:00
history_sample_corrupt1 Improve history robustness against corrupt files 2014-07-29 14:42:03 -07:00
history_sample_fish_1_x Support for importing fish 1.x's history and format, and also bash 2012-06-15 16:24:05 -07:00
history_sample_fish_2_0 Support for importing fish 1.x's history and format, and also bash 2012-06-15 16:24:05 -07:00
history.expect history expect tests: fix the tests. 2018-11-20 05:26:54 -08:00
history.expect.err correct handling of history args 2016-07-20 21:18:48 -07:00
history.expect.out mplement history search glob searches 2017-09-15 13:43:45 -07:00
indent.err Implement tests for fish_indent 2014-12-23 15:46:47 -08:00
indent.in Fix fish_indent tests 2019-05-24 17:00:56 -07:00
indent.out fish_indent: Allow escaped newlines only for certain things 2020-03-15 21:01:00 +01:00
interactive.config remove some uses of $IFS 2017-07-25 12:44:26 -07:00
interactive.expect.rc Add pipeline tests 2019-04-07 09:20:32 -07:00
interactive.fish Reindent functions to remove useless quotes 2020-03-09 19:46:43 +01:00
pipeline.expect Reduce loop count of pipeline test 2019-04-07 15:00:13 -07:00
pipeline.expect.err Add pipeline tests 2019-04-07 09:20:32 -07:00
pipeline.expect.out Add pipeline tests 2019-04-07 09:20:32 -07:00
pipestatus.expect add $pipestatus support 2019-02-24 21:46:52 -08:00
pipestatus.expect.err add $pipestatus support 2019-02-24 21:46:52 -08:00
pipestatus.expect.out add $pipestatus support 2019-02-24 21:46:52 -08:00
read.expect tests/read.expect: Skip /dev/stdin if it doesn't exist 2019-01-01 14:52:26 +01:00
read.expect.err Add a test harness for interactive behavior 2014-09-07 23:56:59 -07:00
read.expect.out Fix read tests to reflect updated arguments 2018-03-09 12:19:20 -06:00
signals.expect Add test to verify that the fish_postexec handler is called after SIGINT 2020-03-03 21:49:15 -08:00
signals.expect.err correct handling of SIGHUP by interactive fish 2017-01-24 15:24:13 -08:00
signals.expect.out correct handling of SIGHUP by interactive fish 2017-01-24 15:24:13 -08:00
test_util.fish tests/test_util: Fix wrong argument in delta 2019-10-19 14:27:47 +02:00
test.fish Use -S when invoking Python for littlecheck 2020-03-09 15:08:33 -07:00
test1.err Port another part of test1 to littlecheck 2020-02-08 18:21:05 +01:00
test1.in Port another part of test1 to littlecheck 2020-02-08 18:21:05 +01:00
test1.out Port another part of test1 to littlecheck 2020-02-08 18:21:05 +01:00
test7.err Add a test case for switch error code (issue #161) 2012-06-24 13:43:44 -07:00
test7.in Update tests for new type behavior 2014-07-13 19:11:29 -07:00
test7.out Finish rewriting detect_errors to use new parser. All tests now pass (!) 2013-12-12 18:18:07 -08:00
test9.err Error message prefix: Prefix the message, not the context 2017-04-11 20:00:29 -07:00
test9.in tests/test9: Guard locale 2019-01-01 14:52:26 +01:00
test9.out return to psub --file being the default 2017-07-17 14:33:51 -07:00
top.out Don't leave is_block in bad state after bad redirection 2014-09-30 17:06:56 -07:00
umask.err fix umask handling of symbolic modes 2017-03-28 16:28:24 -07:00
umask.in fix umask handling of symbolic modes 2017-03-28 16:28:24 -07:00
umask.out fix umask handling of symbolic modes 2017-03-28 16:28:24 -07:00
wait.expect Speed up wait.expect test 2018-12-31 19:36:08 -06:00
wait.expect.err add wait command 2017-11-16 10:48:21 -08:00
wait.expect.out add wait command 2017-11-16 10:48:21 -08:00