zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: Felix Rosencrantz <f_rosencrantz@yahoo.com>,
	zsh-workers <zsh-workers@sunsite.auc.dk>
Subject: Re: PATCH: Completion matching control test. (Try 2)
Date: Tue, 16 May 2000 17:23:11 +0000	[thread overview]
Message-ID: <1000516172311.ZM6901@candle.brasslantern.com> (raw)
In-Reply-To: <20000516060435.682.qmail@web1303.mail.yahoo.com>

On May 15, 11:04pm, Felix Rosencrantz wrote:
} Subject: PATCH: Completion matching control test. (Try 2)
}
} I would really like to say
}         print -lr "COMPADD:{${match[6]//[\r\n]/}}"
} 
} But we can't use the backslash escape sequences here.

This works for me:

	print -lr "COMPADD:{${match[6]//[$'\r\n']/}}"

Normally $'...' isn't expanded inside double quotes, but because it's
inside an embedded ${...} expansion, the rules get bent.

(I hope that's not a bug.)

} I'd like to see this added even though the test fails.

The failure included below looks like a bug in the matcher code, because
the L spec should cause the string on the line to be retained.  Several
more tests fail for the same reason (I commented out the cleanup/exit in
ZTST_testfailed to force it to run them all).

I suspect the other failed tests are confusion over `*' vs. `**' in the
matcher patterns, but I'm not sure.  For example, the test

Documentation example using "r:|[A-Z0-9]=* r:|=*", input H

works if I change the * to **, and the "input 2" test after it also gives
the right output with ** but fails based on the ending cursor position.

(Does that mean the examples in the doc are out of date?  I haven't looked
yet.)

*** /tmp/zsh.ztst.out.26952     Tue May 16 09:36:58 2000
--- /tmp/zsh.ztst.tout.26952    Tue May 16 09:37:00 2000
***************
*** 1,2 ****
! line: {tst nolistbeep }{}
  COMPADD:{}
--- 1,2 ----
! line: {tst listbeep }{}
  COMPADD:{}
Test ../../zsh-3.1.6/Test/54compmatch.ztst failed: output differs from expected as shown above for:
  example1_list=(
        kshoptionprint        shglob              
        listambiguous         shinstdin           
        listbeep              shnullcmd           
        listpacked            shoptionletters     
        listrowsfirst         shortloops          
        listtypes             shwordsplit
   )
 options_matcher='L:|[nN][oO]= M:_= M:{A-Z}={a-z}'
 test_code $options_matcher example1_list
 comptest -c "$code" $'tst nolistbee\t'
Was testing: Documentation example for options, input "nolistbee"
../../zsh-3.1.6/Test/54compmatch.ztst: test failed.


-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com


  parent reply	other threads:[~2000-05-16 17:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-05-16  6:04 Felix Rosencrantz
2000-05-16  8:55 ` Peter Stephenson
2000-05-16 17:23 ` Bart Schaefer [this message]
2000-05-17  4:11 Felix Rosencrantz
2000-05-17 10:14 ` Bart Schaefer
2000-05-17 10:33 Sven Wischnowsky
2000-05-17 12:30 ` Tanaka Akira
2000-05-17 11:57 Sven Wischnowsky
2000-05-18  2:35 Felix Rosencrantz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1000516172311.ZM6901@candle.brasslantern.com \
    --to=schaefer@candle.brasslantern.com \
    --cc=f_rosencrantz@yahoo.com \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).