VirtusLab / using_directives

12 stars 8 forks source link

Math symbols & special utf characters not supported on windows #40

Open szymon-rd opened 2 years ago

szymon-rd commented 2 years ago

Github action for windows fails on characters Ą and . Reproduction in tests:

  @Test
  public void testUnicodeIdentifier() {
    String input = "using keyĄ 42";
    UsingDirectives parsedDirective = testCode(1, input);
    assertValueAtPath(parsedDirective, "keyĄ", "42");
  }

Reporter output:

    0:0:
    ERROR: illegal character '\u201e'
    0:0:
    ERROR: Expected new line after the using directive, in the line; but found erroneous token
    illegal character '\u201e'
    Expected new line after the using directive, in the line; but found erroneous token
   @Test
  public void testMathSymbolIdentifier() {
    String input = "using >/∑ 42";
    System.out.println(input);
    UsingDirectives parsedDirective = testCode(1, input);
    assertValueAtPath(parsedDirective, ">/∑", "42");
  }

Reporter output:

    0:0:
    ERROR: Expected primitive value: string, numeric or boolean but found identifier: �. Wrapping identifier in quotes usually solves the problem.
    0:0:
    ERROR: Expected new line after the using directive, in the line; but found identifier: �