daltonserey / tst

Students assignments testing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Lost leading and trailing newlines

daltonserey opened this issue · comments

Checking out an activity corrupts the contents of tests. This happens for io tests, when the input and/or output have leading or trailing newlines. To reproduce the bug: 1) create a new activity; 2) add a test with leading/trailing multiple newlines; 3) commit the activiy; and 4) check it out. The tests are changed.

These is an example of the input of a test before commiting the activity:

input: |+
    line with extra newline

ouput: |+

According to yaml semantics, the value of input is: "line with extra newline\n\n". However, this is the yaml contents after a commit and checkout:

input: |

ouput: |+

And, thus, its new value is: "line with extra newline\n"


This issue was created from #4

That's right!