From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 53 invoked from network); 11 Mar 2004 19:16:18 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 11 Mar 2004 19:16:18 -0000 Received: (qmail 19993 invoked by alias); 11 Mar 2004 19:16:03 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 19603 Received: (qmail 19976 invoked from network); 11 Mar 2004 19:16:02 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 11 Mar 2004 19:16:02 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [62.189.58.19] by sunsite.dk (MessageWall 1.0.8) with SMTP; 11 Mar 2004 19:16:1 -0000 Received: from MAILSWEEPER01.csr.com (mailhost1.csr.com [62.189.183.235]) by lhuumrelay3.lnd.ops.eu.uu.net (8.11.0/8.11.0) with ESMTP id i2BJFxv27840 for ; Thu, 11 Mar 2004 19:16:00 GMT Received: from EXCHANGE02.csr.com (unverified [192.168.137.45]) by MAILSWEEPER01.csr.com (Content Technologies SMTPRS 4.3.12) with ESMTP id for ; Thu, 11 Mar 2004 19:15:38 +0000 Received: from csr.com ([192.168.144.127]) by EXCHANGE02.csr.com with Microsoft SMTPSVC(5.0.2195.6713); Thu, 11 Mar 2004 19:17:58 +0000 To: zsh-workers@sunsite.dk (Zsh hackers list) Subject: PATCH: omit completion tests if no zpty Date: Thu, 11 Mar 2004 19:15:58 +0000 Message-ID: <18997.1079032558@csr.com> From: Peter Stephenson X-OriginalArrivalTime: 11 Mar 2004 19:17:58.0794 (UTC) FILETIME=[90731EA0:01C4079D] This should prevent the lack of zpty causing unnecessary grief, although obviously it doesn't help if zpty is present but not working. I will try and get 4.2.0-pre-4 out when Oliver has finished off HP-UX for the time being. I imagine we will have to do without zpty there. It would be nice at least to have some way of detecting if it doesn't work. (Does it have /dev/ptmx? Is it defining __SVR4? If so, it might be getting into problems fiddling with STREAMS, which is the problem we had with the first go using /dev/ptmx on Linux. If that looks likely, restricting the STREAMS stuff to Solaris is probably the best bet. But that's only one of a dozen possibilities.) I will need to alter MACHINES. A lot of that material is historical and should more clearly be indicated as such. Any pre-edited entries for particular machine types would come in very handy. Index: Test/Y01completion.ztst =================================================================== RCS file: /cvsroot/zsh/zsh/Test/Y01completion.ztst,v retrieving revision 1.3 diff -u -r1.3 Y01completion.ztst --- Test/Y01completion.ztst 22 Aug 2001 15:59:27 -0000 1.3 +++ Test/Y01completion.ztst 11 Mar 2004 19:01:44 -0000 @@ -1,18 +1,20 @@ # Tests for completion system. %prep - . $ZTST_srcdir/comptest - - mkdir comp.tmp - cd comp.tmp - - comptestinit -z $ZTST_testdir/../Src/zsh && - { - mkdir dir1 && - mkdir dir2 && - touch file1 && - touch file2 - } + if ( zmodload -i zsh/zpty ) >/dev/null 2>&1; then + . $ZTST_srcdir/comptest + mkdir comp.tmp + cd comp.tmp + comptestinit -z $ZTST_testdir/../Src/zsh && + { + mkdir dir1 && + mkdir dir2 && + touch file1 && + touch file2 + } + else + ZTST_unimplemented="the zsh/zpty module is not available" + fi %test Index: Test/Y02compmatch.ztst =================================================================== RCS file: /cvsroot/zsh/zsh/Test/Y02compmatch.ztst,v retrieving revision 1.2 diff -u -r1.2 Y02compmatch.ztst --- Test/Y02compmatch.ztst 25 Jun 2001 03:06:35 -0000 1.2 +++ Test/Y02compmatch.ztst 11 Mar 2004 19:01:45 -0000 @@ -11,28 +11,30 @@ # contains the compadd output. %prep - . $ZTST_srcdir/comptest - - mkdir match.tmp - cd match.tmp - - comptestinit -z $ZTST_testdir/../Src/zsh && - { - list1=(IndianRed IndianRed2 IndianRed3 IndianRed4) - test_code () { - matcher=$1; - list=$2; - code="compdef _tst tst ; _tst () { echo -n '';compadd -M '" - code="$code$matcher" - code="$code' - ${(P)list} ; echo -n ''" - code="$code; $extra_cmd" - code="$code; echo -n ''" - code="$code; echo \$compstate[insert_positions]" - code="$code; echo -n ''" - code="$code}" - comptesteval "$code" + if ( zmodload -i zsh/zpty ) >/dev/null 2>&1; then + . $ZTST_srcdir/comptest + mkdir match.tmp + cd match.tmp + comptestinit -z $ZTST_testdir/../Src/zsh && + { + list1=(IndianRed IndianRed2 IndianRed3 IndianRed4) + test_code () { + matcher=$1; + list=$2; + code="compdef _tst tst ; _tst () { echo -n '';compadd -M '" + code="$code$matcher" + code="$code' - ${(P)list} ; echo -n ''" + code="$code; $extra_cmd" + code="$code; echo -n ''" + code="$code; echo \$compstate[insert_positions]" + code="$code; echo -n ''" + code="$code}" + comptesteval "$code" + } } - } + else + ZTST_unimplemented="the zsh/zpty module is not available" + fi %test Index: Test/Y03arguments.ztst =================================================================== RCS file: /cvsroot/zsh/zsh/Test/Y03arguments.ztst,v retrieving revision 1.5 diff -u -r1.5 Y03arguments.ztst --- Test/Y03arguments.ztst 25 Feb 2002 09:16:27 -0000 1.5 +++ Test/Y03arguments.ztst 11 Mar 2004 19:01:45 -0000 @@ -1,16 +1,18 @@ # Tests for _arguments. %prep - . $ZTST_srcdir/comptest - - mkdir comp.tmp - cd comp.tmp - - comptestinit -z $ZTST_testdir/../Src/zsh && - { - comptesteval 'compdef _tst tst' - tst_arguments () { comptesteval "_tst () { _arguments ${${(@qq)*}} }" } - } + if ( zmodload -i zsh/zpty ) >/dev/null 2>&1; then + . $ZTST_srcdir/comptest + mkdir comp.tmp + cd comp.tmp + comptestinit -z $ZTST_testdir/../Src/zsh && + { + comptesteval 'compdef _tst tst' + tst_arguments () { comptesteval "_tst () { _arguments ${${(@qq)*}} }" } + } + else + ZTST_unimplemented="the zsh/zpty module is not available" + fi %test tst_arguments ':desc1:(arg1)' -- Peter Stephenson Software Engineer CSR Ltd., Science Park, Milton Road, Cambridge, CB4 0WH, UK Tel: +44 (0)1223 692070 ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com **********************************************************************