Skip to content

Commit

Permalink
Merge pull request #3358 from maxonfjvipon/fix/#3356/remove-printing-…
Browse files Browse the repository at this point in the history
…in-rust

fix(#3356): removed printing in rust + updated deps
  • Loading branch information
yegor256 authored Sep 2, 2024
2 parents 6a42ebf + 9367648 commit 807fe0b
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 13 deletions.
4 changes: 2 additions & 2 deletions eo-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ SOFTWARE.
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
<version>3.9.8</version>
<version>3.9.9</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -207,7 +207,7 @@ SOFTWARE.
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.15.0</version>
<version>3.17.0</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
Expand Down
48 changes: 43 additions & 5 deletions eo-runtime/src/test/eo/org/eolang/rust-tests.eo
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,17 @@
applied.content
"qwerty"

# This is the default 64+ symbols comment in front of named abstract object.
# Test.
# The bytes represent the next rust code:
# ```
# use eo::Portal;
# use eo::eo_enum::EO;
# use eo::eo_enum::EO::{EONumber};
#
# pub fn foo(_portal: &mut Portal) -> Option<EO> {
# Some(EONumber(2.0))
# }
# ```.
[] > rust-with-string-fqn
Q
.org
Expand All @@ -415,7 +425,7 @@
.org
.eolang
.bytes:0
75-73-65-20-65-6F-3A-3A-50-6F-72-74-61-6C-3B-0A-75-73-65-20-65-6F-3A-3A-65-6F-5F-65-6E-75-6D-3A-3A-45-4F-3B-0A-75-73-65-20-65-6F-3A-3A-65-6F-5F-65-6E-75-6D-3A-3A-45-4F-3A-3A-7B-45-4F-4E-75-6D-62-65-72-7D-3B-0A-0A-70-75-62-20-66-6E-20-66-6F-6F-28-5F-70-6F-72-74-61-6C-3A-20-26-6D-75-74-20-50-6F-72-74-61-6C-29-20-2D-3E-20-4F-70-74-69-6F-6E-3C-45-4F-3E-20-7B-0A-20-20-70-72-69-6E-74-6C-6E-21-28-22-48-65-6C-6C-6F-20-77-6F-72-6C-64-20-66-72-6F-6D-20-72-75-73-74-22-29-3B-0A-20-20-53-6F-6D-65-28-45-4F-4E-75-6D-62-65-72-28-32-2E-30-29-29-0A-7D
75-73-65-20-65-6F-3A-3A-50-6F-72-74-61-6C-3B-0A-75-73-65-20-65-6F-3A-3A-65-6F-5F-65-6E-75-6D-3A-3A-45-4F-3B-0A-75-73-65-20-65-6F-3A-3A-65-6F-5F-65-6E-75-6D-3A-3A-45-4F-3A-3A-7B-45-4F-4E-75-6D-62-65-72-7D-3B-0A-0A-70-75-62-20-66-6E-20-66-6F-6F-28-5F-70-6F-72-74-61-6C-3A-20-26-6D-75-74-20-50-6F-72-74-61-6C-29-20-2D-3E-20-4F-70-74-69-6F-6E-3C-45-4F-3E-20-7B-0A-20-20-53-6F-6D-65-28-45-4F-4E-75-6D-62-65-72-28-32-2E-30-29-29-0A-7D
[]:1
Q
.org
Expand All @@ -435,7 +445,17 @@
.bytes:0
40-00-00-00-00-00-00-00

# This is the default 64+ symbols comment in front of named abstract object.
# Test.
# The bytes represent the next rust code:
# ```
# use eo::Portal;
# use eo::eo_enum::EO;
# use eo::eo_enum::EO::{EONumber};
#
# pub fn foo(_portal: &mut Portal) -> Option<EO> {
# Some(EONumber(2.0))
# }
# ```.
[] > rust-reversed-notation
rust. > r
eolang.
Expand All @@ -449,7 +469,7 @@
eolang.
org.
Q
75-73-65-20-65-6F-3A-3A-50-6F-72-74-61-6C-3B-0A-75-73-65-20-65-6F-3A-3A-65-6F-5F-65-6E-75-6D-3A-3A-45-4F-3B-0A-75-73-65-20-65-6F-3A-3A-65-6F-5F-65-6E-75-6D-3A-3A-45-4F-3A-3A-7B-45-4F-4E-75-6D-62-65-72-7D-3B-0A-0A-70-75-62-20-66-6E-20-66-6F-6F-28-5F-70-6F-72-74-61-6C-3A-20-26-6D-75-74-20-50-6F-72-74-61-6C-29-20-2D-3E-20-4F-70-74-69-6F-6E-3C-45-4F-3E-20-7B-0A-20-20-70-72-69-6E-74-6C-6E-21-28-22-48-65-6C-6C-6F-20-77-6F-72-6C-64-20-66-72-6F-6D-20-72-75-73-74-22-29-3B-0A-20-20-53-6F-6D-65-28-45-4F-4E-75-6D-62-65-72-28-32-2E-30-29-29-0A-7D
75-73-65-20-65-6F-3A-3A-50-6F-72-74-61-6C-3B-0A-75-73-65-20-65-6F-3A-3A-65-6F-5F-65-6E-75-6D-3A-3A-45-4F-3B-0A-75-73-65-20-65-6F-3A-3A-65-6F-5F-65-6E-75-6D-3A-3A-45-4F-3A-3A-7B-45-4F-4E-75-6D-62-65-72-7D-3B-0A-0A-70-75-62-20-66-6E-20-66-6F-6F-28-5F-70-6F-72-74-61-6C-3A-20-26-6D-75-74-20-50-6F-72-74-61-6C-29-20-2D-3E-20-4F-70-74-69-6F-6E-3C-45-4F-3E-20-7B-0A-20-20-53-6F-6D-65-28-45-4F-4E-75-6D-62-65-72-28-32-2E-30-29-29-0A-7D
[]:1
empty.:2
tuple.
Expand All @@ -470,6 +490,24 @@
40-00-00-00-00-00-00-00

# Test.
# The bytes represent the next rust code:
# ```
# use eo::Portal;
# use eo::eo_enum::EO;
# use eo::eo_enum::EO::{EONumber};
# use byteorder::{BigEndian, ReadBytesExt};
#
# pub fn foo(portal: &mut Portal) -> Option<EO> {
# let a = portal.find("$.^.a")?;
# let bytes_a = portal.dataize(a)?;
# let a = bytes_a.as_slice().read_f64::<BigEndian>().ok()?;
#
# let b = portal.find("$.^.b")?;
# let bytes_b = portal.dataize(b)?;
# let b = bytes_b.as_slice().read_f64::<BigEndian>().ok()?;
# Some(EONumber(a + b))
# }
# ```.
[] > rust-unwrapped-plus
number. > a
eolang.
Expand Down Expand Up @@ -501,7 +539,7 @@
eolang.
org.
Q
75-73-65-20-65-6F-3A-3A-50-6F-72-74-61-6C-3B-0A-75-73-65-20-65-6F-3A-3A-65-6F-5F-65-6E-75-6D-3A-3A-45-4F-3B-0A-75-73-65-20-65-6F-3A-3A-65-6F-5F-65-6E-75-6D-3A-3A-45-4F-3A-3A-7B-45-4F-4E-75-6D-62-65-72-7D-3B-0A-75-73-65-20-62-79-74-65-6F-72-64-65-72-3A-3A-7B-42-69-67-45-6E-64-69-61-6E-2C-20-52-65-61-64-42-79-74-65-73-45-78-74-7D-3B-0A-0A-70-75-62-20-66-6E-20-66-6F-6F-28-70-6F-72-74-61-6C-3A-20-26-6D-75-74-20-50-6F-72-74-61-6C-29-20-2D-3E-20-4F-70-74-69-6F-6E-3C-45-4F-3E-20-7B-0A-20-20-6C-65-74-20-61-20-3D-20-70-6F-72-74-61-6C-2E-66-69-6E-64-28-22-24-2E-5E-2E-61-22-29-3F-3B-0A-20-20-6C-65-74-20-62-79-74-65-73-5F-61-20-3D-20-70-6F-72-74-61-6C-2E-64-61-74-61-69-7A-65-28-61-29-3F-3B-0A-20-20-6C-65-74-20-61-20-3D-20-62-79-74-65-73-5F-61-2E-61-73-5F-73-6C-69-63-65-28-29-2E-72-65-61-64-5F-66-36-34-3A-3A-3C-42-69-67-45-6E-64-69-61-6E-3E-28-29-2E-6F-6B-28-29-3F-3B-0A-0A-20-20-6C-65-74-20-62-20-3D-20-70-6F-72-74-61-6C-2E-66-69-6E-64-28-22-24-2E-5E-2E-62-22-29-3F-3B-0A-20-20-6C-65-74-20-62-79-74-65-73-5F-62-20-3D-20-70-6F-72-74-61-6C-2E-64-61-74-61-69-7A-65-28-62-29-3F-3B-0A-20-20-6C-65-74-20-62-20-3D-20-62-79-74-65-73-5F-62-2E-61-73-5F-73-6C-69-63-65-28-29-2E-72-65-61-64-5F-66-36-34-3A-3A-3C-42-69-67-45-6E-64-69-61-6E-3E-28-29-2E-6F-6B-28-29-3F-3B-0A-20-20-70-72-69-6E-74-6C-6E-21-28-22-73-75-6D-20-35-20-2B-20-31-30-20-3D-20-7B-7D-22-2C-20-61-20-2B-20-62-29-3B-0A-20-20-53-6F-6D-65-28-45-4F-4E-75-6D-62-65-72-28-61-20-2B-20-62-29-29-0A-7D
75-73-65-20-65-6F-3A-3A-50-6F-72-74-61-6C-3B-0A-75-73-65-20-65-6F-3A-3A-65-6F-5F-65-6E-75-6D-3A-3A-45-4F-3B-0A-75-73-65-20-65-6F-3A-3A-65-6F-5F-65-6E-75-6D-3A-3A-45-4F-3A-3A-7B-45-4F-4E-75-6D-62-65-72-7D-3B-0A-75-73-65-20-62-79-74-65-6F-72-64-65-72-3A-3A-7B-42-69-67-45-6E-64-69-61-6E-2C-20-52-65-61-64-42-79-74-65-73-45-78-74-7D-3B-0A-0A-70-75-62-20-66-6E-20-66-6F-6F-28-70-6F-72-74-61-6C-3A-20-26-6D-75-74-20-50-6F-72-74-61-6C-29-20-2D-3E-20-4F-70-74-69-6F-6E-3C-45-4F-3E-20-7B-0A-20-20-6C-65-74-20-61-20-3D-20-70-6F-72-74-61-6C-2E-66-69-6E-64-28-22-24-2E-5E-2E-61-22-29-3F-3B-0A-20-20-6C-65-74-20-62-79-74-65-73-5F-61-20-3D-20-70-6F-72-74-61-6C-2E-64-61-74-61-69-7A-65-28-61-29-3F-3B-0A-20-20-6C-65-74-20-61-20-3D-20-62-79-74-65-73-5F-61-2E-61-73-5F-73-6C-69-63-65-28-29-2E-72-65-61-64-5F-66-36-34-3A-3A-3C-42-69-67-45-6E-64-69-61-6E-3E-28-29-2E-6F-6B-28-29-3F-3B-0A-0A-20-20-6C-65-74-20-62-20-3D-20-70-6F-72-74-61-6C-2E-66-69-6E-64-28-22-24-2E-5E-2E-62-22-29-3F-3B-0A-20-20-6C-65-74-20-62-79-74-65-73-5F-62-20-3D-20-70-6F-72-74-61-6C-2E-64-61-74-61-69-7A-65-28-62-29-3F-3B-0A-20-20-6C-65-74-20-62-20-3D-20-62-79-74-65-73-5F-62-2E-61-73-5F-73-6C-69-63-65-28-29-2E-72-65-61-64-5F-66-36-34-3A-3A-3C-42-69-67-45-6E-64-69-61-6E-3E-28-29-2E-6F-6B-28-29-3F-3B-0A-20-20-53-6F-6D-65-28-45-4F-4E-75-6D-62-65-72-28-61-20-2B-20-62-29-29-0A-7D
auto-named-attr-at-327-6.:1
$
tuple.:2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ void dataizesConsoleWriteAsTrue() {

@Test
void writesToConsole(@TempDir final Path temp) throws IOException {
final String msg = "writes to posix console";
final String msg = "writes to console";
final File file = InputOutputTest.redirectedStdout(
temp,
() -> new Dataized(
Expand All @@ -308,7 +308,7 @@ void writesToConsole(@TempDir final Path temp) throws IOException {
).take()
);
MatcherAssert.assertThat(
"The 'console.write' should have written to posix console, but it didn't",
"The 'console.write' should have written to console, but it didn't",
new String(
Files.readAllBytes(Paths.get(file.getAbsolutePath())), StandardCharsets.UTF_8
),
Expand Down Expand Up @@ -346,7 +346,7 @@ void writesToConsoleSequentially(@TempDir final Path temp) throws IOException {

@Test
void readsFromConsole(@TempDir final Path temp) throws IOException {
final String content = "read from posix console";
final String content = "read from console";
final byte[] result = InputOutputTest.redirectedStdin(
temp,
content,
Expand All @@ -368,7 +368,7 @@ void readsFromConsole(@TempDir final Path temp) throws IOException {
@Test
void readsSequentiallyFromInputBlockViaConsole(@TempDir final Path temp)
throws IOException {
final String content = "read sequentially from posix console";
final String content = "read sequentially from console";
final byte[] result = InputOutputTest.redirectedStdin(
temp,
content,
Expand All @@ -392,7 +392,7 @@ void readsSequentiallyFromInputBlockViaConsole(@TempDir final Path temp)
MatcherAssert.assertThat(
"The `console.read` object should have return input block ready to `read` again, but it didn't",
new String(result, StandardCharsets.UTF_8),
Matchers.equalTo("from posix console")
Matchers.equalTo("from console")
);
}
}
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ SOFTWARE.
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>2.2</version>
<version>2.3</version>
</dependency>
<dependency>
<groupId>com.jcabi</groupId>
Expand Down

0 comments on commit 807fe0b

Please sign in to comment.