Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
tester
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
insert epic projlab name here
tester
Commits
9f4a6cc1
Verified
Commit
9f4a6cc1
authored
Apr 19, 2021
by
Tóth Miklós Tibor
Browse files
Options
Downloads
Patches
Plain Diff
stderr
parent
bb658a9f
No related branches found
No related tags found
No related merge requests found
Pipeline
#7543
passed
Apr 19, 2021
Stage: build
Changes
1
Pipelines
12
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/tester/Main.java
+16
-2
16 additions, 2 deletions
src/main/java/tester/Main.java
with
16 additions
and
2 deletions
src/main/java/tester/Main.java
+
16
−
2
View file @
9f4a6cc1
...
@@ -45,6 +45,7 @@ public class Main {
...
@@ -45,6 +45,7 @@ public class Main {
var
in
=
proc
.
getOutputStream
();
var
in
=
proc
.
getOutputStream
();
var
out
=
proc
.
getInputStream
();
var
out
=
proc
.
getInputStream
();
var
err
=
proc
.
getErrorStream
();
try
{
try
{
in
.
write
(
test
.
input
.
getBytes
(
StandardCharsets
.
UTF_8
));
in
.
write
(
test
.
input
.
getBytes
(
StandardCharsets
.
UTF_8
));
...
@@ -65,10 +66,15 @@ public class Main {
...
@@ -65,10 +66,15 @@ public class Main {
}
}
String
o
=
""
;
String
o
=
""
;
String
er
=
""
;
try
{
try
{
byte
[]
by
=
out
.
readAllBytes
();
byte
[]
by
=
out
.
readAllBytes
();
o
=
new
String
(
by
,
StandardCharsets
.
UTF_8
);
o
=
new
String
(
by
,
StandardCharsets
.
UTF_8
);
o
=
yeetEmpty
(
o
);
o
=
yeetEmpty
(
o
);
by
=
err
.
readAllBytes
();
er
=
new
String
(
by
,
StandardCharsets
.
UTF_8
);
er
=
yeetEmpty
(
er
);
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
System
.
out
.
print
(
"❌ "
);
System
.
out
.
print
(
"❌ "
);
System
.
out
.
println
(
"Nem sikerült kiolvasni a program outputját."
);
System
.
out
.
println
(
"Nem sikerült kiolvasni a program outputját."
);
...
@@ -92,8 +98,8 @@ public class Main {
...
@@ -92,8 +98,8 @@ public class Main {
System
.
out
.
println
();
System
.
out
.
println
();
try
{
try
{
String
got
=
fileToString
(
f
);
String
got
=
fileToString
(
f
);
boolean
er
=
compareStrings
(
got
,
e
);
boolean
er
ro
=
compareStrings
(
got
,
e
);
if
(
er
)
{
if
(
er
ro
)
{
error
.
set
(
true
);
error
.
set
(
true
);
}
else
{
}
else
{
System
.
out
.
print
(
"✔️ "
);
System
.
out
.
print
(
"✔️ "
);
...
@@ -110,6 +116,14 @@ public class Main {
...
@@ -110,6 +116,14 @@ public class Main {
System
.
out
.
println
(
"--------------"
);
System
.
out
.
println
(
"--------------"
);
if
(!
er
.
trim
().
isEmpty
())
{
error
.
set
(
true
);
System
.
out
.
println
(
"❌ Standard error kimenet:"
);
System
.
out
.
println
(
er
);
System
.
out
.
println
(
"--------------"
);
}
if
(
error
.
get
())
{
if
(
error
.
get
())
{
System
.
out
.
print
(
"\uD83D\uDD25 "
);
System
.
out
.
print
(
"\uD83D\uDD25 "
);
}
else
{
}
else
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment