Mercurial > vim
annotate src/testdir/test105.ok @ 8708:31f9fa8e1532 v7.4.1643
commit https://github.com/vim/vim/commit/d4caf5c16a9f1c9477d426e58d8d3dc47ab5f066
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Mar 24 19:14:35 2016 +0100
patch 7.4.1643
Problem: Terminating file name has side effects.
Solution: Restore the character. (mostly by James McCoy, closes https://github.com/vim/vim/issues/713)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 24 Mar 2016 19:15:09 +0100 |
parents | 8af6e33e4d4c |
children |
rev | line source |
---|---|
5690 | 1 fnamemodify('.', ':p' )[-1:] '/' |
2 fnamemodify('.', ':p:h' )[-1:] 'r' | |
3 fnamemodify('test.out', ':p' )[-1:] 't' | |
4 fnamemodify('test.out', ':.' ) 'test.out' | |
5 fnamemodify('../testdir/a', ':.' ) 'a' | |
5751 | 6 fnamemodify('test.out', ':~' ) '~/testdir/test.out' |
7 fnamemodify('../testdir/a', ':~' ) '~/testdir/a' | |
5690 | 8 fnamemodify('../testdir/a', ':t' ) 'a' |
9 fnamemodify('.', ':p:t' ) '' | |
10 fnamemodify('test.out', ':p:t' ) 'test.out' | |
11 fnamemodify('test.out', ':p:e' ) 'out' | |
12 fnamemodify('test.out', ':p:t:e' ) 'out' | |
13 fnamemodify('abc.fb2.tar.gz', ':r' ) 'abc.fb2.tar' | |
14 fnamemodify('abc.fb2.tar.gz', ':r:r' ) 'abc.fb2' | |
15 fnamemodify('abc.fb2.tar.gz', ':r:r:r' ) 'abc' | |
5751 | 16 substitute(fnamemodify('abc.fb2.tar.gz', ':p:r:r'), '.*\(testdir/.*\)', '\1', '') 'testdir/abc.fb2' |
5690 | 17 fnamemodify('abc.fb2.tar.gz', ':e' ) 'gz' |
18 fnamemodify('abc.fb2.tar.gz', ':e:e' ) 'tar.gz' | |
19 fnamemodify('abc.fb2.tar.gz', ':e:e:e' ) 'fb2.tar.gz' | |
20 fnamemodify('abc.fb2.tar.gz', ':e:e:e:e') 'fb2.tar.gz' | |
21 fnamemodify('abc.fb2.tar.gz', ':e:e:r' ) 'tar' | |
22 fnamemodify('abc def', ':S' ) '''abc def''' | |
23 fnamemodify('abc" "def', ':S' ) '''abc" "def''' | |
24 fnamemodify('abc"%"def', ':S' ) '''abc"%"def''' | |
25 fnamemodify('abc'' ''def', ':S' ) '''abc''\'''' ''\''''def''' | |
26 fnamemodify('abc''%''def', ':S' ) '''abc''\''''%''\''''def''' | |
27 fnamemodify("abc\ndef", ':S' ) '''abc^@def''' | |
8704
8af6e33e4d4c
commit https://github.com/vim/vim/commit/5ca84ce4aa2832041f843e624c222bbc1f4d3e14
Christian Brabandt <cb@256bit.org>
parents:
5751
diff
changeset
|
28 expand('%:r:S') == shellescape(expand('%:r')) 1 |
8708
31f9fa8e1532
commit https://github.com/vim/vim/commit/d4caf5c16a9f1c9477d426e58d8d3dc47ab5f066
Christian Brabandt <cb@256bit.org>
parents:
8704
diff
changeset
|
29 join([expand('%:r'), expand('%:r:S'), expand('%')], ',') 'test105,''test105'',test105.in' |
5690 | 30 fnamemodify("abc\ndef", ':S' ) '''abc\^@def''' |
31 vim: ts=8 |