diff options
author | Jari Aalto <jari.aalto@cante.net> | 2002-07-17 14:10:11 +0000 |
---|---|---|
committer | Jari Aalto <jari.aalto@cante.net> | 2009-09-12 16:46:55 +0000 |
commit | 7117c2d221b2aed4ede8600f6a36b7c1454b4f55 (patch) | |
tree | b792f26ecca68813c51ed5ba2e381790758ef31b /tests/new-exp.tests | |
parent | f73dda092b33638d2d5e9c35375f687a607b5403 (diff) | |
download | bash-7117c2d221b2aed4ede8600f6a36b7c1454b4f55.tar.gz |
Imported from ../bash-2.05b.tar.gz.devel-base-dist
Diffstat (limited to 'tests/new-exp.tests')
-rw-r--r-- | tests/new-exp.tests | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/tests/new-exp.tests b/tests/new-exp.tests index 4a33c354..89b92136 100644 --- a/tests/new-exp.tests +++ b/tests/new-exp.tests @@ -44,9 +44,9 @@ expect "<$HOME>" recho "$(echo "$(echo "${HOME}")")" P=*@* -expect '<*@*>' +expect '<*@>' recho "${P%"*"}" # -expect '<*@*>' +expect '<*@>' recho "${P%'*'}" # expect '<@*>' recho "${P#\*}" # should be @* @@ -521,6 +521,22 @@ recho "${*:1:0}" set a recho ${@:1:$(($# - 2))} +XPATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:.:/sbin:/usr/sbin +set $( IFS=: ; echo $XPATH ) + +recho ${@##*/} +recho ${@%%[!/]*} + +recho ${@#/*} +recho ${@%*/} + +set /full/path/to/x16 /another/full/path + +recho ${1%/*} +recho ${1%%[!/]*} +recho ${1#*/} +recho ${1##*/} + # this must be last! expect $0: 'ABXD: parameter unset' recho ${ABXD:?"parameter unset"} |