requireTool
fn
void requireTool(string toolName, string message = null)Skip a test if an external tool is not available.
This function checks if the specified tool exists in PATH and throws an exception to skip the test if it's not available. This is useful for tests that depend on external tools.
Parameters
toolName | The name of the tool to check. |
message | Optional message explaining why the tool is needed. |
Throws
SkipException if the tool is not available.
Examples
unittest
{
requireTool("readelf", "This test requires readelf to verify ELF headers");
// Test code here...
}