%prep if ( zmodload -i zsh/zpty ) >/dev/null 2>&1; then . $ZTST_srcdir/comptest mkdir zle.tmp cd zle.tmp print -lr date 'echo xyz three' 'echo xyz two' 'echo 123 abc' \ 'echo abc abcdef' 'echo abc' 'echo xyz' 'echo date' "echo '*OH NO*'" \ "echo '\n'" 'echo "*WHAT?*"' > historyX01 comptestinit -z $ZTST_testdir/../Src/zsh else ZTST_unimplemented="the zsh/zpty module is not available" fi %test # Tests to add: # case-insesitivity # ignoring duplicate lines # special keys comptesteval 'fc -R historyX01' termtest $'\C-Rabc' 0q:Verify incremental search first match >echo abc >bck-i-search: abc_ comptesteval 'fc -R historyX01' termtest $'\C-Rabcd\C-H' 0q:Verify incremental search first match via backspace >echo abc >bck-i-search: abc_ comptesteval 'fc -R historyX01' termtest $'\n\C-Rabc\C-R' 0q:Verify incremental search second match >echo abc abcdef >bck-i-search: abc_ comptesteval 'fc -R historyX01' termtest $'\C-Rabc\C-R\C-R' 0q:Verify incremental search third match >echo abc abcdef >bck-i-search: abc_ comptesteval 'fc -R historyX01' termtest $'\C-Rabc\C-R\C-R\C-R' 0q:Verify incremental search fourth match >echo 123 abc >bck-i-search: abc_ comptesteval 'fc -R historyX01' termtest $'\C-Rabc\C-R\C-R\C-R\C-R' 0q:Verify incremental search failed fifth match >echo 123 abc >failing bck-i-search: abc_ comptesteval 'fc -R historyX01' termtest $'\C-Rabc\C-R\C-R\C-Rd' 0q:Verify incremental search pass something >echo 123 abc >failing bck-i-search: abcd_ comptesteval 'fc -R historyX01' termtest $'\C-Rabc\C-R\C-R\C-Rd\C-H\C-H\C-Hd' 0q:Verify incremental search pass, backup, and find again. >echo abc abcdef >bck-i-search: abcd_ comptesteval 'fc -R historyX01' termtest $'\C-Rabcd\C-T' 0q:Verify incremental search pass, then use search forward to find. >echo abc abcdef >fwd-i-search: abcd_ comptesteval 'fc -R historyX01' termtest $'\C-R^date' 0q:Verify incremental search bol pattern >date >bck-i-search: ^date_ comptesteval 'fc -R historyX01' termtest $'\C-R\\' 0q:Verify incremental search backslash >echo '\n' >bck-i-search: \_ comptesteval 'fc -R historyX01' termtest $'\C-XR\\*' 0q:Verify incremental search backslash star >echo "*WHAT?*" >bck-i-search: \*_ ############# incremental pattern search comptesteval 'fc -R historyX01' termtest $'\C-XRabc' 0q:Verify incremental pattern search first match >echo abc >bck-i-search: abc_ comptesteval 'fc -R historyX01' termtest $'\C-XRabcd\C-H' 0q:Verify incremental pattern search first match via backspace >echo abc >bck-i-search: abc_ comptesteval 'fc -R historyX01' termtest $'\n\C-XRabc\C-XR' 0q:Verify incremental pattern search second match >echo abc abcdef >bck-i-search: abc_ comptesteval 'fc -R historyX01' termtest $'\C-XRabc\C-XR\C-XR' 0q:Verify incremental pattern search third match >echo abc abcdef >bck-i-search: abc_ comptesteval 'fc -R historyX01' termtest $'\C-XRabc\C-XR\C-XR\C-XR' 0q:Verify incremental pattern search fourth match >echo 123 abc >bck-i-search: abc_ comptesteval 'fc -R historyX01' termtest $'\C-XRabc\C-XR\C-XR\C-XR\C-XR' 0q:Verify incremental pattern search failed fifth match >echo 123 abc >failing bck-i-search: abc_ comptesteval 'fc -R historyX01' termtest $'\C-XRabc\C-XR\C-XR\C-XRd' 0q:Verify incremental pattern search pass something >echo 123 abc >failing bck-i-search: abcd_ comptesteval 'fc -R historyX01' termtest $'\C-XRabc\C-XR\C-XR\C-XRd\C-H\C-H\C-Hd' 0q:Verify incremental pattern search pass, backup, and find again. >echo abc abcdef >bck-i-search: abcd_ comptesteval 'fc -R historyX01' termtest $'\C-XRabcd\C-XT' 0q:Verify incremental pattern search pass, then use search forward to find. >echo abc abcdef >fwd-i-search: abcd_ comptesteval 'fc -R historyX01' termtest $'\C-XR^date' 0q:Verify incremental pattern search bol pattern >date >bck-i-search: ^date_ comptesteval 'fc -R historyX01' termtest $'\C-XR\\' 0q:Verify incremental pattern search backslash >echo '\n' >bck-i-search: \_ comptesteval 'fc -R historyX01' termtest $'\C-XR\\*' 0q:Verify incremental pattern search backslash star >echo "*WHAT?*" >bck-i-search: \*_ %clean zmodload -ui zsh/zpty