Skip to content

Commit

Permalink
Fix test discovery pattern (no longer matching /^_test/)
Browse files Browse the repository at this point in the history
As @adakraz noted, is_test_key is delirerately not local, so it can
be modified. This is a better default, though.
  • Loading branch information
silentbicycle committed Jan 21, 2013
1 parent 3e98615 commit 9b59a32
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lunatest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ local failed_suites = {}
-- Defaults to functions starting or ending with "test", with
-- leading underscores allowed.
function is_test_key(k)
return type(k) == "string" and k:match("_*test.*")
return type(k) == "string" and (k:match("^test.*") or k:match("test$"))
end

local function get_tests(mod)
Expand Down

0 comments on commit 9b59a32

Please sign in to comment.