Skip to content

Commit e185feb

Browse files
LarsEckartisidoressilverxollin
committed
- F support for linux intellij comunity edition
Co-Authored-By: Llewellyn Falco <[email protected]> Co-Authored-By: ssilverx <[email protected]> Co-Authored-By: ollin <[email protected]>
1 parent 6da991e commit e185feb

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

approvaltests-tests/src/test/java/org/approvaltests/reporters/IntelliJResolverTest.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,22 @@ void testFindItOnMac()
1212
{
1313
String userHome = "Users/lars";
1414
Queryable<String> validPaths = Queryable.as("/Applications/IntelliJ IDEA.app/Contents/MacOS/idea",
15-
"Users/lars/Applications/IntelliJ IDEA Ultimate.app/Contents/MacOS/idea",
16-
"Users/lars/Applications/IntelliJ IDEA Community.app/Contents/MacOS/idea",
17-
"Users/lars/Applications/IntelliJ IDEA Community Edition.app/Contents/MacOS/idea");
15+
"Users/lars/Applications/IntelliJ IDEA Ultimate.app/Contents/MacOS/idea",
16+
"Users/lars/Applications/IntelliJ IDEA Community.app/Contents/MacOS/idea",
17+
"Users/lars/Applications/IntelliJ IDEA Community Edition.app/Contents/MacOS/idea");
1818
for (String path : validPaths)
1919
{
2020
DiffInfo diffInfo = IntelliJToolboxResolver.getDiffInfoMac(userHome, f -> f.equals(path));
2121
assertNotEquals("", diffInfo.diffProgram, path);
2222
}
2323
}
24-
2524
@Test
2625
void testFindItOnLinux()
2726
{
2827
String userHome = "/home/lars";
2928
Queryable<String> validPaths = Queryable.as(
30-
"/home/lars/.local/share/JetBrains/Toolbox/apps/intellij-idea-ultimate/bin/idea.sh");
29+
"/home/lars/.local/share/JetBrains/Toolbox/apps/intellij-idea-ultimate/bin/idea.sh",
30+
"/home/lars/.local/share/JetBrains/Toolbox/apps/intellij-idea-community-edition/bin/idea.sh");
3131
for (String path : validPaths)
3232
{
3333
DiffInfo diffInfo = IntelliJToolboxResolver.getDiffInfoLinux(userHome, f -> f.equals(path));

approvaltests/src/main/java/org/approvaltests/reporters/DiffPrograms.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public static class All
6565
"diff %s %s", TEXT);
6666
public static DiffInfo INTELLIJ_U = new DiffInfo(new IntelliJPathResolver(Ultimate).findIt(),
6767
"diff %s %s", TEXT);
68-
public static DiffInfo INTELLIJ = IntelliJToolboxResolver.findIt();
68+
public static DiffInfo INTELLIJ = IntelliJToolboxResolver.findIt();
6969
}
7070
public static class Linux
7171
{

approvaltests/src/main/java/org/approvaltests/reporters/IntelliJToolboxResolver.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public static DiffInfo getDiffInfoMac(String userHome, Function1<String, Boolean
3434
}
3535
public static DiffInfo getDiffInfoLinux(String userHome, Function1<String, Boolean> fileExists)
3636
{
37-
Queryable<String> locations = as("intellij-idea-ultimate"); // TODO community
37+
Queryable<String> locations = as("intellij-idea-ultimate", "intellij-idea-community-edition");
3838
Queryable<String> applications = as(userHome + "/.local/share/JetBrains/Toolbox/apps");
3939
String postfix = "/bin/idea.sh";
4040
return getDiffInfo(fileExists, applications, locations, postfix);

approvaltests/src/main/java/org/approvaltests/reporters/intellij/IntelliJReporter.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ public class IntelliJReporter extends FirstWorkingReporter
99
public static final IntelliJReporter INSTANCE = new IntelliJReporter();
1010
public IntelliJReporter()
1111
{
12-
super(IntelliJMacReporter.INSTANCE, IntelliJMacSiliconReporter.INSTANCE, IntelliJUltimateReporter.INSTANCE,
12+
super(IntelliJToolboxReporter.INSTANCE, IntelliJMacSiliconReporter.INSTANCE, IntelliJUltimateReporter.INSTANCE,
1313
IntelliJCommunityReporter.INSTANCE);
1414
}
15-
private static class IntelliJMacReporter extends GenericDiffReporter
15+
private static class IntelliJToolboxReporter extends GenericDiffReporter
1616
{
17-
public static final IntelliJMacReporter INSTANCE = new IntelliJMacReporter();
18-
public IntelliJMacReporter()
17+
public static final IntelliJToolboxReporter INSTANCE = new IntelliJToolboxReporter();
18+
public IntelliJToolboxReporter()
1919
{
2020
super(DiffPrograms.All.INTELLIJ);
2121
}

0 commit comments

Comments
 (0)