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

Tests failing on windows #559

Closed
kookookchoozeus opened this issue Apr 15, 2016 · 2 comments
Closed

Tests failing on windows #559

kookookchoozeus opened this issue Apr 15, 2016 · 2 comments

Comments

@kookookchoozeus
Copy link
Contributor

I'm getting the following failed tests on windows (windows 8.1, node 4.4.0, if it matters). At a glance, it looks like piping file descriptors and not using backslashes for paths seem to cause most of these problems.

Relevant npm test output (excuse the formatting, you know how cmd is...):

  1) Mustache CLI writes syntax hints into stderr when runned with wrong number of arguments:
     Uncaught AssertionError: expected -1 to not equal -1
      at C:\Users\kookookchoozeus\mustache.js\test\cli-test.js:18:14
      at ChildProcess.exithandler (child_process.js:220:5)
      at maybeClose (internal/child_process.js:827:16)
      at Socket.<anonymous> (internal/child_process.js:319:11)
      at Pipe._onclose (net.js:475:12)

  2) Mustache CLI writes hints about JSON parsing errors when given invalid JSON:
     Uncaught AssertionError: expected -1 to not equal -1
      at C:\Users\kookookchoozeus\mustache.js\test\cli-test.js:25:14
      at ChildProcess.exithandler (child_process.js:220:5)
      at maybeClose (internal/child_process.js:827:16)
      at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)

  3) Mustache CLI writes module version into stdout when runned with --version:
     Uncaught AssertionError: expected -1 to not equal -1
      at C:\Users\kookookchoozeus\mustache.js\test\cli-test.js:32:14
      at ChildProcess.exithandler (child_process.js:220:5)
      at maybeClose (internal/child_process.js:827:16)
      at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)

  4) Mustache CLI writes module version into stdout when runned with -v:
     Uncaught AssertionError: expected -1 to not equal -1
      at C:\Users\kookookchoozeus\mustache.js\test\cli-test.js:39:14
      at ChildProcess.exithandler (child_process.js:220:5)
      at maybeClose (internal/child_process.js:827:16)
      at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)

  5) Mustache CLI without partials writes rendered template into stdout when successfull:
     Uncaught AssertionError: expected [Error: Command failed: C:\Windows\system32\cmd.exe /s /c "bin/mustache test/_fil
es/cli.json test/_files/cli.mustache"
'bin' is not recognized as an internal or external command,
operable program or batch file.
] to equal null
      at C:\Users\kookookchoozeus\mustache.js\test\cli-test.js:56:16
      at ChildProcess.exithandler (child_process.js:220:5)
      at maybeClose (internal/child_process.js:827:16)
      at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)

  6) Mustache CLI without partials writes rendered template into the file specified by the third argument:
     Uncaught AssertionError: expected [Error: Command failed: C:\Windows\system32\cmd.exe /s /c "bin/mustache test/_fil
es/cli.json test/_files/cli.mustache test/_files/cli_output.txt"
'bin' is not recognized as an internal or external command,
operable program or batch file.
] to equal null
      at C:\Users\kookookchoozeus\mustache.js\test\cli-test.js:66:16
      at ChildProcess.exithandler (child_process.js:220:5)
      at maybeClose (internal/child_process.js:827:16)
      at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)

  7) Mustache CLI without partials reads view data from stdin when first argument equals "-":
     Uncaught AssertionError: expected [Error: Command failed: C:\Windows\system32\cmd.exe /s /c "cat test/_files/cli.js
on | bin/mustache - test/_files/cli.mustache"
'cat' is not recognized as an internal or external command,
operable program or batch file.
] to equal null
      at C:\Users\kookookchoozeus\mustache.js\test\cli-test.js:77:16
      at ChildProcess.exithandler (child_process.js:220:5)
      at maybeClose (internal/child_process.js:827:16)
      at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)

  8) Mustache CLI without partials writes it couldnt find template into stderr when second argument doesnt resolve to a
file:
     Uncaught AssertionError: expected -1 to not equal -1
      at C:\Users\kookookchoozeus\mustache.js\test\cli-test.js:86:16
      at ChildProcess.exithandler (child_process.js:220:5)
      at maybeClose (internal/child_process.js:827:16)
      at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)

  9) Mustache CLI without partials writes it couldnt find view into stderr when first argument doesnt resolve to a file:

     Uncaught AssertionError: expected -1 to not equal -1
      at C:\Users\kookookchoozeus\mustache.js\test\cli-test.js:93:16
      at ChildProcess.exithandler (child_process.js:220:5)
      at maybeClose (internal/child_process.js:827:16)
      at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)

  10) Mustache CLI with partials writes rendered template with partials into stdout:
     Uncaught AssertionError: expected [Error: Command failed: C:\Windows\system32\cmd.exe /s /c "bin/mustache test/_fil
es/cli_with_partials.json test/_files/cli_with_partials.mustache -p test/_files/cli.mustache -p test/_files/comments.mus
tache"
'bin' is not recognized as an internal or external command,
operable program or batch file.
] to equal null
      at C:\Users\kookookchoozeus\mustache.js\test\cli-test.js:112:16
      at ChildProcess.exithandler (child_process.js:220:5)
      at maybeClose (internal/child_process.js:827:16)
      at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)

  11) Mustache CLI with partials writes rendered template with partials when partials args before required args:
     Uncaught AssertionError: expected [Error: Command failed: C:\Windows\system32\cmd.exe /s /c "bin/mustache -p test/_
files/cli.mustache -p test/_files/comments.mustache test/_files/cli_with_partials.json test/_files/cli_with_partials.mus
tache"
'bin' is not recognized as an internal or external command,
operable program or batch file.
] to equal null
      at C:\Users\kookookchoozeus\mustache.js\test\cli-test.js:121:16
      at ChildProcess.exithandler (child_process.js:220:5)
      at maybeClose (internal/child_process.js:827:16)
      at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)

@dasilvacontin
Copy link
Collaborator

Thanks for the report!

@kookookchoozeus
Copy link
Contributor Author

Just a heads up, I'm working on this now, should be done in a few hours

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

No branches or pull requests

2 participants