On Thu, 30 Jul 2015 17:50:29 +0300, Vadim Zhukov wrote:
> Too bad that I don't know how to make a test for this issue in
> regress/usr.bin/ksh, though. It could tests stdin, stdout, stderr and
> files, but I dunno how to test the shell prompt. Any ideas?
How about this?
- todd
Index: regress.t
===================================================================
RCS file: /cvs/src/regress/bin/ksh/regress.t,v
retrieving revision 1.1
diff -u -p -u -r1.1 regress.t
--- regress.t 2 Dec 2013 20:39:44 -0000 1.1
+++ regress.t 30 Jul 2015 17:09:11 -0000
@@ -1089,3 +1089,24 @@ expected-stdout:
ot OK
---
+name: regression-63
+description:
+ Check octal escape expansion in prompts.
+file-setup: file 644 "env"
+ PS1=\\131
+ PS2=\\130
+env-setup: !ENV=./env!
+arguments: !-i!
+stdin:
+ echo hello
+ for i in 1 2 3; do
+ echo there
+ done
+expected-stdout:
+ hello
+ there
+ there
+ there
+expected-stderr: !
+ YYXXY
+---