mirror of
https://github.com/neovim/neovim.git
synced 2025-09-28 14:08:32 +00:00
vim-patch:8.0.0292 (#7592)
Problem: The stat test is a bit slow.
Solution: Remove a couple of sleep comments and reduce another.
a2f28859bf
This commit is contained in:

committed by
Justin M. Keyes

parent
7b686881a1
commit
bb7795e820
@@ -4,17 +4,17 @@ func Test_existent_file()
|
||||
let fname = 'Xtest.tmp'
|
||||
|
||||
let ts = localtime()
|
||||
sleep 1
|
||||
let fl = ['Hello World!']
|
||||
call writefile(fl, fname)
|
||||
let tf = getftime(fname)
|
||||
sleep 1
|
||||
let te = localtime()
|
||||
|
||||
call assert_true(ts <= tf && tf <= te)
|
||||
call assert_equal(strlen(fl[0] . "\n"), getfsize(fname))
|
||||
call assert_equal('file', getftype(fname))
|
||||
call assert_equal('rw-', getfperm(fname)[0:2])
|
||||
|
||||
call delete(fname)
|
||||
endfunc
|
||||
|
||||
func Test_existent_directory()
|
||||
@@ -32,12 +32,19 @@ func Test_checktime()
|
||||
call writefile(fl, fname)
|
||||
set autoread
|
||||
exec 'e' fname
|
||||
" FAT has a granularity of 2 seconds, otherwise it's usually 1 second
|
||||
if has('win32')
|
||||
sleep 2
|
||||
else
|
||||
sleep 2
|
||||
endif
|
||||
let fl = readfile(fname)
|
||||
let fl[0] .= ' - checktime'
|
||||
call writefile(fl, fname)
|
||||
checktime
|
||||
call assert_equal(fl[0], getline(1))
|
||||
|
||||
call delete(fname)
|
||||
endfunc
|
||||
|
||||
func Test_nonexistent_file()
|
||||
|
@@ -812,7 +812,7 @@ static const int included_patches[] = {
|
||||
// 295,
|
||||
294,
|
||||
// 293,
|
||||
// 292,
|
||||
292,
|
||||
291,
|
||||
290,
|
||||
// 289,
|
||||
|
Reference in New Issue
Block a user