Skip to content

Strings are not escaped #7

@MadbHatter

Description

@MadbHatter

Currently, using Method("Local Area Network") will result in ... method argument=Local Area Network.
Doing so will result in an error because how the parsing of the cmd works.

In your test code, you manually escaped your input strings via "\"", which seems a bit counter-intuitive.

A little check if the string contains a space and is not escaped would go a long way.
Is there a particular reason why strings that contain spaces are not automatically escaped?

Also this command (WLAN/SetActionTests.cs => VerifyProfileParameterOutput) would not execute correctly (interface sl is not escaped) and from what I get all your test commands are supposed to work (with correct parameters and names).

Assert.AreEqual(harness.Value, "netsh wlan set profileparameter name=profile_name interface=interface sl SSIDname=ssid1 autoSwitch=no ConnectionMode=auto");

PS: Sorry for my poor English and double sorry If I misused the issues function somehow (I'm somewhat new to github).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions