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 #67

Open
lawrencecraft opened this issue Mar 25, 2015 · 6 comments
Open

Comments

@lawrencecraft
Copy link

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
Copy link
Author

I'm using Visual Studio 2012 on Windows 7.

@CharliePoole
Copy link
Contributor

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
Copy link
Author

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
Copy link
Author

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
Copy link
Contributor

Yes, that's what I thought too. Should be an easy fix.
On Mar 26, 2015 3:29 AM, "Lawrence Craft" notifications@github.com 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
#67 (comment)
.

@OsirisTerje OsirisTerje added this to the V3.0 milestone Jul 23, 2015
@CharliePoole CharliePoole modified the milestones: V3.0, 3.0-Only Dec 1, 2015
@CharliePoole CharliePoole modified the milestones: 2.0-And-3.0, 3.0-Only Dec 1, 2015
@CharliePoole
Copy link
Contributor

@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

3 participants