Skip to content

Commit

Permalink
Fix test efficiency.
Browse files Browse the repository at this point in the history
A missing `fs_fixture` in the "Lua word classification" test led to
match generation enumerating the entire %TMP% directory, which slowed
down the test, and could also trigger allocation size assertions if the
%TMP% directory contained many files.
  • Loading branch information
chrisant996 committed Nov 7, 2022
1 parent 4969ed2 commit 74a8d21
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions clink/lua/test/classify.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ TEST_CASE("Lua word classification")
{
wchar_t* host = const_cast<wchar_t*>(os::get_shellname());

const char* empty_fs[] = { nullptr };
fs_fixture fs(empty_fs);

lua_state lua;
lua_match_generator lua_generator(lua); // This loads the required lua scripts.
lua_load_script(lua, app, cmd);
Expand Down

0 comments on commit 74a8d21

Please sign in to comment.