diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-03-04 15:28:53 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-03-04 15:28:53 +0100 |
commit | 3f3897e41f77a7bcd44ffd37acd4d524c0169ed4 (patch) | |
tree | d09dd1ab61a0741d348874ed6ba0adffe4f58fc9 /src/testdir/test_fold.vim | |
parent | 7f73b54631af3f0e6f0acd1a1b4c9e8436784705 (diff) |
patch 8.0.0407: filtering folds with marker method not testedv8.0.0407
Problem: Filtering folds with marker method not tested.
Solution: Also set 'foldmethod' to "marker".
Diffstat (limited to 'src/testdir/test_fold.vim')
-rw-r--r-- | src/testdir/test_fold.vim | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/src/testdir/test_fold.vim b/src/testdir/test_fold.vim index 1f835b876f..cdf9fd3142 100644 --- a/src/testdir/test_fold.vim +++ b/src/testdir/test_fold.vim @@ -100,15 +100,20 @@ func Test_manual_fold_with_filter() if !executable('cat') return endif - new - call setline(1, range(1, 20)) - 4,$fold - %foldopen - 10,$fold - %foldopen - " This filter command should not have an effect - 1,8! cat - call feedkeys('5ggzdzMGdd', 'xt') - call assert_equal(['1', '2', '3', '4', '5', '6', '7', '8', '9'], getline(1, '$')) - bwipe! + for type in ['manual', 'marker'] + exe 'set foldmethod=' . type + new + call setline(1, range(1, 20)) + 4,$fold + %foldopen + 10,$fold + %foldopen + " This filter command should not have an effect + 1,8! cat + call feedkeys('5ggzdzMGdd', 'xt') + call assert_equal(['1', '2', '3', '4', '5', '6', '7', '8', '9'], getline(1, '$')) + + bwipe! + set foldmethod& + endfor endfunc |