On Sun, Jul 15, 2012 at 2:51 AM, Roland Mainz <[email protected]> wrote:
> On Sun, Jul 15, 2012 at 2:26 AM, Roland Mainz <[email protected]> 
> wrote:
>> The following one-liner running with ast-ksh.2012-06-28 doesn't stop
>> on the first character read when in a terminal session
>> $ ksh -c 'function x { for((;;));do read -r -N1 c ; [[ "$c" != "" ]]
>> && return 0 ; done ; } ; x', non-interactive mode works OK and it
>> works with ast-ksh.2010-06-21, too.
>
> Here is a testcase:
> -- snip --
> SHELL=/bin/ksh
>
> TERM='dumb' pty \
>         -l jjj \
>         --dialogue <<<$'d 2000\nc X\nd 500\nr\n' \
>         $SHELL \
>         -c \
>         'function x { for((;;));do read -r -t0.5 -N1 c ; [[ "$c" != "" ]] &&
> return 0 ; done ; } ; x && print OK'
>
> if [[ "$(<jjj)" == 'XOK\r\n' ]] ; then
>         print "SUCCESS!"
> else
>         print -u2 -f 'FAIL, got %q\n' "$(<jjj)"
> fi
> -- snip --

Test1...test2...testX... just testing the list archive (and CC:'ing
dgk for the testcase) ... ignore...

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) [email protected]
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 3992797
 (;O/ \/ \O;)
_______________________________________________
ast-developers mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-developers

Reply via email to