summaryrefslogtreecommitdiff
path: root/release/src/router/busybox/shell/hush_test/hush-psubst
diff options
context:
space:
mode:
Diffstat (limited to 'release/src/router/busybox/shell/hush_test/hush-psubst')
-rw-r--r--release/src/router/busybox/shell/hush_test/hush-psubst/tick.right2
-rwxr-xr-xrelease/src/router/busybox/shell/hush_test/hush-psubst/tick.tests4
-rw-r--r--release/src/router/busybox/shell/hush_test/hush-psubst/tick2.right1
-rwxr-xr-xrelease/src/router/busybox/shell/hush_test/hush-psubst/tick2.tests5
-rw-r--r--release/src/router/busybox/shell/hush_test/hush-psubst/tick3.right6
-rwxr-xr-xrelease/src/router/busybox/shell/hush_test/hush-psubst/tick3.tests12
-rw-r--r--release/src/router/busybox/shell/hush_test/hush-psubst/tick4.right7
-rwxr-xr-xrelease/src/router/busybox/shell/hush_test/hush-psubst/tick4.tests7
-rw-r--r--release/src/router/busybox/shell/hush_test/hush-psubst/tick_huge.right3
-rwxr-xr-xrelease/src/router/busybox/shell/hush_test/hush-psubst/tick_huge.tests7
10 files changed, 54 insertions, 0 deletions
diff --git a/release/src/router/busybox/shell/hush_test/hush-psubst/tick.right b/release/src/router/busybox/shell/hush_test/hush-psubst/tick.right
new file mode 100644
index 00000000..6ed281c7
--- /dev/null
+++ b/release/src/router/busybox/shell/hush_test/hush-psubst/tick.right
@@ -0,0 +1,2 @@
+1
+1
diff --git a/release/src/router/busybox/shell/hush_test/hush-psubst/tick.tests b/release/src/router/busybox/shell/hush_test/hush-psubst/tick.tests
new file mode 100755
index 00000000..1f749a9c
--- /dev/null
+++ b/release/src/router/busybox/shell/hush_test/hush-psubst/tick.tests
@@ -0,0 +1,4 @@
+true
+false; echo `echo $?`
+true
+{ false; echo `echo $?`; }
diff --git a/release/src/router/busybox/shell/hush_test/hush-psubst/tick2.right b/release/src/router/busybox/shell/hush_test/hush-psubst/tick2.right
new file mode 100644
index 00000000..216c883b
--- /dev/null
+++ b/release/src/router/busybox/shell/hush_test/hush-psubst/tick2.right
@@ -0,0 +1 @@
+BAZ
diff --git a/release/src/router/busybox/shell/hush_test/hush-psubst/tick2.tests b/release/src/router/busybox/shell/hush_test/hush-psubst/tick2.tests
new file mode 100755
index 00000000..db4e944f
--- /dev/null
+++ b/release/src/router/busybox/shell/hush_test/hush-psubst/tick2.tests
@@ -0,0 +1,5 @@
+if false; then
+ echo "FOO"
+ tmp=`echo BAR >&2`
+fi
+echo BAZ
diff --git a/release/src/router/busybox/shell/hush_test/hush-psubst/tick3.right b/release/src/router/busybox/shell/hush_test/hush-psubst/tick3.right
new file mode 100644
index 00000000..dc84e926
--- /dev/null
+++ b/release/src/router/busybox/shell/hush_test/hush-psubst/tick3.right
@@ -0,0 +1,6 @@
+\TESTZZBEST
+$TEST
+Q
+a\bc
+a"c
+done:0
diff --git a/release/src/router/busybox/shell/hush_test/hush-psubst/tick3.tests b/release/src/router/busybox/shell/hush_test/hush-psubst/tick3.tests
new file mode 100755
index 00000000..469c43c2
--- /dev/null
+++ b/release/src/router/busybox/shell/hush_test/hush-psubst/tick3.tests
@@ -0,0 +1,12 @@
+test "$CONFIG_FEATURE_FANCY_ECHO" = "y" || exit 77
+
+TEST=Q
+# \` is special
+echo `echo '\'TEST\`echo ZZ\`BEST`
+# \$ and \\ are special
+echo `echo \\$TEST`
+echo `echo \$TEST`
+echo a`echo \\\\b`c
+# \" etc are NOT special (passed verbatim WITH \)!
+echo a`echo \"`c
+echo done:$?
diff --git a/release/src/router/busybox/shell/hush_test/hush-psubst/tick4.right b/release/src/router/busybox/shell/hush_test/hush-psubst/tick4.right
new file mode 100644
index 00000000..d8030eaf
--- /dev/null
+++ b/release/src/router/busybox/shell/hush_test/hush-psubst/tick4.right
@@ -0,0 +1,7 @@
+(TEST) BEST
+TEST) BEST
+((TEST) BEST
+)
+abc
+a)c
+OK: 0
diff --git a/release/src/router/busybox/shell/hush_test/hush-psubst/tick4.tests b/release/src/router/busybox/shell/hush_test/hush-psubst/tick4.tests
new file mode 100755
index 00000000..f2305fb3
--- /dev/null
+++ b/release/src/router/busybox/shell/hush_test/hush-psubst/tick4.tests
@@ -0,0 +1,7 @@
+echo $(echo '(TEST)' BEST)
+echo $(echo 'TEST)' BEST)
+echo $(echo \(\(TEST\) BEST)
+echo $(echo \))
+echo $(echo a"`echo "b"`"c )
+echo $(echo a"`echo ")"`"c )
+echo OK: $?
diff --git a/release/src/router/busybox/shell/hush_test/hush-psubst/tick_huge.right b/release/src/router/busybox/shell/hush_test/hush-psubst/tick_huge.right
new file mode 100644
index 00000000..11740f67
--- /dev/null
+++ b/release/src/router/busybox/shell/hush_test/hush-psubst/tick_huge.right
@@ -0,0 +1,3 @@
+546ed3f5c81c780d3ab86ada14824237 -
+546ed3f5c81c780d3ab86ada14824237 -
+End
diff --git a/release/src/router/busybox/shell/hush_test/hush-psubst/tick_huge.tests b/release/src/router/busybox/shell/hush_test/hush-psubst/tick_huge.tests
new file mode 100755
index 00000000..acce92fb
--- /dev/null
+++ b/release/src/router/busybox/shell/hush_test/hush-psubst/tick_huge.tests
@@ -0,0 +1,7 @@
+# This creates 120k file
+yes "123456789 123456789 123456789 123456789" | head -3000 >>"$0.tmp"
+
+echo "`cat $0.tmp`" | md5sum
+rm "$0.tmp"
+yes "123456789 123456789 123456789 123456789" | head -3000 | md5sum
+echo End