The tcl tests on exercise two-fer are failed but the answers are correct

Good day for all.

I’m new in exercism and I resolved the tcl exercise two-fer correctly but the site show errors.

Hi, welcome to exercism and thanks for posting.

Can you provide more details please? What are the errors? Please show your code.

Thanks Glenn, the test show FAILED for the three test. I put your solution (really simple) and the tests are FAILED too.

They show the output for my answers exactly than of the test.

Use the > “arrows” to expand the failed tests and show what they say.

Please copy and paste the exact code you entered.

For the second test show:

==== two-fer-2 a name given FAILED
==== Contents of test case:

two-fer "Alice"

---- Result was:

---- Result should have been (exact matching):
One for Alice, one for me.
==== two-fer-2 FAILED

Your Output

One for Alice, one for me.

I see equal both strings :(

proc two-fer {args} {
if {$args eq “”} {
puts “One for you, one for me.”
} else {
puts “One for $args, one for me.”
two-fer “Alice”
two-fer “Bob”

The test results are showing that the actual result is an empty string, but the proc was expected to return “One for Alice, one for me.”

puts is the wrong command to return a value from a proc.

Very important difference. I proof my code on tkcon and there show the string well. But knowing this I will use it.

It’s a tiny confusing because say: “your output” and show the puts output.

Thanks Gleen

I see where the confusion can happen

  • “Your Output” is meant to display any debug output (i.e. output from puts)
  • but the tests are comparing the returned value to the expected value.

I’ll think about how to explain this better in the instructions.

@ljsr From the web editor you cannot submit faulty solutions, but from the CLI you can, after which you can request mentoring.

Hi Matth, And, How I do that?

Use the CLI as advertised, and request mentoring as usual.

Or what exactly do you mean?

Thanks Matth, I’m working on line but I will want mentoring because some details on certain exercises. Albeit, I’m thinking about download the local exercism. I already have tkcon and tcl from debian linux on my machine.

I’m seeing that I have to send the answer for obtain the mentoring… but I can’t to send the exercise until to pass the tests. The mentoring is for the problems :( about the exercises, isn’t it?.

As you’ve seen, if you’re using the web editor you need to have a working solution before you can ask for mentoring. Mentoring is primarily to talk to someone about how to write better code. Exercism is about developing fluency in a new language, so you need to figure out, with the help of a mentor, how to write idiomatically in the new language you’re learning.

If you’re having problems solving the exercise, you come here to ask questions (as you did!)

Oh, I apologize if my expression sounded bad. I’m gratefully for this site for learning and fee free, It’s a lot resource. I only want to know how it works and if I can to help with my observations I do it.

My English isn’t fluent, consequently I can to express my ideas inexactly. Sorry.