fix exclusion tests

This commit is contained in:
Axel Kittenberger 2017-01-09 11:43:23 +01:00
parent 288f09ad01
commit 3f78514273
2 changed files with 13 additions and 7 deletions

View File

@ -1,5 +1,6 @@
????-??-??: 2.2.2
fix: checkgauge 'insist'
fix: no partial path exlusion tests
2017-01-05: 2.2.1
enhancement: now always using filter lists with rysnc

View File

@ -1852,13 +1852,13 @@ local Excludes = ( function( )
p = string.gsub( p, '%[%^/%]%*%[%^/%]%*', '.*' )
p = string.gsub( p, '^/', '^/' )
-- if p:sub( 1, 2 ) ~= '^/'
-- then
-- -- if does not begin with '^/'
-- -- then all matches should begin with '/'.
-- p = '/' .. p;
-- end
--
if p:sub( 1, 2 ) ~= '^/'
then
-- if does not begin with '^/'
-- then all matches should begin with '/'.
p = '/' .. p;
end
log(
'Exclude',
'toLuaPattern "',
@ -1971,6 +1971,11 @@ local Excludes = ( function( )
self, -- self
path -- the path to test
)
if path:byte( 1 ) ~= 47
then
error( 'Paths for exlusion tests must start with \'/\'' )
end
for _, p in pairs( self.list )
do
if p:byte( -1 ) == 36