packages feed

language-bash 0.9.0 → 0.9.1

raw patch · 25 files changed

+449/−3 lines, 25 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

language-bash.cabal view
@@ -1,16 +1,16 @@ name:               language-bash-version:            0.9.0+version:            0.9.1 category:           Language license:            BSD3 license-file:       LICENSE author:             Kyle Raftogianis maintainer:         Kyle Raftogianis <knrafto@gmail.com>-copyright:          Copyright (c) 2013-2018 Kyle Raftogianis+copyright:          Copyright (c) 2013-2020 Kyle Raftogianis build-type:         Simple cabal-version:      >= 1.8 homepage:           http://github.com/knrafto/language-bash/ bug-reports:        http://github.com/knrafto/language-bash/issues-tested-with:        GHC == 7.10.1, GHC == 7.10.2, GHC == 8.0.2, GHC == 8.4.3+tested-with:        GHC == 7.10.1, GHC == 7.10.2, GHC == 8.0.2, GHC == 8.4.3, GHC == 8.8.3 synopsis:           Parsing and pretty-printing Bash shell scripts description:     A library for parsing, pretty-printing, and manipulating@@ -19,6 +19,9 @@ extra-source-files:   .gitignore   README.md+  tests/pretty/*.golden+  tests/pretty/*.out+  tests/pretty/*.sh  source-repository head   type: git
+ tests/pretty/conditionals-simple.golden view
@@ -0,0 +1,35 @@+if true; then+    true;+fi;+if true; then+    true;+else+    if false; then+        false;+    fi;+fi;+if true; then+    true;+else+    false;+fi;+if true; then+    true;+else+    if false; then+        false;+    else+        false;+    fi;+fi;+case x in+    x)+        true;+        ;;+esac;+select x; do+    true;+done;+select x in y z; do+    true;+done;
+ tests/pretty/conditionals-simple.out view
@@ -0,0 +1,35 @@+if true; then+    true;+fi;+if true; then+    true;+else+    if false; then+        false;+    fi;+fi;+if true; then+    true;+else+    false;+fi;+if true; then+    true;+else+    if false; then+        false;+    else+        false;+    fi;+fi;+case x in+    x)+        true;+        ;;+esac;+select x; do+    true;+done;+select x in y z; do+    true;+done;
+ tests/pretty/conditionals-simple.sh view
@@ -0,0 +1,7 @@+if true; then true; fi+if true; then true; elif false; then false; fi+if true; then true; else false; fi+if true; then true; elif false; then false; else false; fi+case x in x) true;; esac+select x; do true; done+select x in y z; do true; done
+ tests/pretty/heredoc-composed.golden view
@@ -0,0 +1,30 @@+cat <<EOF1 |+Here doc 1+EOF1+cat <<EOF2;+Here doc 2+EOF2+cat <<EOF1 &&+Here doc 1+EOF1+cat <<EOF2;+Here doc 2+EOF2+cat <<EOF1 ||+Here doc 1+EOF1+cat <<EOF2;+Here doc 2+EOF2+cat <<EOF1 |+Here doc 1+EOF1+for x in true; do+    true;+done;+cat <<EOF1 |+Here doc 1+EOF1+while true; do+    true;+done;
+ tests/pretty/heredoc-composed.out view
@@ -0,0 +1,30 @@+cat <<EOF1 |+Here doc 1+EOF1+cat <<EOF2;+Here doc 2+EOF2+cat <<EOF1 &&+Here doc 1+EOF1+cat <<EOF2;+Here doc 2+EOF2+cat <<EOF1 ||+Here doc 1+EOF1+cat <<EOF2;+Here doc 2+EOF2+cat <<EOF1 |+Here doc 1+EOF1+for x in true; do+    true;+done;+cat <<EOF1 |+Here doc 1+EOF1+while true; do+    true;+done;
+ tests/pretty/heredoc-composed.sh view
@@ -0,0 +1,25 @@+cat <<EOF1 | cat <<EOF2+Here doc 1+EOF1+Here doc 2+EOF2++cat <<EOF1 && cat <<EOF2+Here doc 1+EOF1+Here doc 2+EOF2++cat <<EOF1 || cat <<EOF2+Here doc 1+EOF1+Here doc 2+EOF2++cat <<EOF1 | for x in true; do true; done+Here doc 1+EOF1++cat <<EOF1 | while true; do true; done+Here doc 1+EOF1
+ tests/pretty/heredoc-in-condition.golden view
@@ -0,0 +1,18 @@+if true <<EOF;+here doc+EOF+then+    true;+fi;+until true <<EOF;+here doc+EOF+do+    true;+done;+while true <<EOF;+here doc+EOF+do+    true;+done;
+ tests/pretty/heredoc-in-condition.out view
@@ -0,0 +1,18 @@+if true <<EOF;+here doc+EOF+then+    true;+fi;+until true <<EOF;+here doc+EOF+do+    true;+done;+while true <<EOF;+here doc+EOF+do+    true;+done;
+ tests/pretty/heredoc-in-condition.sh view
@@ -0,0 +1,20 @@+if true <<EOF+here doc+EOF+then+    true+fi++until true <<EOF+here doc+EOF+do+    true+done++while true <<EOF+here doc+EOF+do+    true+done
+ tests/pretty/heredoc-nested.golden view
@@ -0,0 +1,26 @@+for x in true; do+    cat <<EOF;+here doc+EOF+done;+for x in true; do+    for y in true; do+        cat <<EOF;+here doc+EOF+        true;+    done;+done;+while true; do+    cat <<EOF;+here doc+EOF+done;+while true; do+    while true; do+        cat <<EOF;+here doc+EOF+        true;+    done;+done;
+ tests/pretty/heredoc-nested.out view
@@ -0,0 +1,26 @@+for x in true; do+    cat <<EOF;+here doc+EOF+done;+for x in true; do+    for y in true; do+        cat <<EOF;+here doc+EOF+        true;+    done;+done;+while true; do+    cat <<EOF;+here doc+EOF+done;+while true; do+    while true; do+        cat <<EOF;+here doc+EOF+        true;+    done;+done;
+ tests/pretty/heredoc-nested.sh view
@@ -0,0 +1,25 @@+for x in true; do cat <<EOF; done+here doc+EOF++for x in true; do+    for y in true; do+        cat <<EOF+here doc+EOF+        true+    done+done++while true; do cat <<EOF; done+here doc+EOF++while true; do+    while true; do+        cat <<EOF+here doc+EOF+        true+    done+done
+ tests/pretty/heredoc.golden view
@@ -0,0 +1,11 @@+cat <<EOF;+Hello world!+EOF+cat <<EOF1 <<EOF2;+Here doc 1+EOF1+Here doc 2+EOF2+cat <<EOF >/dev/null;+Hello world!+EOF
+ tests/pretty/heredoc.out view
@@ -0,0 +1,11 @@+cat <<EOF;+Hello world!+EOF+cat <<EOF1 <<EOF2;+Here doc 1+EOF1+Here doc 2+EOF2+cat <<EOF >/dev/null;+Hello world!+EOF
+ tests/pretty/heredoc.sh view
@@ -0,0 +1,13 @@+cat <<EOF+Hello world!+EOF++cat <<EOF1 <<EOF2+Here doc 1+EOF1+Here doc 2+EOF2++cat <<EOF > /dev/null+Hello world!+EOF
+ tests/pretty/loops-nested.golden view
@@ -0,0 +1,15 @@+for x in true; do+    for y in true; do+        true;+    done;+done;+until true; do+    until true; do+        true;+    done;+done;+while true; do+    while true; do+        true;+    done;+done;
+ tests/pretty/loops-nested.out view
@@ -0,0 +1,15 @@+for x in true; do+    for y in true; do+        true;+    done;+done;+until true; do+    until true; do+        true;+    done;+done;+while true; do+    while true; do+        true;+    done;+done;
+ tests/pretty/loops-nested.sh view
@@ -0,0 +1,17 @@+for x in true; do+    for y in true; do+        true;+    done+done++until true; do+    until true; do+        true;+    done+done++while true; do+    while true; do+        true;+    done+done
+ tests/pretty/loops-simple.golden view
@@ -0,0 +1,9 @@+for x in true; do+    true;+done;+until true; do+    true;+done;+while true; do+    true;+done;
+ tests/pretty/loops-simple.out view
@@ -0,0 +1,9 @@+for x in true; do+    true;+done;+until true; do+    true;+done;+while true; do+    true;+done;
+ tests/pretty/loops-simple.sh view
@@ -0,0 +1,3 @@+for x in true; do true; done+until true; do true; done+while true; do true; done
+ tests/pretty/simple.golden view
@@ -0,0 +1,14 @@+declare foo;+declare foo=bar;+declare foo1=bar1 foo2=bar2;+declare -i foo;+declare -a foo;+declare -r foo;+cmd;+cmd1 | cmd2;+time cmd1 | cmd2;+time -p cmd1 | cmd2;+! cmd1 | cmd2;+time -p ! cmd1 | cmd2;+cmd1 && cmd2;+cmd1 || cmd2;
+ tests/pretty/simple.out view
@@ -0,0 +1,14 @@+declare foo;+declare foo=bar;+declare foo1=bar1 foo2=bar2;+declare -i foo;+declare -a foo;+declare -r foo;+cmd;+cmd1 | cmd2;+time cmd1 | cmd2;+time -p cmd1 | cmd2;+! cmd1 | cmd2;+time -p ! cmd1 | cmd2;+cmd1 && cmd2;+cmd1 || cmd2;
+ tests/pretty/simple.sh view
@@ -0,0 +1,17 @@+declare foo+declare foo=bar+declare foo1=bar1 foo2=bar2+declare -i foo+declare -a foo+declare -r foo++cmd;++cmd1 | cmd2;+time cmd1 | cmd2;+time -p cmd1 | cmd2;+! cmd1 | cmd2;+time -p ! cmd1 | cmd2;++cmd1 && cmd2+cmd1 || cmd2