diff options
author | zhuk <zhuk@openbsd.org> | 2021-03-05 15:24:37 +0000 |
---|---|---|
committer | zhuk <zhuk@openbsd.org> | 2021-03-05 15:24:37 +0000 |
commit | 5c6f3d6f2747c1eaba1d6fc7e2b9295ba11bdebc (patch) | |
tree | 21c026ea8ea30e80306a55e11886029c8dc35cc4 /regress | |
parent | Fix old ksh bug: wrong variable being looked up when value is provided. (diff) | |
download | wireguard-openbsd-5c6f3d6f2747c1eaba1d6fc7e2b9295ba11bdebc.tar.xz wireguard-openbsd-5c6f3d6f2747c1eaba1d6fc7e2b9295ba11bdebc.zip |
Test case for read-only array being not that read-only in ksh.
okay tb@
Diffstat (limited to 'regress')
-rw-r--r-- | regress/bin/ksh/obsd-regress.t | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/regress/bin/ksh/obsd-regress.t b/regress/bin/ksh/obsd-regress.t index b9b33d17655..a2121e82a08 100644 --- a/regress/bin/ksh/obsd-regress.t +++ b/regress/bin/ksh/obsd-regress.t @@ -1,4 +1,4 @@ -# $OpenBSD: obsd-regress.t,v 1.12 2020/07/07 10:33:58 jca Exp $ +# $OpenBSD: obsd-regress.t,v 1.13 2021/03/05 15:24:37 zhuk Exp $ # # ksh regression tests from OpenBSD @@ -602,3 +602,16 @@ stdin: wait $p expected-exit: e == 1 --- + +name: overwrite-ro-array +description: + do not allow to override first element of a read-only array + via the non-array access. +stdin: + arr[0]=foo + readonly arr + arr=bar +expected-exit: e == 1 +expected-stderr-pattern: + /: arr: is read only$/ +--- |