summaryrefslogtreecommitdiff
path: root/regress/bin/ksh
diff options
context:
space:
mode:
authoranton <anton@cvs.openbsd.org>2017-07-04 11:46:16 +0000
committeranton <anton@cvs.openbsd.org>2017-07-04 11:46:16 +0000
commit5cb517100cc666497c774f2d1e3a7807a76de4a2 (patch)
tree0cc394edfaba3f9ef0ec86f2edba9d0d2ece6c7e /regress/bin/ksh
parent97d557b5fa238de29bd653b85efdd0e0a6a43996 (diff)
Backout previous due to a bug discovered by zhuk@ that requires some tinkering
and is not an easy fix for now.
Diffstat (limited to 'regress/bin/ksh')
-rw-r--r--regress/bin/ksh/strsub.t14
1 files changed, 14 insertions, 0 deletions
diff --git a/regress/bin/ksh/strsub.t b/regress/bin/ksh/strsub.t
index 419ae19d35e..56494675dde 100644
--- a/regress/bin/ksh/strsub.t
+++ b/regress/bin/ksh/strsub.t
@@ -11,6 +11,10 @@ stdin:
v='new old'
echo ${v/old/new}
echo "${v/old/new}"
+ foo='baaaaar'
+ echo ${foo//a/v}
+ echo ${foo/a/v}
+expected-fail: yes
expected-stdout:
empty
empty
@@ -18,6 +22,8 @@ expected-stdout:
new new
new new
new new
+ bvvvvvr
+ bvaaaar
---
name: strsub-multiline
@@ -30,6 +36,7 @@ stdin:
bsd.sp
!`
echo ${v/bsd.rd/}
+expected-fail: yes
expected-stdout:
bsd bsd.sp
---
@@ -44,6 +51,7 @@ stdin:
echo ${v//[[:blank:]]/}
v='/usr/src'
echo ${v//\////}
+expected-fail: yes
expected-stdout:
new new new
whitespace
@@ -58,6 +66,7 @@ stdin:
echo ${u:-${v/old/new}}
v='old new'
echo ${v/old/${v/old/new}}
+expected-fail: yes
expected-stdout:
new
new new new
@@ -72,6 +81,7 @@ stdin:
echo ${v/o*/new}
echo ${v//old?(\/)/new}
echo ${v//?(\/)old//}
+expected-fail: yes
expected-stdout:
new old
new
@@ -86,6 +96,7 @@ stdin:
v=old
r=new
echo ${v/old/$r}
+expected-fail: yes
expected-stdout:
new
---
@@ -96,6 +107,7 @@ description:
stdin:
v=old
echo ${v/old/new*}
+expected-fail: yes
expected-stdout:
new*
---
@@ -106,6 +118,7 @@ description:
stdin:
v=old
echo ${v/}
+expected-fail: yes
expected-stdout:
old
---
@@ -116,6 +129,7 @@ description:
stdin:
set -u
echo ${v/old/new}
+expected-fail: yes
expected-stderr-pattern:
/v: parameter not set/
expected-exit: 1