Mercurial > vim
diff src/testdir/test_cindent.vim @ 12238:0066a7e178bc v8.0.0999
patch 8.0.0999: indenting raw C++ strings is wrong
commit https://github.com/vim/vim/commit/dde81312b031211752d1fcb8539d79f90f324a2e
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Aug 26 17:49:01 2017 +0200
patch 8.0.0999: indenting raw C++ strings is wrong
Problem: Indenting raw C++ strings is wrong.
Solution: Add special handling of raw strings. (Christian Brabandt)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 26 Aug 2017 18:00:04 +0200 |
parents | 242e0617aa51 |
children | 4dba3e4f3b01 |
line wrap: on
line diff
--- a/src/testdir/test_cindent.vim +++ b/src/testdir/test_cindent.vim @@ -68,9 +68,18 @@ func Test_cino_extern_c() call assert_equal(pair[2], getline(len(lines) + 1), 'Failed for "' . string(lines) . '"') endfor - - bwipe! endfunc +func! Test_cindent_rawstring() + new + setl cindent + call feedkeys("i" . + \ "int main() {\<CR>" . + \ "R\"(\<CR>" . + \ ")\";\<CR>" . + \ "statement;\<Esc>", "x") + call assert_equal("\tstatement;", getline(line('.'))) + bw! +endfunction " vim: shiftwidth=2 sts=2 expandtab