aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2025-02-23 17:06:54 +0800
committerzeertzjq <zeertzjq@outlook.com>2025-02-23 17:19:55 +0800
commit0861ea6949a0c7281c56083092d389cae5d7bde8 (patch)
treebfac3728c608de0279b9b0089a9637219c9e5fd8 /test
parent16e6f6e5841dd582620307e110b3da851e0e0a95 (diff)
downloadrneovim-0861ea6949a0c7281c56083092d389cae5d7bde8.tar.gz
rneovim-0861ea6949a0c7281c56083092d389cae5d7bde8.tar.bz2
rneovim-0861ea6949a0c7281c56083092d389cae5d7bde8.zip
vim-patch:9.1.1139: [fifo] is not displayed when editing a fifo
Problem: [fifo] is not displayed when editing a fifo (after v7.4.2189) Solution: stat the filename and detect the type correctly fixes: vim/vim#16702 closes: vim/vim#16705 https://github.com/vim/vim/commit/f1c3134ee1f263e537212a3072e8aa4cb7e8d953 Co-authored-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'test')
-rw-r--r--test/old/testdir/test_startup_utf8.vim28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/old/testdir/test_startup_utf8.vim b/test/old/testdir/test_startup_utf8.vim
index e8b99e7937..96b593f1bd 100644
--- a/test/old/testdir/test_startup_utf8.vim
+++ b/test/old/testdir/test_startup_utf8.vim
@@ -60,6 +60,34 @@ func Test_read_fifo_utf8()
call delete('Xtestout')
endfunc
+func Test_detect_fifo()
+ CheckUnix
+ " Using bash/zsh's process substitution.
+ if executable('bash')
+ set shell=bash
+ elseif executable('zsh')
+ set shell=zsh
+ else
+ throw 'Skipped: bash or zsh is required'
+ endif
+ let linesin = ['one', 'two']
+ call writefile(linesin, 'Xtestin_fifo', 'D')
+ let after = [
+ \ 'call writefile(split(execute(":mess"), "\\n"), "Xtestout")',
+ \ 'quit!',
+ \ ]
+ " if RunVim([], after, '<(cat Xtestin_fifo)')
+ if RunVim(['set shortmess-=F'], after, '<(cat Xtestin_fifo)')
+ let lines = readfile('Xtestout')
+ call assert_match('\[fifo\]', lines[0])
+ " call assert_match('\[fifo\]', lines[1])
+ else
+ call assert_equal('', 'RunVim failed.')
+ endif
+
+ call delete('Xtestout')
+endfunc
+
func Test_detect_ambiwidth()
CheckRunVimInTerminal