-
-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Labels
x:action/fixFix an issueFix an issuex:knowledge/elementaryLittle Exercism knowledge requiredLittle Exercism knowledge requiredx:module/test-runnerWork on Test RunnersWork on Test Runnersx:size/mediumMedium amount of workMedium amount of workx:type/codingWrite code that is not student-facing content (e.g. test-runners, generators, but not exercises)Write code that is not student-facing content (e.g. test-runners, generators, but not exercises)
Description
The commands print
, fmt.Print
, fmt.Printf
and maybe others currently destroy the output of go test --json
as they have no final newline.
We should report that to be fixed in go test
but for the time being we will replace these commands in students solutions with println
/ fmt.Println
.
My current suggestion would be to add some sed
commands to the test runner before executing the tests. This could also be done using the AST library to manipulate the AST if someone wants to dig into that.
Here the replace table I'd recommend to avoid having to remove/add imports:
print
->println
fmt.Print
->fmt.Println
fmt.Printf(...)
->fmt.Println(fmt.Sprintf(...))
Metadata
Metadata
Assignees
Labels
x:action/fixFix an issueFix an issuex:knowledge/elementaryLittle Exercism knowledge requiredLittle Exercism knowledge requiredx:module/test-runnerWork on Test RunnersWork on Test Runnersx:size/mediumMedium amount of workMedium amount of workx:type/codingWrite code that is not student-facing content (e.g. test-runners, generators, but not exercises)Write code that is not student-facing content (e.g. test-runners, generators, but not exercises)