-
Notifications
You must be signed in to change notification settings - Fork 141
Fixing the LF issue #410
Comments
C# example from @Voileexperiments's comment using System;
using NUnit.Framework;
[TestFixture]
public class KataTestClass
{
[Test]
public void Test()
{
Console.Write("foobar");
Assert.AreEqual(true, false);
}
} Outputs
|
JS example:
Python example: #Python 2
import sys
test.expect(True)
sys.stdout.write('foo')
test.expect(False;
sys.stdout.write('bar')
test.expect(True)
#Python 3
test.expect(True)
print('foo', end='')
test.expect(False)
print('bar', end='')
test.expect(True) |
Throwing out some ideas: Is it possible for the runner to detect current stdout? If so, it can then just check if the last character is a line feed, and if not, send one to stdout first. Or alternatively, send a extra linefeed before the test messages no matter what. This will increases the character count by a bit and doubles the number of lines, but it might totally avert the issue? |
Extra line feed will be added (like in bb41dbb). |
@jhoffner can we move Codewars/mocha-reporter in this repository by updating Mocha? |
Sure let's do it. |
I found that JavaScript has been tested with |
Fixing the issue where users' output affects the test result.
Server Execution Error
, see the comment belowstdout
is transformed after the test and only contains the output commandsstderr
contains the details on failure (print!("foo"); assert_eq!(1, 2);
)codewars/codewars.com#867
codewars/codewars.com#937
The text was updated successfully, but these errors were encountered: