summaryrefslogtreecommitdiff
path: root/shell/hush_test
diff options
context:
space:
mode:
Diffstat (limited to 'shell/hush_test')
-rw-r--r--shell/hush_test/hush-quoting/dollar_squote_bash1.right10
-rwxr-xr-xshell/hush_test/hush-quoting/dollar_squote_bash1.tests8
-rw-r--r--shell/hush_test/hush-quoting/dollar_squote_bash2.right6
-rwxr-xr-xshell/hush_test/hush-quoting/dollar_squote_bash2.tests10
-rw-r--r--shell/hush_test/hush-vars/var_bash7.right1
-rwxr-xr-xshell/hush_test/hush-vars/var_bash7.tests1
6 files changed, 36 insertions, 0 deletions
diff --git a/shell/hush_test/hush-quoting/dollar_squote_bash1.right b/shell/hush_test/hush-quoting/dollar_squote_bash1.right
new file mode 100644
index 0000000..9f4e25e
--- /dev/null
+++ b/shell/hush_test/hush-quoting/dollar_squote_bash1.right
@@ -0,0 +1,10 @@
+a b
+$'a\tb'
+a
+b c
+def
+a'b c"d e\f
+a3b c3b e33f
+a\80b c08b
+a3b c30b
+x y
diff --git a/shell/hush_test/hush-quoting/dollar_squote_bash1.tests b/shell/hush_test/hush-quoting/dollar_squote_bash1.tests
new file mode 100755
index 0000000..6fc411b
--- /dev/null
+++ b/shell/hush_test/hush-quoting/dollar_squote_bash1.tests
@@ -0,0 +1,8 @@
+echo $'a\tb'
+echo "$'a\tb'"
+echo $'a\nb' $'c\nd''ef'
+echo $'a\'b' $'c\"d' $'e\\f'
+echo $'a\63b' $'c\063b' $'e\0633f'
+echo $'a\80b' $'c\608b'
+echo $'a\x33b' $'c\x330b'
+echo $'x\x9y'
diff --git a/shell/hush_test/hush-quoting/dollar_squote_bash2.right b/shell/hush_test/hush-quoting/dollar_squote_bash2.right
new file mode 100644
index 0000000..f7a1731
--- /dev/null
+++ b/shell/hush_test/hush-quoting/dollar_squote_bash2.right
@@ -0,0 +1,6 @@
+strstrstrstrstrstrstrstrstrstrstrstrstrstrstrstrstr
+strstrstrstrstrstrstrstrstrstrstrstrstrstrstrstrstr
+80:\
+81:\
+82:\
+Done:0
diff --git a/shell/hush_test/hush-quoting/dollar_squote_bash2.tests b/shell/hush_test/hush-quoting/dollar_squote_bash2.tests
new file mode 100755
index 0000000..4497728
--- /dev/null
+++ b/shell/hush_test/hush-quoting/dollar_squote_bash2.tests
@@ -0,0 +1,10 @@
+# Embedded NULs
+echo $'str\x00'strstrstrstrstrstrstrstrstrstrstrstrstrstrstrstr
+echo $'str\000'strstrstrstrstrstrstrstrstrstrstrstrstrstrstrstr
+
+# The chars after '\' are hex 0x80,81,82...
+echo 80:$'\'
+echo 81:$'\'
+echo 82:$'\'
+
+echo Done:$?
diff --git a/shell/hush_test/hush-vars/var_bash7.right b/shell/hush_test/hush-vars/var_bash7.right
new file mode 100644
index 0000000..223b783
--- /dev/null
+++ b/shell/hush_test/hush-vars/var_bash7.right
@@ -0,0 +1 @@
+B
diff --git a/shell/hush_test/hush-vars/var_bash7.tests b/shell/hush_test/hush-vars/var_bash7.tests
new file mode 100755
index 0000000..c4ce03f
--- /dev/null
+++ b/shell/hush_test/hush-vars/var_bash7.tests
@@ -0,0 +1 @@
+x=AB; echo "${x#$'\x41'}"