From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1975 invoked by alias); 24 Mar 2015 16:09:52 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 34774 Received: (qmail 9700 invoked from network); 24 Mar 2015 16:09:49 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version:content-type; bh=6soC/jObJ22soLlGzVBnnrpOtLA4KZr+DLUStF4AsLk=; b=N/uUhqSsrYC8TOADRdkYifGSf16s6sRl9FlzqtPcZ4rltgtCHULV3hiSwEX0447bgP jlf0W9XCxaVag5nd4w8OBkED5UfsTzH72LBQfw4YehM6Vvm4prgu0ycAersFsbUQKLfS 9Y3xCQklw+5WFGltt3uFpGugrypltSqNKOHFMC4k+AnV/1SPCzWuRprQb7Kjdw3cy6Cn GEe3uoAwPO1Qp+d1zyeiNDYn5UvN6RHUChV9YtHDVV28ahkHJJTEWTK2re9etLw/vxE2 GIfgmUiTGUo6t0sCDFBpNUYYAYjxGKfGNLZSU9UMaUiDgTNOLlRuciKRpmOVTQuIKCJs mC8g== X-Gm-Message-State: ALoCoQlfsx6MH2+FqNaEBTZ0Y8wlHLWRdItGwuyWs39S18M9mcUO6khSjYk7d7kXpK080bs6JRbu X-Received: by 10.60.158.202 with SMTP id ww10mr4018304oeb.18.1427213384172; Tue, 24 Mar 2015 09:09:44 -0700 (PDT) From: Bart Schaefer Message-Id: <150324090941.ZM28427@torch.brasslantern.com> Date: Tue, 24 Mar 2015 09:09:41 -0700 In-Reply-To: <150323214506.ZM13999@torch.brasslantern.com> Comments: In reply to Bart Schaefer "Re: Testing interactive features (Re: capturing output of !! not working)" (Mar 23, 9:45pm) References: <20150319105716.620cd931@pwslap01u.europe.root.pri> <20150319125351.1e270c2d@pwslap01u.europe.root.pri> <20150320105703.2754b6af@pwslap01u.europe.root.pri> <150320090420.ZM21908@torch.brasslantern.com> <20150322183556.1fa0f143@ntlworld.com> <150322162235.ZM1728@torch.brasslantern.com> <20150323213426.21fd79c8@ntlworld.com> <150323175445.ZM32519@torch.brasslantern.com> <150323211241.ZM13580@torch.brasslantern.com> <150323214506.ZM13999@torch.brasslantern.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: Testing interactive features (Re: capturing output of !! not working) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Mar 23, 9:45pm, Bart Schaefer wrote: } Subject: Re: Testing interactive features (Re: capturing output of !! not } } } ... a patch to comptest for the Test/X01* failure with no TTY. } } } } - (( first++ )) && read -t 0.011 -k 1 < /dev/null } } + (( first++ )) && read -t 0.011 -u 0 -k 1 < /dev/null } } Well, that shuts up the error message, but it also causes the 0.011 } second timeout to be ignored. The test still succeeds for me, but } should get a more thorough examination. If the real point is to sleep for 0.11 seconds, input needs to be redirected from somewhere that doesn't instantly return EOF. That means tty or an open pipe. Can anyone think of a less silly-looking way to do that, than the below? (The -u 0 -k 1 are probably redundant now.) First hunk is for a thinko in my %prep. diff --git a/Test/W01history.ztst b/Test/W01history.ztst index 2492c41..3a64530 100644 --- a/Test/W01history.ztst +++ b/Test/W01history.ztst @@ -2,7 +2,7 @@ %prep - [[ -t 0 ]] && print -u $ZTST_fd History tests write to /dev/tty + if [[ -t 0 ]]; then print -u $ZTST_fd History tests write to /dev/tty; fi %test diff --git a/Test/comptest b/Test/comptest index ef84217..20a3a5b 100644 --- a/Test/comptest +++ b/Test/comptest @@ -164,7 +164,7 @@ zletest () { for input; do # zpty_flush Before zletest # sleep for $KEYTIMEOUT - (( first++ )) && read -t 0.011 -u 0 -k 1 < /dev/null + (( first++ )) && { sleep 2 & } | read -t 0.011 -u 0 -k 1 zpty -n -w zsh "$input" done zpty -n -w zsh $'\C-X'