aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-09-30 22:38:09 +0800
committerGitHub <noreply@github.com>2023-09-30 22:38:09 +0800
commit386bc23e4378f3c161efc924de49a21b2b2c305f (patch)
treecea40ee1e822576a21ed3ef7d00ef474186f5720 /test
parenta4132e1d62c5ef542a05b5ca2c6704f6d992c818 (diff)
parent5c60fbe9db0005d10d87ba60a981fd41f85f8df5 (diff)
downloadrneovim-386bc23e4378f3c161efc924de49a21b2b2c305f.tar.gz
rneovim-386bc23e4378f3c161efc924de49a21b2b2c305f.tar.bz2
rneovim-386bc23e4378f3c161efc924de49a21b2b2c305f.zip
Merge pull request #25442 from zeertzjq/vim-9.0.1962
vim-patch:9.0.{1962,1963}: extended attributes
Diffstat (limited to 'test')
-rw-r--r--test/old/testdir/test_writefile.vim24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/old/testdir/test_writefile.vim b/test/old/testdir/test_writefile.vim
index 312d45e18f..df993feb62 100644
--- a/test/old/testdir/test_writefile.vim
+++ b/test/old/testdir/test_writefile.vim
@@ -990,4 +990,28 @@ func Test_wq_quitpre_autocommand()
call delete('Xsomefile')
endfunc
+func Test_write_with_xattr_support()
+ CheckLinux
+ CheckFeature xattr
+ CheckExecutable setfattr
+
+ let contents = ["file with xattrs", "line two"]
+ call writefile(contents, 'Xwattr.txt', 'D')
+ " write a couple of xattr
+ call system('setfattr -n user.cookie -v chocolate Xwattr.txt')
+ call system('setfattr -n user.frieda -v bar Xwattr.txt')
+ call system('setfattr -n user.empty Xwattr.txt')
+
+ set backupcopy=no writebackup& backup&
+ sp Xwattr.txt
+ w
+ $r! getfattr -d %
+ let expected = ['file with xattrs', 'line two', '# file: Xwattr.txt', 'user.cookie="chocolate"', 'user.empty=""', 'user.frieda="bar"', '']
+ call assert_equal(expected, getline(1,'$'))
+
+ set backupcopy&
+ bw!
+
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab