Mercurial > vim
comparison src/testdir/test_substitute.vim @ 18017:988e5a868b60 v8.1.2004
patch 8.1.2004: more functions can be used as methods
Commit: https://github.com/vim/vim/commit/f6ed61e1489e40eada55a4f1782e1ed82bcad7d9
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Sep 7 19:05:09 2019 +0200
patch 8.1.2004: more functions can be used as methods
Problem: More functions can be used as methods.
Solution: Make various functions usable as a method.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 07 Sep 2019 19:15:04 +0200 |
parents | f084f846442a |
children | 54e5fa1f9cfc |
comparison
equal
deleted
inserted
replaced
18016:834b7854aa3c | 18017:988e5a868b60 |
---|---|
335 call assert_equal("[['A123456789'], ['9'], ['8'], ['7'], ['6'], " . | 335 call assert_equal("[['A123456789'], ['9'], ['8'], ['7'], ['6'], " . |
336 \ "['5'], ['4'], ['3'], ['2'], ['1']]", | 336 \ "['5'], ['4'], ['3'], ['2'], ['1']]", |
337 \ substitute('A123456789', | 337 \ substitute('A123456789', |
338 \ 'A\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)', | 338 \ 'A\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)', |
339 \ '\=string([submatch(0, 1), submatch(9, 1), ' . | 339 \ '\=string([submatch(0, 1), submatch(9, 1), ' . |
340 \ 'submatch(8, 1), submatch(7, 1), submatch(6, 1), ' . | 340 \ 'submatch(8, 1), 7->submatch(1), submatch(6, 1), ' . |
341 \ 'submatch(5, 1), submatch(4, 1), submatch(3, 1), ' . | 341 \ 'submatch(5, 1), submatch(4, 1), submatch(3, 1), ' . |
342 \ 'submatch(2, 1), submatch(1, 1)])', | 342 \ 'submatch(2, 1), submatch(1, 1)])', |
343 \ '')) | 343 \ '')) |
344 endfunc | 344 endfunc |
345 | 345 |