aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar Kurtis Rader <krader@skepticism.us>2016-04-05 15:43:24 -0700
committerGravatar Kurtis Rader <krader@skepticism.us>2016-04-05 19:29:23 -0700
commit4ff8e6e7818747d805ac44be0a36aedef4deaa5c (patch)
treeb3ce6c2af09f052278201d6b0209b69a16ac8787 /tests
parent8e8b5a648197ca83af50064bc9492ca855e9d705 (diff)
change how redirections are formatted
Modify `fish_indent` to emit redirections without a space before the target of the redirection; e.g., "2>&1" rather than "2>& 1" as the former is clearer to humans. Fixes #2899
Diffstat (limited to 'tests')
-rw-r--r--tests/indent.in6
-rw-r--r--tests/indent.out4
2 files changed, 10 insertions, 0 deletions
diff --git a/tests/indent.in b/tests/indent.in
index 83ef915b..a1143c67 100644
--- a/tests/indent.in
+++ b/tests/indent.in
@@ -83,3 +83,9 @@ echo -n '
if begin ; false; end; echo hi ; end
while begin ; false; end; echo hi ; end
' | ../test/root/bin/fish_indent
+
+echo \nTest redir formatting
+# issue 2899
+echo -n '
+echo < stdin >>appended yes 2>&1 no > stdout maybe 2>& 4 | cat 2>| cat
+' | ../test/root/bin/fish_indent
diff --git a/tests/indent.out b/tests/indent.out
index b2eaf08a..6b38a72f 100644
--- a/tests/indent.out
+++ b/tests/indent.out
@@ -91,3 +91,7 @@ while begin
end
echo hi
end
+
+Test redir formatting
+
+echo <stdin >>appended yes 2>&1 no >stdout maybe 2>&4 | cat 2>| cat