chore(parser/diff): remove newline in pass/fail comment
This commit is contained in:
parent
b1d03573da
commit
e34cba9b17
|
@ -8,8 +8,8 @@ import "github.com/joint-online-judge/JOJ3/internal/stage"
|
|||
var name = "diff"
|
||||
|
||||
type Conf struct {
|
||||
PassComment string `default:"🥳Passed!\n"`
|
||||
FailComment string `default:"🧐Failed...\n"`
|
||||
PassComment string `default:"🥳Passed!"`
|
||||
FailComment string `default:"🧐Failed..."`
|
||||
FailOnNotAccepted bool `default:"true"`
|
||||
ForceQuitOnFailed bool `default:"false"`
|
||||
Cases []struct {
|
||||
|
|
|
@ -31,7 +31,7 @@ func (*Diff) Run(results []stage.ExecutorResult, confAny any) (
|
|||
if conf.ForceQuitOnFailed {
|
||||
forceQuit = true
|
||||
}
|
||||
comment += conf.FailComment
|
||||
comment += conf.FailComment + "\n"
|
||||
comment += "Executor status not `Accepted`\n"
|
||||
} else {
|
||||
for _, output := range caseConf.Outputs {
|
||||
|
@ -58,12 +58,12 @@ func (*Diff) Run(results []stage.ExecutorResult, confAny any) (
|
|||
// If no difference, assign score
|
||||
if isSame {
|
||||
score += output.Score
|
||||
comment += conf.PassComment
|
||||
comment += conf.PassComment + "\n"
|
||||
} else {
|
||||
if output.ForceQuitOnDiff || conf.ForceQuitOnFailed {
|
||||
forceQuit = true
|
||||
}
|
||||
comment += conf.FailComment
|
||||
comment += conf.FailComment + "\n"
|
||||
comment += fmt.Sprintf("Difference found in `%s`\n",
|
||||
output.FileName)
|
||||
if !output.AlwaysHide {
|
||||
|
|
Loading…
Reference in New Issue
Block a user