diff --git a/tests/commands/test_check.py b/tests/commands/test_check.py index c631a613..17f8ed27 100644 --- a/tests/commands/test_check.py +++ b/tests/commands/test_check.py @@ -521,3 +521,16 @@ int main() {} verbose_errors, _, _ = count_defects(result.output) assert verbose_errors == errors == 1 + + +def test_check_handles_spaces_in_paths(clirunner, validate_cliresult, tmpdir_factory): + tmpdir = tmpdir_factory.mktemp("project dir") + config = DEFAULT_CONFIG + "\ncheck_tool = cppcheck, clangtidy, pvs-studio" + tmpdir.join("platformio.ini").write(config) + tmpdir.mkdir("src").join("main.cpp").write( + PVS_STUDIO_FREE_LICENSE_HEADER + TEST_CODE + ) + + default_result = clirunner.invoke(cmd_check, ["--project-dir", str(tmpdir)]) + + validate_cliresult(default_result)