Mercurial > vim
comparison src/testdir/test_vim9_cmd.vim @ 22750:f945413264d7 v8.2.1923
patch 8.2.1923: Vim9: "filter" command modifier doesn't work
Commit: https://github.com/vim/vim/commit/4f6b6ed208a15552f0eb7f27b7ca945f59f22c1d
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Oct 29 20:24:34 2020 +0100
patch 8.2.1923: Vim9: "filter" command modifier doesn't work
Problem: Vim9: "filter" command modifier doesn't work.
Solution: Check for space on char before argument. (closes https://github.com/vim/vim/issues/7216,
closes #7222)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 29 Oct 2020 20:30:04 +0100 |
parents | dda110a14be4 |
children | 82a7aff951d2 |
comparison
equal
deleted
inserted
replaced
22749:9ba58f7e5ae2 | 22750:f945413264d7 |
---|---|
308 | 308 |
309 def Test_filter_is_not_modifier() | 309 def Test_filter_is_not_modifier() |
310 var tags = [{'a': 1, 'b': 2}, {'x': 3, 'y': 4}] | 310 var tags = [{'a': 1, 'b': 2}, {'x': 3, 'y': 4}] |
311 filter(tags, { _, v -> has_key(v, 'x') ? 1 : 0 }) | 311 filter(tags, { _, v -> has_key(v, 'x') ? 1 : 0 }) |
312 assert_equal([#{x: 3, y: 4}], tags) | 312 assert_equal([#{x: 3, y: 4}], tags) |
313 enddef | |
314 | |
315 def Test_filter_is_recognized() | |
316 var lines =<< trim END | |
317 final expected = "\nType Name Content\n c \"c piyo" | |
318 @a = 'hoge' | |
319 @b = 'fuga' | |
320 @c = 'piyo' | |
321 | |
322 assert_equal(execute('filter /piyo/ registers abc'), expected) | |
323 END | |
324 CheckDefAndScriptSuccess(lines) | |
313 enddef | 325 enddef |
314 | 326 |
315 def Test_eval_command() | 327 def Test_eval_command() |
316 var from = 3 | 328 var from = 3 |
317 var to = 5 | 329 var to = 5 |