summaryrefslogtreecommitdiff
path: root/shell/ash_test/ash-alias
diff options
context:
space:
mode:
Diffstat (limited to 'shell/ash_test/ash-alias')
-rw-r--r--shell/ash_test/ash-alias/alias_brace.right1
-rwxr-xr-xshell/ash_test/ash-alias/alias_brace.tests16
-rw-r--r--shell/ash_test/ash-alias/alias_case.right1
-rwxr-xr-xshell/ash_test/ash-alias/alias_case.tests8
4 files changed, 26 insertions, 0 deletions
diff --git a/shell/ash_test/ash-alias/alias_brace.right b/shell/ash_test/ash-alias/alias_brace.right
new file mode 100644
index 0000000..7326d96
--- /dev/null
+++ b/shell/ash_test/ash-alias/alias_brace.right
@@ -0,0 +1 @@
+Ok
diff --git a/shell/ash_test/ash-alias/alias_brace.tests b/shell/ash_test/ash-alias/alias_brace.tests
new file mode 100755
index 0000000..7571b64
--- /dev/null
+++ b/shell/ash_test/ash-alias/alias_brace.tests
@@ -0,0 +1,16 @@
+# Note: bash would need:
+#shopt -s expand_aliases
+# to enable aliases in non-interactive mode
+alias BEGIN={ END=}
+BEGIN
+ cat <<- EOF > /dev/null
+ $(:)
+ EOF
+END
+
+: <<- EOF &&
+ $(:)
+EOF
+BEGIN
+ echo Ok
+END
diff --git a/shell/ash_test/ash-alias/alias_case.right b/shell/ash_test/ash-alias/alias_case.right
new file mode 100644
index 0000000..7326d96
--- /dev/null
+++ b/shell/ash_test/ash-alias/alias_case.right
@@ -0,0 +1 @@
+Ok
diff --git a/shell/ash_test/ash-alias/alias_case.tests b/shell/ash_test/ash-alias/alias_case.tests
new file mode 100755
index 0000000..ed82758
--- /dev/null
+++ b/shell/ash_test/ash-alias/alias_case.tests
@@ -0,0 +1,8 @@
+# Note: bash would need:
+#shopt -s expand_aliases
+# to enable aliases in non-interactive mode
+alias a="case x in " b=x
+a
+b) echo BAD;;
+*) echo Ok;;
+esac