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

Fix test errors in windows caused by encoding #782

Merged
merged 3 commits into from Jan 17, 2019

Conversation

jneira
Copy link
Collaborator

@jneira jneira commented Jan 16, 2019

  • Before the patch tests (both tasty and dictest) were failing with
doctest.exe: makeBools: commitBuffer: invalid argument (invalid character)
Dhall Tests
      normalization
        Tutorial examples
          normalize tasty.exe: <stdout>: commitBuffer: invalid argument (invalid character)
Command exited with code 1
  • After set the character encoding to utf-8 doctest continue having with three fails. Setting console to utf-8 with chcp 65001 only left one error:
D:\dev\lang\eta\dhall\dhall-haskell\dhall\src/Dhall/Tutorial.hs:475: failure in expression `input auto "./baz: Double" :: IO Double'
expected: "*** Exception: "
          "\8627 ./baz: "
          "..."
          "...Error...: Missing file .../baz:"
          "..."
 but got: "*** Exception: "
          "\8627 ./baz:"
          ""
          "\ESC[1;31mError\ESC[0m: Missing file C:\\Users\\Javier\\AppData\\Local\\Temp\\mockery-2bbeef04706c5acb\\baz:"
          ""

Examples: 94  Tried: 93  Errors: 0  Failures: 1

@Gabriella439
Copy link
Collaborator

@jneira: You can fix the last remaining error by removing the forward slash before the baz in the expected output on this line:

-- ...Error...: Missing file .../baz:

@jneira
Copy link
Collaborator Author

jneira commented Jan 16, 2019

Thanks for pointing it out!

@jneira
Copy link
Collaborator Author

jneira commented Jan 16, 2019

Btw the errors i am getting when dos console has the default encoding (chcp 850 for me) are:

D:\dev\lang\eta\dhall\dhall-haskell\dhall\src/Dhall/Tutorial.hs:667: failure in expression `makeBools <- input auto "./makeBools" :: IO (Bool -> Vector Bool)'
expected:
 but got: "*** Exception: "
          "? ./makeBools"
          ""
          "\ESC[1;31mError\ESC[0m: Invalid input"
          ""
          "C:\\Users\\Javier\\AppData\\Local\\Temp\\mockery-47d8e85ad0e3105a\\makeBools:1:1:"
          "  |"
          "1 | \955(n : Bool) \8594 [ n && True, n && False, n || True, n || False ]"
          "  | ^^^^^^^^"
          "unexpected \"\955(n : B\""
          "expecting expression or whitespace"
          ""

D:\dev\lang\eta\dhall\dhall-haskell\dhall\src/Dhall/Tutorial.hs:805: failure in expression `input auto "./makeBools True" :: IO (Vector Bool)'
expected: "[True,False,True,True]"
 but got: "*** Exception: "
          "? ./makeBools"
          ""
          "\ESC[1;31mError\ESC[0m: Invalid input"
          ""
          "C:\\Users\\Javier\\AppData\\Local\\Temp\\mockery-47d8e85ad0e3105a\\makeBools:1:1:"
          "  |"
          "1 | \955(n : Bool) \8594 [ n && True, n && False, n || True, n || False ]"
          "  | ^^^^^^^^"
          "unexpected \"\955(n : B\""
          "expecting expression or whitespace"
          ""

Examples: 94  Tried: 84  Errors: 0  Failures: 3

When setting the console encoding to utf-8 with chcp 65001 error are gone.

@Gabriella439 Gabriella439 merged commit 3f004ff into dhall-lang:master Jan 17, 2019
@Gabriella439
Copy link
Collaborator

Thank you for fixing that! 🙂

@jneira jneira deleted the win-tests branch January 17, 2019 06:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants