]> git.ipfire.org Git - thirdparty/bash.git/blobdiff - tests/comsub-posix.tests
bash-5.1 distribution sources and documentation
[thirdparty/bash.git] / tests / comsub-posix.tests
index d53e6ebc90c431ad7c17a213560b0f87f178c807..4fe1dfaa19304099a3532cafc27129d99cd82083 100644 (file)
@@ -1,3 +1,16 @@
+#   This program is free software: you can redistribute it and/or modify
+#   it under the terms of the GNU General Public License as published by
+#   the Free Software Foundation, either version 3 of the License, or
+#   (at your option) any later version.
+#
+#   This program is distributed in the hope that it will be useful,
+#   but WITHOUT ANY WARRANTY; without even the implied warranty of
+#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#   GNU General Public License for more details.
+#
+#   You should have received a copy of the GNU General Public License
+#   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
 : ${HOME:=/}
 
 # works right
@@ -14,6 +27,7 @@ echo $(
 )
 echo $()
 echo ab$()cd
+echo ab$(  )cd
 
 echo $(case a in (a) echo sh_352.26ax; esac )
 echo $(case a in (a) echo sh_352.26ay; esac)
@@ -167,6 +181,10 @@ echo $(
   case x in  x) echo x;; esac
 )
 
+echo $(
+  case x in  x) echo x;; esac # followed by a comment
+)
+
 echo $(
   case x in (x) echo x;; esac
 )
@@ -185,6 +203,12 @@ cat <<\eof
 eof
 )
 
+echo $(
+    cat <<\eof
+    here-doc with \()
+eof
+)
+
 echo $(
 cat <<\)
        here-doc terminated with a parenthesis
@@ -197,6 +221,10 @@ cat <<\eof
 eof
 )
 
+echo $(
+       echo line terminated with a backslash # \
+)
+
 ${THIS_SH} ./comsub-posix1.sub
 
 ${THIS_SH} ./comsub-posix2.sub