Tester failing because of missing newline char

I am running into a problem where the output is correct but it is missing a \n according to the tester. This shouldn’t be cause for a failure. I am doing the GO shell project.

Code:

func HandleCommand(command string, args []string) {
  cmd := exec.Command(command, args...)

  output, err := cmd.CombinedOutput()

  if err != nil {
    utils.PrintUnknown(command)
    return
  }

  outputStr := string(output)

  fmt.Print(outputStr)
}

Output:

[tester::#IP1] Running ./your_program.sh
[your-program] $
[tester::#IP1] > my_exe Emily
[your-program] Hello emily! The secret code is 3597454869.
[your-program] $
[tester::#IP1] Expected first line of output to match "Hello Emily! The secret code is 3597454869.\n", got "Hello emily! The secret code is 3597454869."

Should the tester be this pedantic?

Hmm, even from the output it does look like the tester received a newline though. We’ll look into this!

1 Like

Hey @liams000! We were able to track this down to a case mismatch - the expectation is “Emily”, and the returned string is “emily”.

The extra \n is just a mistake on our end when constructing the error message, will have this fixed shortly!

Will keep this open until we land the fix that removes the additional \n.