Fixing filesystem paths in Envjs.uri
This pull requests fixes 2 issues and adds a test for both:
-
If you put in an absolute windows path in any browser, like this: C:\foo\bar\index.html, it will convert it to file:///C:/foo/bar/index.html.
-
If you have document=null and you try to open a relative path, like this: specs/env/spec.html, Envjs tries to convert this to a file: URL. However, this wasn't working quite right in Windows beacuse getcwd() returns the wrong slash, and file:/// should have 3 slashes, not 2.
- Brian
I have tested this patch locally on my Windows dev box and it worked great. This patch is critical if you are planning on running Jasmine and Jasmine-Species in a headless setup (outside the browser). Without it you will not be able to run.