diff options
Diffstat (limited to 'shell/ash_test/ash-vars')
-rw-r--r-- | shell/ash_test/ash-vars/var_bash3.right | 20 | ||||
-rwxr-xr-x | shell/ash_test/ash-vars/var_bash3.tests | 41 |
2 files changed, 61 insertions, 0 deletions
diff --git a/shell/ash_test/ash-vars/var_bash3.right b/shell/ash_test/ash-vars/var_bash3.right new file mode 100644 index 0000000..f7f1479 --- /dev/null +++ b/shell/ash_test/ash-vars/var_bash3.right @@ -0,0 +1,20 @@ +a041#c +a041#c +a\041#c +a\041#c +a\041#c +a\041#c +a\041#c +a\041#c +a\041#c +a\c +a\c +a\c +a\\c +a\\c +a\\c +a\tc +a\tc +a\tc +atc +a\tc diff --git a/shell/ash_test/ash-vars/var_bash3.tests b/shell/ash_test/ash-vars/var_bash3.tests new file mode 100755 index 0000000..b905027 --- /dev/null +++ b/shell/ash_test/ash-vars/var_bash3.tests @@ -0,0 +1,41 @@ +a='abc' +r=${a//b/\041#} +echo $r +echo ${a//b/\041#} +echo "${a//b/\041#}" + +a='abc' +r=${a//b/\\041#} +echo $r +echo ${a//b/\\041#} +echo "${a//b/\\041#}" + +a='abc' +b='\041#' +r=${a//b/$b} +echo $r +echo ${a//b/$b} +echo "${a//b/$b}" + +a='abc' +b='\' +r="${a//b/$b}" +echo $r +echo ${a//b/$b} +echo "${a//b/$b}" + +a='abc' +b='\\' +r="${a//b/$b}" +echo $r +echo ${a//b/$b} +echo "${a//b/$b}" + +a='abc' +b='\t' +r="${a//b/$b}" +echo $r +echo ${a//b/$b} +echo "${a//b/$b}" +echo ${a//b/\t} +echo "${a//b/\t}" |