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

Writing backspace to Console crashes the mspec.resharper.runner #267

Open
mooondogg opened this issue Mar 6, 2015 · 4 comments
Open

Writing backspace to Console crashes the mspec.resharper.runner #267

mooondogg opened this issue Mar 6, 2015 · 4 comments

Comments

@mooondogg
Copy link

mooondogg commented Mar 6, 2015

I have a program writing a backspace character to console and that causes the testrunner to crash with the message: "System.ArgumentException: hexadecimal value 0x08, is an invalid character."

Here is an example routine witch fails:

using System;
using Machine.Specifications;

namespace Test
{
[Subject("Console")]
public class when_writing_an_backspace_character_to_console
{
Establish context = () => { };
Because of = () => Console.Write("\b");
It should_not_give_an_exeption = () => { };
}
}

I use version 1.0.0 of Machine.Specifications.Runner.Resharper and Resharper 8.2.3.

backspacetoconsole

@danielmarbach
Copy link
Contributor

I probably need to XmlEncode a bunch of things because I use Xml to marshal between appdomains

@mooondogg
Copy link
Author

Or you could possibly clean invalid Xml characters by:

static string CleanInvalidXmlChars(string text)
{
const string re = @"[^\x09\x0A\x0D\x20-\xD7FF\xE000-\xFFFD\x10000-x10FFFF]";

        var match = Regex.Match(text, re);
        return match.Success ? Regex.Replace(text, re, "") : text;
    }

@mausch
Copy link

mausch commented Jul 15, 2015

Wonder if this is related to https://github.com/machine/machine.specifications.runner.resharper/issues/12

(BTW should I report R#-runner bugs here?)

@danielmarbach
Copy link
Contributor

The problem is the XmlSerialization over AppDomains

Am 15.07.2015 um 17:04 schrieb Mauricio Scheffer [email protected]:

Wonder if this is related to machine/machine.specifications.runner.resharper#12

(BTW should I report R#-runner bugs here?)


Reply to this email directly or view it on GitHub.

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

5 participants