Removed pointer to external editor resource in IsolTestOptions, changed TestTool::handleResponse() to get editor value from m_options member variable

This commit is contained in:
hawkess
2021-09-21 14:12:26 -05:00
parent 5edabc014d
commit 4fd5093d94
3 changed files with 6 additions and 11 deletions
+2 -5
View File
@@ -121,8 +121,6 @@ public:
fs::path const& _basepath,
fs::path const& _path
);
static string editor;
private:
enum class Request
{
@@ -145,7 +143,6 @@ private:
static bool m_exitRequested;
};
string TestTool::editor;
bool TestTool::m_exitRequested = false;
TestTool::Result TestTool::process()
@@ -258,7 +255,7 @@ TestTool::Request TestTool::handleResponse(bool _exception)
}
case 'e':
cout << endl << endl;
if (system((TestTool::editor + " \"" + m_path.string() + "\"").c_str()))
if (system((m_options.editor + " \"" + m_path.string() + "\"").c_str()))
cerr << "Error running editor command." << endl << endl;
return Request::Rerun;
case 'q':
@@ -425,7 +422,7 @@ int main(int argc, char const *argv[])
setupTerminal();
{
auto options = std::make_unique<solidity::test::IsolTestOptions>(&TestTool::editor);
auto options = std::make_unique<solidity::test::IsolTestOptions>();
if (!options->parse(argc, argv))
return -1;