exercism / vimscript

Exercism exercises in Vim script.
https://exercism.org/tracks/vimscript
MIT License
20 stars 24 forks source link

Use double quotes so that newlines are handled properly. #252

Closed blakelewis closed 7 months ago

blakelewis commented 7 months ago

The tests for transpose were using single quotes around \n, with the result that the two-character sequence backslash+n was being used instead of newlines to join lines together. Solutions had to accept input in this unusual format and return the result in the same style. This change switches to double quotes, so that newlines are used as expected. Also clean up a garbled comment in the stub code.

This was discussed in the forum: https://forum.exercism.org/t/wrong-line-joins-in-transpose/9005

github-actions[bot] commented 7 months ago

Hello. Thanks for opening a PR on Exercism 🙂

We ask that all changes to Exercism are discussed on our Community Forum before being opened on GitHub. To enforce this, we automatically close all PRs that are submitted. That doesn't mean your PR is rejected but that we want the initial discussion about it to happen on our forum where a wide range of key contributors across the Exercism ecosystem can weigh in.

You can use this link to copy this into a new topic on the forum. If we decide the PR is appropriate, we'll reopen it and continue with it, so please don't delete your local branch.

If you're interested in learning more about this auto-responder, please read this blog post.


Note: If this PR has been pre-approved, please link back to this PR on the forum thread and a maintainer or staff member will reopen it.

BNAndras commented 7 months ago

CI is failing.

blakelewis commented 7 months ago

I forgot to change example.vim to use newlines. I will fix that in a minute.

blakelewis commented 7 months ago

Now I see that example.vim pads all the lines to equal length instead of what the instructions say, namely to pad only on the left-hand side of long lines. How did it ever pass? I have a fix for that and now all of the tests pass.