]> git.ipfire.org Git - thirdparty/bash.git/blobdiff - tests/quote2.sub
bash-5.0 distribution sources and documentation
[thirdparty/bash.git] / tests / quote2.sub
diff --git a/tests/quote2.sub b/tests/quote2.sub
new file mode 100644 (file)
index 0000000..7deb4cf
--- /dev/null
@@ -0,0 +1,42 @@
+x=x
+e=
+
+recho ${x:+""}
+recho ${x:+ ""}
+recho ${x:+"" }
+recho ${x:+"$e"}
+recho ${x:+ "$e"}
+recho ${x:+"$e""$e"""}
+recho ${x:+"$e""$e"""}
+recho ${x:+"$e" "$e"""}
+recho ${x:+"$e""$e" ""}
+recho ${x:+ "$e""$e"""}
+
+echo =====
+recho ${x:+''}
+recho ${x:+ ''}
+recho ${x:+'' }
+recho ${x:+'' ''}
+
+recho ${x:+$e''}
+recho ${x:+''$e}
+
+recho ${x:+''$e $e''}
+
+echo =====
+recho ${x:+"$(:)"}
+recho ${x:+ "$(:)"}
+recho ${x:+"$(:)""$(:)"""}
+recho ${x:+"$(:)""$(:)"""}
+recho ${x:+"$(:)" "$(:)"""}
+recho ${x:+"$(:)""$(:)" ""}
+recho ${x:+ "$(:)""$(:)"""}
+
+echo =====
+recho ${x:+"`:`"}
+recho ${x:+ "`:`"}
+recho ${x:+"`:`""`:`"""}
+recho ${x:+"`:`""`:`"""}
+recho ${x:+"`:`" "`:`"""}
+recho ${x:+"`:`""`:`" ""}
+recho ${x:+ "`:`""`:`"""}