Skip to content

Commit

Permalink
Merge branch '__rultor'
Browse files Browse the repository at this point in the history
  • Loading branch information
rultor committed Sep 8, 2023
2 parents 1f4614e + 4b8af29 commit 835e861
Show file tree
Hide file tree
Showing 35 changed files with 1,450 additions and 653 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public void exec() throws IOException {
return 1;
},
new Filtered<>(
project -> BinarizeMojo.valid(project),
BinarizeMojo::valid,
targetDir.toPath().resolve("Lib").toFile().listFiles()
)
)
Expand All @@ -110,7 +110,7 @@ public void exec() throws IOException {
/**
* Is the project valid?
* @param project File to check.
* @return True if valid. Otherwise false.
* @return True if valid. Otherwise, false.
*/
private static boolean valid(final File project) {
return project.isDirectory()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ void crashesOnInvalidSyntax(@TempDir final Path temp) {
Assertions.assertThrows(
IllegalStateException.class,
() -> new FakeMaven(temp)
.withProgram("something < is wrong here")
.withProgram("something > is wrong here")
.with("failOnError", true)
.execute(ParseMojo.class)
).getCause().getCause().getMessage(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,11 +217,11 @@ void findsProbesWithVersionsInDifferentObjectionaries(@TempDir final Path temp)

private static String[] program() {
return new String[]{
"+package org.eolang.custom",
"",
"+package org.eolang.custom\n",
"[] > main",
" QQ.io.stdout > @",
" QQ.txt.sprintf \"I am %d years old\"",
" QQ.txt.sprintf",
" \"I am %d years old\"",
" plus.",
" 1337",
" 228",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,11 @@ void pullsSuccessfully(@TempDir final Path temp) throws IOException {
void pullsFromProbes(@TempDir final Path temp) throws IOException {
new FakeMaven(temp)
.withProgram(
"+package org.eolang.custom",
"",
"+package org.eolang.custom\n",
"[] > main",
" QQ.io.stdout > @",
" QQ.txt.sprintf \"I am %d years old\"",
" QQ.txt.sprintf",
" \"I am %d years old\"",
" plus.",
" 1337",
" 228"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ void logsStackTrace(final Logs out, @TempDir final Path temp) {
Assertions.assertThrows(
IllegalStateException.class,
() -> new FakeMaven(temp)
.withProgram("something < is definitely wrong here")
.withProgram("something > is definitely wrong here")
.with("failOnError", true)
.execute(ParseMojo.class)
);
MatcherAssert.assertThat(
String.join("\n", out.captured()),
Matchers.allOf(
Matchers.containsString("no viable alternative at input"),
Matchers.containsString("mismatched input ' ' expecting {'!', EOL, EOP}"),
Matchers.containsString("Failed to parse")
)
);
Expand Down
4 changes: 3 additions & 1 deletion eo-maven-plugin/src/test/resources/org/eolang/maven/mess.eo
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@

[n] > alpha
[] > x
a pi 666 > pp
a > pi
pi
666
two.f1.f2 x
stdout > z
sprintf > f!
Expand Down
9 changes: 9 additions & 0 deletions eo-parser/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,15 @@ SOFTWARE.
<id>qulice</id>
<build>
<plugins>
<plugin>
<groupId>com.qulice</groupId>
<artifactId>qulice-maven-plugin</artifactId>
<configuration>
<excludes>
<exclude>checkstyle:/src/main/java/org/eolang/parser/XeListener.java</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>com.github.volodya-lombrozo</groupId>
<artifactId>jtcop-maven-plugin</artifactId>
Expand Down
Loading

3 comments on commit 835e861

@0pdd
Copy link

@0pdd 0pdd commented on 835e861 Sep 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Puzzle 2399-7063962a discovered in eo-parser/src/test/java/org/eolang/parser/XMIRTest.java) and submitted as #2482. Please, remember that the puzzle was not necessarily added in this particular commit. Maybe it was added earlier, but we discovered it only now.

@0pdd
Copy link

@0pdd 0pdd commented on 835e861 Sep 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Puzzle 2399-9c819bd6 discovered in eo-parser/src/test/java/org/eolang/parser/XMIRTest.java) and submitted as #2483. Please, remember that the puzzle was not necessarily added in this particular commit. Maybe it was added earlier, but we discovered it only now.

@0pdd
Copy link

@0pdd 0pdd commented on 835e861 Sep 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Puzzle 2399-a6eaec39 discovered in eo-parser/src/test/java/org/eolang/parser/RedundantParenthesesTest.java) and submitted as #2484. Please, remember that the puzzle was not necessarily added in this particular commit. Maybe it was added earlier, but we discovered it only now.

Please sign in to comment.