mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user