Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output from F# printfn displays line breaks after every character #224

Open
CharliePoole opened this issue Aug 27, 2016 · 0 comments
Open

Comments

@CharliePoole
Copy link
Contributor

@lawrencecraft commented on Wed Mar 25 2015

Output from F#'s printfn is displayed with a newline after every character. See screenshots attached.

Sample code:

module tests
open NUnit.Framework

[<Test>]
let ``Output test``() = 
    System.Console.WriteLine("System.Console.WriteLine")
    printfn "printfn"

Results:

printfn_vs_plugin

This does not appear in the NUnit GUI:

printfn_nunit_gui

The same issue does not appear for printfn output from MsTest.


@lawrencecraft commented on Wed Mar 25 2015

I'm using Visual Studio 2012 on Windows 7.


@CharliePoole commented on Wed Mar 25 2015

I suspect this goes beyond F#. What happens if you replace the WriteLine by a series of Writes of one char followed by a final WriteLine()?


@lawrencecraft commented on Thu Mar 26 2015

Good point--the following code prints a string char-by-char and exhibits the same behavior.

[<Test>]
let ``Single char output test``() = 
    "testing" |> Seq.iter System.Console.Write

@lawrencecraft commented on Thu Mar 26 2015

https://github.com/nunit/nunit-vs-adapter/blob/master/src/NUnitTestAdapter/NUnitEventListener.cs#L126

That might be the issue--it appears to add \r after every output line it receives?


@CharliePoole commented on Thu Mar 26 2015

Yes, that's what I thought too. Should be an easy fix.
On Mar 26, 2015 3:29 AM, "Lawrence Craft" [email protected] wrote:

https://github.com/nunit/nunit-vs-adapter/blob/master/src/NUnitTestAdapter/NUnitEventListener.cs#L126

That might be the issue--it appears to add \r after every output line it
receives?


Reply to this email directly or view it on GitHub
nunit/nunit-vs-adapter#67 (comment)
.


@CharliePoole commented on Tue Dec 08 2015

@OsirisTerje I moved this from the 3.0-only milestone. Why didn't you think it should be fixed in 2.x?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant