Skip to content

Commit

Permalink
Merge pull request #594 from LiamLeFey/allow-explicit-hidden-dir
Browse files Browse the repository at this point in the history
Allow ROOT to contain hidden directories.
  • Loading branch information
ajacksified committed Jun 28, 2019
2 parents dc99249 + 72cad53 commit 779ecc4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
4 changes: 2 additions & 2 deletions busted/modules/test_file_loader.lua
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ return function(busted, loaders)

fileList = tablex.filter(fileList, function(filename)
if path.is_windows then
return not filename:find('%\\%.%w+.%w+')
return not filename:find('%\\%.%w+.%w+', #rootFile)
else
return not filename:find('/%.%w+.%w+')
return not filename:find('/%.%w+.%w+', #rootFile)
end
end)
else
Expand Down
9 changes: 9 additions & 0 deletions spec/cl_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -785,3 +785,12 @@ describe('Tests execute option', function()
assert.is_equal('hello world', result:match('(.-)\n'))
end)
end)

describe('Tests root specification', function()
it('allows hidden directories in root path', function()
local success, errcnt, result = executeBusted('spec/.hidden')
assert.is_false(success)
assert.is_equal(1, errcnt)
assert.is_truthy(result:find('should not be executed'))
end)
end)

0 comments on commit 779ecc4

Please sign in to comment.