mirror of
https://github.com/octoleo/lsyncd.git
synced 2024-12-11 13:52:26 +00:00
fix cron test
This commit is contained in:
parent
96a6276440
commit
f4c15496dc
2
.gitignore
vendored
2
.gitignore
vendored
@ -10,7 +10,7 @@ lsyncd
|
||||
AdditionalInfo.txt
|
||||
config.h
|
||||
Makefile
|
||||
build/
|
||||
build*/
|
||||
CMakeCache.txt
|
||||
CMakeFiles/
|
||||
cmake_install.cmake
|
||||
|
@ -64,31 +64,6 @@ local function writefiles
|
||||
writefile( srcdir .. 'xcx/x', 'xcxx' )
|
||||
end
|
||||
|
||||
--
|
||||
-- Tests if the filename exists
|
||||
-- fails if this is different to expect.
|
||||
--
|
||||
local function testfile
|
||||
(
|
||||
filename,
|
||||
expect
|
||||
)
|
||||
local stat, err = posix.stat( filename )
|
||||
|
||||
if stat and not expect
|
||||
then
|
||||
cwriteln( 'failure: ', filename, ' should be filtered')
|
||||
|
||||
os.exit( 1 )
|
||||
end
|
||||
|
||||
if not stat and expect
|
||||
then
|
||||
cwriteln( 'failure: ', filename, ' should not be filtered' )
|
||||
os.exit( 1 )
|
||||
end
|
||||
end
|
||||
|
||||
-- test all files
|
||||
local function testfiles
|
||||
( )
|
||||
@ -148,7 +123,7 @@ writefiles( )
|
||||
|
||||
cwriteln( 'waiting for Lsyncd to transmit changes' )
|
||||
|
||||
posix.sleep( 5 )
|
||||
posix.sleep( 20 )
|
||||
|
||||
testfiles( )
|
||||
|
||||
|
@ -674,3 +674,27 @@ function isTableEqual(o1, o2, ignore_mt)
|
||||
return true
|
||||
end
|
||||
|
||||
--
|
||||
-- Tests if the filename exists
|
||||
-- fails if this is different to expect.
|
||||
--
|
||||
function testfile
|
||||
(
|
||||
filename,
|
||||
expect
|
||||
)
|
||||
local stat, err = posix.stat( filename )
|
||||
|
||||
if stat and not expect
|
||||
then
|
||||
cwriteln( 'failure: ', filename, ' should be filtered')
|
||||
|
||||
os.exit( 1 )
|
||||
end
|
||||
|
||||
if not stat and expect
|
||||
then
|
||||
cwriteln( 'failure: ', filename, ' should not be filtered' )
|
||||
os.exit( 1 )
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue
Block a user