Mercurial > vim
comparison src/testdir/test_cmdline.vim @ 29617:ee5acbac6abe v9.0.0149
patch 9.0.0149: test for fuzzy completion fails sometimes
Commit: https://github.com/vim/vim/commit/5ac4b1a24e3ba52698a0d24b22cdd2e1c7895417
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Aug 6 10:28:19 2022 +0100
patch 9.0.0149: test for fuzzy completion fails sometimes
Problem: Test for fuzzy completion fails sometimes.
Solution: Use a more specific file name to minimize the chance of matching a
random directory name. (closes #10854)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 06 Aug 2022 11:30:06 +0200 |
parents | 82b0aeaeaa3c |
children | cc0f638f5f6b |
comparison
equal
deleted
inserted
replaced
29616:ff849d59173b | 29617:ee5acbac6abe |
---|---|
2421 endfunc | 2421 endfunc |
2422 | 2422 |
2423 " buffer name fuzzy completion | 2423 " buffer name fuzzy completion |
2424 func Test_fuzzy_completion_bufname() | 2424 func Test_fuzzy_completion_bufname() |
2425 set wildoptions& | 2425 set wildoptions& |
2426 edit SomeFile.txt | 2426 " Use a long name to reduce the risk of matching a random directory name |
2427 edit SomeRandomFileWithLetters.txt | |
2427 enew | 2428 enew |
2428 call feedkeys(":b SF\<Tab>\<C-B>\"\<CR>", 'tx') | 2429 call feedkeys(":b SRFWL\<Tab>\<C-B>\"\<CR>", 'tx') |
2429 call assert_equal('"b SF', @:) | 2430 call assert_equal('"b SRFWL', @:) |
2430 call feedkeys(":b S*File.txt\<Tab>\<C-B>\"\<CR>", 'tx') | 2431 call feedkeys(":b S*FileWithLetters.txt\<Tab>\<C-B>\"\<CR>", 'tx') |
2431 call assert_equal('"b SomeFile.txt', @:) | 2432 call assert_equal('"b SomeRandomFileWithLetters.txt', @:) |
2432 set wildoptions=fuzzy | 2433 set wildoptions=fuzzy |
2433 call feedkeys(":b SF\<Tab>\<C-B>\"\<CR>", 'tx') | 2434 call feedkeys(":b SRFWL\<Tab>\<C-B>\"\<CR>", 'tx') |
2434 call assert_equal('"b SomeFile.txt', @:) | 2435 call assert_equal('"b SomeRandomFileWithLetters.txt', @:) |
2435 call feedkeys(":b S*File.txt\<Tab>\<C-B>\"\<CR>", 'tx') | 2436 call feedkeys(":b S*FileWithLetters.txt\<Tab>\<C-B>\"\<CR>", 'tx') |
2436 call assert_equal('"b S*File.txt', @:) | 2437 call assert_equal('"b S*FileWithLetters.txt', @:) |
2437 %bw! | 2438 %bw! |
2438 set wildoptions& | 2439 set wildoptions& |
2439 endfunc | 2440 endfunc |
2440 | 2441 |
2441 " buffer name (full path) fuzzy completion | 2442 " buffer name (full path) fuzzy completion |