technomancy/leiningen — pull request #1179 by AtKaaZ (2013-05-13 06:24:21+00:00)
Title: fix some path errors in windows tests

lein test still has 2 failures and 1 error after this. (on Windows! didn't test on *nix, travis can do that)
normalize-path should now handle absolute *nix paths correctly under windows
addresses #1176

I'm not very happy about how I've done this so far, so any suggestions are welcome.

`bin\lein test` output after this is applied is:

```java

s:\workspace.eclipse.2k13_2\leiningen>bin\lein test

lein test leiningen.bluuugh

lein test leiningen.core.test.classpath

lein test leiningen.core.test.eval

lein test leiningen.core.test.helper

lein test leiningen.core.test.main

lein test leiningen.core.test.project

lein test leiningen.core.test.user

lein test leiningen.one-or-two

lein test leiningen.test.compile
Compiling nom.nom.nom
Compiling nom.nom.nom
Compiling nom.nom.nom
Compiling nom.nom.nom
Exception in thread "main" java.lang.Exception: Unable to resolve symbol: failure-expected-here-dont
-freak-out in this context (nom.clj:1)
at clojure.lang.Compiler.analyze(Compiler.java:4420)
at clojure.lang.Compiler.analyze(Compiler.java:4366)
at clojure.lang.Compiler.compile1(Compiler.java:5037)
at clojure.lang.Compiler.compile(Compiler.java:5095)
at clojure.lang.RT.compile(RT.java:358)
at clojure.lang.RT.load(RT.java:397)
at clojure.lang.RT.load(RT.java:371)
at clojure.core$load__6449$fn__6458.invoke(core.clj:4171)
at clojure.core$load__6449.doInvoke(core.clj:4170)
at clojure.lang.RestFn.invoke(RestFn.java:413)
at clojure.core$load_one__6379.invoke(core.clj:4007)
at clojure.core$compile__6464$fn__6466.invoke(core.clj:4181)
at clojure.core$compile__6464.invoke(core.clj:4180)
at user$eval__8.invoke(NO_SOURCE_FILE:1)
at clojure.lang.Compiler.eval(Compiler.java:4642)
at clojure.lang.Compiler.eval(Compiler.java:4634)
at clojure.core$eval__5236.invoke(core.clj:2017)
at clojure.main$eval_opt__7411.invoke(main.clj:227)
at clojure.main$initialize__7418.invoke(main.clj:246)
at clojure.main$null_opt__7446.invoke(main.clj:271)
at clojure.main$main__7466.doInvoke(main.clj:346)
at clojure.lang.RestFn.invoke(RestFn.java:426)
at clojure.lang.Var.invoke(Var.java:363)
at clojure.lang.AFn.applyToHelper(AFn.java:175)
at clojure.lang.Var.applyTo(Var.java:476)
at clojure.main.main(main.java:37)
Caused by: java.lang.Exception: Unable to resolve symbol: failure-expected-here-dont-freak-out in th
is context
at clojure.lang.Compiler.resolveIn(Compiler.java:4797)
at clojure.lang.Compiler.resolve(Compiler.java:4743)
at clojure.lang.Compiler.analyzeSymbol(Compiler.java:4720)
at clojure.lang.Compiler.analyze(Compiler.java:4387)
... 25 more
Compilation failed: Subprocess failed
#'inject.stuff/beef
Compiling nom.nom.nom

lein test leiningen.test.deploy
Wrote s:\workspace.eclipse.2k13_2\leiningen\test_projects\sample\pom.xml
Created s:\workspace.eclipse.2k13_2\leiningen\test_projects\sample\target\nomnomnom-0.5.0-SNAPSHOT.j
ar
Could not find metadata nomnomnom:nomnomnom:0.5.0-SNAPSHOT/maven-metadata.xml in snapshots (file://C
:\Users\user\AppData\Local\Temp\/lein-repo)
Sending nomnomnom/nomnomnom/0.5.0-SNAPSHOT/nomnomnom-0.5.0-20130513.052002-1.jar (14k)Sending nomnom
nom/nomnomnom/0.5.0-SNAPSHOT/nomnomnom-0.5.0-20130513.052002-1.pom
(3k)
toto file://C:\Users\user\AppData\Local\Temp\/lein-repo/file://C:\Users\user\AppData\Local\
Temp\/lein-repo/

Could not find metadata nomnomnom:nomnomnom/maven-metadata.xml in snapshots (file://C:\Users\user\Ap
pData\Local\Temp\/lein-repo)
Sending nomnomnom/nomnomnom/0.5.0-SNAPSHOT/maven-metadata.xmlSending (1k)nomnomnom/nomnomnom/maven-
metadata.xml (1k)

to file://C:\Users\user\AppData\Local\Temp\/lein-repo/
to file://C:\Users\user\AppData\Local\Temp\/lein-repo/
Wrote s:\workspace.eclipse.2k13_2\leiningen\test_projects\sample\pom.xml
Created s:\workspace.eclipse.2k13_2\leiningen\test_projects\sample\target\nomnomnom-0.5.0-SNAPSHOT.j
ar
Could not find metadata nomnomnom:nomnomnom:0.5.0-SNAPSHOT/maven-metadata.xml in snapshots (file://C
:\Users\user\AppData\Local\Temp\/deploy-only-repo)
Sending nomnomnom/nomnomnom/0.5.0-SNAPSHOT/nomnomnom-0.5.0-20130513.052005-1.pom (3k)
Sending to nomnomnom/nomnomnom/0.5.0-SNAPSHOT/nomnomnom-0.5.0-20130513.052005-1.jarfile://C:\Use
rs\user\AppData\Local\Temp\/deploy-only-repo/
(14k)
to file://C:\Users\user\AppData\Local\Temp\/deploy-only-repo/
Could not find metadata nomnomnom:nomnomnom/maven-metadata.xml in snapshots (file://C:\Users\user\Ap
pData\Local\Temp\/deploy-only-repo)
Sending nomnomnom/nomnomnom/maven-metadata.xml (1k)
Sendingto file://C:\Users\user\AppData\Local\Temp\/deploy-only-repo/
nomnomnom/nomnomnom/0.5.0-SNAPSHOT/maven-metadata.xml (1k)
to file://C:\Users\user\AppData\Local\Temp\/deploy-only-repo/
Wrote s:\workspace.eclipse.2k13_2\leiningen\test_projects\sample\pom.xml
Created s:\workspace.eclipse.2k13_2\leiningen\test_projects\sample\target\nomnomnom-0.5.0-SNAPSHOT.j
ar
Could not find metadata nomnomnom:nomnomnom:0.5.0-SNAPSHOT/maven-metadata.xml in file://C:\Users\use
r\AppData\Local\Temp\/lein-custom-repo (file://C:\Users\user\AppData\Local\Temp\/lein-custom-repo)
Failed to update metadata nomnomnom:nomnomnom:0.5.0-SNAPSHOT/maven-metadata.xml: Could not write met
adata C:\Users\user\.m2\repository\nomnomnom\nomnomnom\0.5.0-SNAPSHOT\maven-metadata-file:\C:\Users\
user\AppData\Local\Temp\lein-custom-repo.xml: C:\Users\user\.m2\repository\nomnomnom\nomnomnom\0.5.0
-SNAPSHOT\maven-metadata-file:\C:\Users\user\AppData\Local\Temp\lein-custom-repo.xml (The filename,
directory name, or volume label syntax is incorrect)

lein test :only leiningen.test.deploy/test-deploy-custom-url

ERROR in (test-deploy-custom-url) (core.clj:4327)
Uncaught exception, not in assertion.
expected: nil
actual: clojure.lang.ExceptionInfo: Suppressed exit
at clojure.core$ex_info.invoke (core.clj:4327)
leiningen.core.main$exit.invoke (main.clj:74)
leiningen.core.main$abort.doInvoke (main.clj:84)
clojure.lang.RestFn.invoke (RestFn.java:408)
leiningen.deploy$deploy.invoke (deploy.clj:164)
leiningen.test.deploy$deploy_snapshots.doInvoke (deploy.clj:21)
clojure.lang.RestFn.invoke (RestFn.java:442)
leiningen.test.deploy/fn (deploy.clj:36)
clojure.test$test_var$fn__7145.invoke (test.clj:701)
clojure.test$test_var.invoke (test.clj:701)
user$eval2606$test_var_with_selector__2615.invoke (NO_SOURCE_FILE:0)
clojure.lang.AFn.applyToHelper (AFn.java:163)
clojure.lang.AFn.applyTo (AFn.java:151)
clojure.core$apply.invoke (core.clj:619)
leiningen.core.injected$compose_hooks$fn__2540.doInvoke (NO_SOURCE_FILE:-1)
clojure.lang.RestFn.applyTo (RestFn.java:137)
clojure.core$apply.invoke (core.clj:617)
leiningen.core.injected$run_hooks.invoke (NO_SOURCE_FILE:0)
leiningen.core.injected$prepare_for_hooks$fn__2545$fn__2546.doInvoke (NO_SOURCE_FILE:0)
clojure.lang.RestFn.applyTo (RestFn.java:137)
clojure.lang.AFunction$1.doInvoke (AFunction.java:29)
clojure.lang.RestFn.invoke (RestFn.java:408)
clojure.test$test_all_vars$fn__7149$fn__7156.invoke (test.clj:717)
clojure.test$default_fixture.invoke (test.clj:671)
clojure.test$test_all_vars$fn__7149.invoke (test.clj:717)
clojure.test$default_fixture.invoke (test.clj:671)
clojure.test$test_all_vars.invoke (test.clj:713)
clojure.test$test_ns.invoke (test.clj:736)
clojure.core$map$fn__4207.invoke (core.clj:2487)
clojure.lang.LazySeq.sval (LazySeq.java:42)
clojure.lang.LazySeq.seq (LazySeq.java:60)
clojure.lang.Cons.next (Cons.java:39)
clojure.lang.RT.next (RT.java:598)
clojure.core$next.invoke (core.clj:64)
clojure.core$reduce1.invoke (core.clj:896)
clojure.core$reduce1.invoke (core.clj:887)
clojure.core$merge_with.doInvoke (core.clj:2702)
clojure.lang.RestFn.applyTo (RestFn.java:139)
clojure.core$apply.invoke (core.clj:619)
clojure.test$run_tests.doInvoke (test.clj:751)
clojure.lang.RestFn.applyTo (RestFn.java:137)
clojure.core$apply.invoke (core.clj:617)
user$eval2606$fn__2672.invoke (NO_SOURCE_FILE:-1)
user$eval2606.invoke (NO_SOURCE_FILE:0)
clojure.lang.Compiler.eval (Compiler.java:6619)
clojure.lang.Compiler.eval (Compiler.java:6609)
clojure.lang.Compiler.eval (Compiler.java:6582)
clojure.core$eval.invoke (core.clj:2852)
leiningen.core.eval$eval2244$fn__2245.invoke (eval.clj:273)
clojure.lang.MultiFn.invoke (MultiFn.java:231)
leiningen.core.eval$eval_in_project.invoke (eval.clj:282)
leiningen.test$test.doInvoke (test.clj:177)
clojure.lang.RestFn.invoke (RestFn.java:410)
clojure.lang.Var.invoke (Var.java:415)
clojure.lang.AFn.applyToHelper (AFn.java:161)
clojure.lang.Var.applyTo (Var.java:532)
clojure.core$apply.invoke (core.clj:619)
leiningen.core.main$resolve_task$fn__1944.doInvoke (main.clj:149)
clojure.lang.RestFn.invoke (RestFn.java:410)
clojure.lang.AFn.applyToHelper (AFn.java:161)
clojure.lang.RestFn.applyTo (RestFn.java:132)
clojure.lang.AFunction$1.doInvoke (AFunction.java:29)
clojure.lang.RestFn.applyTo (RestFn.java:137)
clojure.core$apply.invoke (core.clj:619)
leiningen.core.main$apply_task.invoke (main.clj:189)
leiningen.core.main$resolve_and_apply.invoke (main.clj:193)
leiningen.core.main$_main$fn__2007.invoke (main.clj:257)
leiningen.core.main$_main.doInvoke (main.clj:247)
clojure.lang.RestFn.invoke (RestFn.java:408)
clojure.lang.Var.invoke (Var.java:415)
clojure.lang.AFn.applyToHelper (AFn.java:161)
clojure.lang.Var.applyTo (Var.java:532)
clojure.core$apply.invoke (core.clj:617)
clojure.main$main_opt.invoke (main.clj:335)
clojure.main$main.doInvoke (main.clj:440)
clojure.lang.RestFn.invoke (RestFn.java:436)
clojure.lang.Var.invoke (Var.java:423)
clojure.lang.AFn.applyToHelper (AFn.java:167)
clojure.lang.Var.applyTo (Var.java:532)
clojure.main.main (main.java:37)

lein test leiningen.test.deps
Retrieving rome/rome/0.9/rome-0.9.pom from central
Retrieving jdom/jdom/1.0/jdom-1.0.pom from central
Retrieving robert/hooke/1.0.1/hooke-1.0.1.pom from clojars
Retrieving robert/hooke/1.0.1/hooke-1.0.1.jar from clojars
Retrieving slamhound/slamhound/1.1.0-SNAPSHOT/slamhound-1.1.0-20110417.030036-2.pom from clojars
Retrieving slamhound/slamhound/1.1.0-SNAPSHOT/slamhound-1.1.0-20110417.030036-2.jar from clojars
Could not find artifact robert:hooke:jar:1.0.1
This could be due to a typo in :dependencies or network issues.
Could not find artifact slamhound:slamhound:jar:1.1.0-SNAPSHOT
This could be due to a typo in :dependencies or network issues.

lein test leiningen.test.do

lein test leiningen.test.help

lein test leiningen.test.helper

lein test leiningen.test.install
Created s:\workspace.eclipse.2k13_2\leiningen\test_projects\tricky-name\target\tricky-name-1.0.jar
Wrote s:\workspace.eclipse.2k13_2\leiningen\test_projects\tricky-name\pom.xml
Created s:\workspace.eclipse.2k13_2\leiningen\test_projects\sample\target\nomnomnom-0.5.0-SNAPSHOT.j
ar
Wrote s:\workspace.eclipse.2k13_2\leiningen\test_projects\sample\pom.xml

lein test leiningen.test.jar
Compiling nom.nom.nom
Created s:\workspace.eclipse.2k13_2\leiningen\test_projects\sample\target\nomnomnom-0.5.0-SNAPSHOT.j
ar

lein test leiningen.test.javac

lein test leiningen.test.new
Generating a project called test-new-proj based on the 'default' template.
To see other templates (app, lein plugin, etc), try `lein help new`.
Generating a project called test-new-proj based on the 'default' template.
To see other templates (app, lein plugin, etc), try `lein help new`.
Generating a project called test-new-proj based on the 'default' template.
To see other templates (app, lein plugin, etc), try `lein help new`.
Generating fresh 'lein new' template project.
Generating a fresh Leiningen plugin called test-new-plugin.
Generating a project called test-new-app based on the 'app' template.
Generating a project called orgname/a-project based on the 'default' template.
To see other templates (app, lein plugin, etc), try `lein help new`.
Generating a project called test-new-proj based on the 'default' template.
To see other templates (app, lein plugin, etc), try `lein help new`.

lein test leiningen.test.new.templates

lein test :only leiningen.test.new.templates/renderers

FAIL in (renderers) (templates.clj:59)
expected: (.contains (abort-msg (renderer "my-template") "boom" {}) "Template resource 'leiningen/ne
w/my_template/boom' not found.\n")
actual: false

lein test :only leiningen.test.new.templates/renderers

FAIL in (renderers) (templates.clj:61)
expected: (.contains (abort-msg (renderer "my-template") "boom") "Template resource 'leiningen/new/m
y_template/boom' not found.\n")
actual: false

lein test leiningen.test.pom
Release versions may not depend upon snapshots.
Freeze snapshots to dated versions or set the LEIN_SNAPSHOTS_IN_RELEASE environment variable to over
ride.
Wrote s:\workspace.eclipse.2k13_2\leiningen\test_projects\sample\pom.xml

lein test leiningen.test.repl

lein test leiningen.test.run

lein test leiningen.test.test

lein test namespace

lein test selectors

Ran 2 tests containing 2 assertions.
0 failures, 0 errors.
0

lein test selectors

Ran 3 tests containing 3 assertions.
0 failures, 0 errors.
0

lein test selectors

Ran 3 tests containing 3 assertions.
0 failures, 0 errors.
0

lein test selectors

Ran 3 tests containing 3 assertions.
0 failures, 0 errors.
0

lein test selectors

Ran 3 tests containing 3 assertions.
0 failures, 0 errors.
0

lein test namespace

lein test selectors

Ran 5 tests containing 5 assertions.
0 failures, 0 errors.
0

lein test selectors

Ran 1 tests containing 1 assertions.
0 failures, 0 errors.
0

lein test namespace

lein test selectors

Ran 3 tests containing 3 assertions.
0 failures, 0 errors.
0

lein test namespace

lein test selectors

Ran 4 tests containing 4 assertions.
0 failures, 0 errors.
0

lein test leiningen.test.uberjar
Created s:\workspace.eclipse.2k13_2\leiningen\test_projects\sample_no_aot\target\nomnomnom-0.5.0-SNA
PSHOT.jar
Including nomnomnom-0.5.0-SNAPSHOT.jar
Including janino-2.5.15.jar
Including clojure-1.3.0.jar
Created s:\workspace.eclipse.2k13_2\leiningen\test_projects\sample_no_aot\target\nomnomnom-0.5.0-SNA
PSHOT-standalone.jar

lein test leiningen.test.update-in

lein test leiningen.var-args

Ran 115 tests containing 362 assertions.
2 failures, 1 errors.
Tests failed.
Suppressed exit
s:\workspace.eclipse.2k13_2\leiningen>
```