view src/testdir/test105.in @ 8094:18a3f0f05244 v7.4.1341

commit https://github.com/vim/vim/commit/910b8aac5dc4693c4508b7acd2cef0bbfac04242 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Feb 16 21:03:07 2016 +0100 patch 7.4.1341 Problem: It's difficult to add more arguments to ch_sendraw() and ch_sendexpr(). Solution: Make the third option a dictionary.
author Christian Brabandt <cb@256bit.org>
date Tue, 16 Feb 2016 21:15:05 +0100
parents 1e272e318daa
children 8af6e33e4d4c
line wrap: on
line source

Test filename modifiers     vim: set ft=vim :

STARTTEST
:source small.vim
:%delete _
:set shell=sh
:set shellslash
:let tab="\t"
:command -nargs=1 Put :let expr=<q-args> | $put =expr.tab.strtrans(string(eval(expr)))
:let $HOME=fnamemodify('.', ':p:h:h')
:Put fnamemodify('.',              ':p'      )[-1:]
:Put fnamemodify('.',              ':p:h'    )[-1:]
:Put fnamemodify('test.out',       ':p'      )[-1:]
:Put fnamemodify('test.out',       ':.'      )
:Put fnamemodify('../testdir/a',   ':.'      )
:Put fnamemodify('test.out',       ':~'      )
:Put fnamemodify('../testdir/a',   ':~'      )
:Put fnamemodify('../testdir/a',   ':t'      )
:Put fnamemodify('.',              ':p:t'    )
:Put fnamemodify('test.out',       ':p:t'    )
:Put fnamemodify('test.out',       ':p:e'    )
:Put fnamemodify('test.out',       ':p:t:e'  )
:Put fnamemodify('abc.fb2.tar.gz', ':r'      )
:Put fnamemodify('abc.fb2.tar.gz', ':r:r'    )
:Put fnamemodify('abc.fb2.tar.gz', ':r:r:r'  )
:Put substitute(fnamemodify('abc.fb2.tar.gz', ':p:r:r'), '.*\(testdir/.*\)', '\1', '')
:Put fnamemodify('abc.fb2.tar.gz', ':e'      )
:Put fnamemodify('abc.fb2.tar.gz', ':e:e'    )
:Put fnamemodify('abc.fb2.tar.gz', ':e:e:e'  )
:Put fnamemodify('abc.fb2.tar.gz', ':e:e:e:e')
:Put fnamemodify('abc.fb2.tar.gz', ':e:e:r'  )
:Put fnamemodify('abc def',        ':S'      )
:Put fnamemodify('abc" "def',      ':S'      )
:Put fnamemodify('abc"%"def',      ':S'      )
:Put fnamemodify('abc'' ''def',    ':S'      )
:Put fnamemodify('abc''%''def',    ':S'      )
:Put fnamemodify("abc\ndef",       ':S'      )
:set shell=tcsh
:Put fnamemodify("abc\ndef",       ':S'      )
:$put ='vim: ts=8'
:1 delete _
:w! test.out
:qa!
ENDTEST