Skip to content

GeneratorTest breaks on files with white space in name #379

Description

@Ana03-cmd

I have a language that generates files with whitespaces in the file name. However, when I write an Xpect test for this, the line

XPECT generated file MyFile 1.foo ---

creates an error because only MyFile is parsed as the parameter and 1.foo is left over. As a result, my correctly working code generator produces a test failure.

I believe, the fix would be to replace the following line: https://github.com/eclipse/Xpect/blob/a273310d56919e6ad19a00c8e880d5ad255eb1d5/org.eclipse.xpect.xtext.lib/src/org/eclipse/xpect/xtext/lib/tests/GeneratorTest.java#L54

with

@ParameterParser(syntax = "('file' arg2=STRING)?")

because then I could use a quoted string to provide my file name with white spaces in.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions