Skip to content

Commit

Permalink
remove System dependency from test
Browse files Browse the repository at this point in the history
  • Loading branch information
sigmaaa committed May 16, 2023
1 parent c38f786 commit c6926ef
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/com.espressif.idf.core.test/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Bundle-Vendor: Espressif Systems
Automatic-Module-Name: com.espressif.idf.core.test
Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle: com.espressif.idf.core;bundle-version="1.0.1",
org.junit.jupiter.api
junit-jupiter-api
Bundle-ClassPath: .,
lib/jmock-2.12.0.jar,
lib/commons-collections4-4.4.jar,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ class ExecutableFinderTest
private static final String FOUNDABLE_TEXT_FILE_STRING = "foundableTxt"; //$NON-NLS-1$
private static final String NON_FOUNDABLE_EXE_FILE_STRING = "non_foundableExe"; //$NON-NLS-1$
private static final String NON_FOUNDABLE_TEXT_FILE_STRING = "non_foundableTxt"; //$NON-NLS-1$
private static final String PATHEXT = "PATHEXT"; //$NON-NLS-1$

private static class TestableSystemExecutableFinderWindows extends SystemExecutableFinder
{
Expand Down Expand Up @@ -97,33 +96,37 @@ public String getPathEnv()
@Override
public String getEnvExecutables()
{
return System.getenv(PATHEXT);
return EXE_STRING;
}
};

emptyPathSystemWrapper = new SystemWrapper()
{

@Override
public String getPathEnv()
{
return null;
}

@Override
public String getEnvExecutables()
{
return System.getenv(PATHEXT);
return EXE_STRING;
}
};

emptyPathExtSystemWrapper = new SystemWrapper()
{

@Override
public String getPathEnv()
{

return foundableTempDir.toString();
}

@Override
public String getEnvExecutables()
{
return null;
Expand Down

0 comments on commit c6926ef

Please sign in to comment.