technomancy / leiningen

Moved to Codeberg; this is a convenience mirror
https://codeberg.org/leiningen/leiningen
Other
7.29k stars 1.61k forks source link

lein tests are not meant to be run on Windows right? #1176

Closed ghost closed 11 years ago

ghost commented 11 years ago

bin\lein test when run on Windows gives lots of errors mainly due to path separators difference

here's the full output (100 chars on horizontal) (EDIT: replaced with 100 chars on horizontal instead of previous 140) ran against: https://github.com/technomancy/leiningen/commit/92615f15ce7abf9d91e1af826a0ebdd49c1002e2

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

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

lein test leiningen.bluuugh

lein test leiningen.core.test.classpath

lein test :only leiningen.core.test.classpath/test-classpath

FAIL in (test-classpath) (classpath.clj:67)
expected: (= (set classpath) (into libs directories))
  actual: (not (= #{"C:\\Users\\user\\.m2\\repository\\ring\\ring-core\\1.0.0\\ring-core-1.0.0.jar"
"C:\\Users\\user\\.m2\\repository\\commons-fileupload\\commons-fileupload\\1.2.1\\commons-fileupload
-1.2.1.jar" "C:\\Users\\user\\.m2\\repository\\javax\\servlet\\servlet-api\\2.5\\servlet-api-2.5.jar
" "s:\\tmp\\lein-sample-project\\tmp\\lein-sample-project\\src" "s:\\tmp\\lein-sample-project\\tmp\\
lein-sample-project\\resources" "C:\\Users\\user\\.m2\\repository\\commons-io\\commons-io\\1.4\\comm
ons-io-1.4.jar" "C:\\Users\\user\\.m2\\repository\\org\\clojure\\clojure\\1.3.0\\clojure-1.3.0.jar"
"s:\\tmp\\lein-sample-project\\tmp\\lein-sample-project\\test"} #{"/tmp/lein-sample-project/test" "C
:\\Users\\user\\.m2\\repository\\ring\\ring-core\\1.0.0\\ring-core-1.0.0.jar" "C:\\Users\\user\\.m2\
\repository\\commons-fileupload\\commons-fileupload\\1.2.1\\commons-fileupload-1.2.1.jar" "C:\\Users
\\user\\.m2\\repository\\javax\\servlet\\servlet-api\\2.5\\servlet-api-2.5.jar" "/tmp/lein-sample-pr
oject/src" "/tmp/lein-sample-project/resources" "C:\\Users\\user\\.m2\\repository\\commons-io\\commo
ns-io\\1.4\\commons-io-1.4.jar" "C:\\Users\\user\\.m2\\repository\\org\\clojure\\clojure\\1.3.0\\clo
jure-1.3.0.jar"}))

lein test :only leiningen.core.test.classpath/test-classpath

FAIL in (test-classpath) (classpath.clj:68)
expected: (= directories (take 3 classpath))
  actual: (not (= ["/tmp/lein-sample-project/test" "/tmp/lein-sample-project/src" "/tmp/lein-sample-
project/resources"] ("s:\\tmp\\lein-sample-project\\tmp\\lein-sample-project\\test" "s:\\tmp\\lein-s
ample-project\\tmp\\lein-sample-project\\src" "s:\\tmp\\lein-sample-project\\tmp\\lein-sample-projec
t\\resources")))

lein test :only leiningen.core.test.classpath/test-checkout-deps

FAIL in (test-checkout-deps) (classpath.clj:80)
expected: (= (for [path ["src" "resources" (pathify "target/classes") "foo"]] (format (pathify "/tmp
/lein-sample-project/checkouts/d1/%s") path)) ((var leiningen.core.classpath/checkout-deps-paths) pr
oject))
  actual: (not (= ("\\tmp\\lein-sample-project\\checkouts\\d1\\src" "\\tmp\\lein-sample-project\\che
ckouts\\d1\\resources" "\\tmp\\lein-sample-project\\checkouts\\d1\\target\\classes" "\\tmp\\lein-sam
ple-project\\checkouts\\d1\\foo") ("s:\\tmp\\lein-sample-project\\checkouts\\d1\\src" "s:\\tmp\\lein
-sample-project\\checkouts\\d1\\resources" "s:\\tmp\\lein-sample-project\\checkouts\\d1\\target\\cla
sses" "s:\\tmp\\lein-sample-project\\checkouts\\d1/foo")))

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 :only leiningen.core.test.project/test-read-project

FAIL in (test-read-project) (project.clj:57)
expected: (= (str (:root actual) "/" path) (k actual))
  actual: (not (= "S:\\workspace.eclipse.2k13_2\\leiningen\\leiningen-core\\dev-resources/target/cla
sses" "S:\\workspace.eclipse.2k13_2\\leiningen\\leiningen-core\\dev-resources\\target\\classes"))

lein test :only leiningen.core.test.project/test-read-project

FAIL in (test-read-project) (project.clj:57)
expected: (= (str (:root actual) "/" path) (k actual))
  actual: (not (= "S:\\workspace.eclipse.2k13_2\\leiningen\\leiningen-core\\dev-resources/target" "S
:\\workspace.eclipse.2k13_2\\leiningen\\leiningen-core\\dev-resources\\target"))

lein test :only leiningen.core.test.project/test-read-project

FAIL in (test-read-project) (project.clj:57)
expected: (= (str (:root actual) "/" path) (k actual))
  actual: (not (= "S:\\workspace.eclipse.2k13_2\\leiningen\\leiningen-core\\dev-resources/target/nat
ive" "S:\\workspace.eclipse.2k13_2\\leiningen\\leiningen-core\\dev-resources\\target\\native"))

lein test :only leiningen.core.test.project/test-read-project

FAIL in (test-read-project) (project.clj:61)
expected: (= (for [p path] (str (:root actual) "/" p)) (k actual))
  actual: (not (= ("S:\\workspace.eclipse.2k13_2\\leiningen\\leiningen-core\\dev-resources/src") ("S
:\\workspace.eclipse.2k13_2\\leiningen\\leiningen-core\\dev-resources\\src")))

lein test :only leiningen.core.test.project/test-read-project

FAIL in (test-read-project) (project.clj:61)
expected: (= (for [p path] (str (:root actual) "/" p)) (k actual))
  actual: (not (= ("S:\\workspace.eclipse.2k13_2\\leiningen\\leiningen-core\\dev-resources/dev-resou
rces" "S:\\workspace.eclipse.2k13_2\\leiningen\\leiningen-core\\dev-resources/resources") ("S:\\work
space.eclipse.2k13_2\\leiningen\\leiningen-core\\dev-resources\\dev-resources" "S:\\workspace.eclips
e.2k13_2\\leiningen\\leiningen-core\\dev-resources\\resources")))

lein test :only leiningen.core.test.project/test-read-project

FAIL in (test-read-project) (project.clj:61)
expected: (= (for [p path] (str (:root actual) "/" p)) (k actual))
  actual: (not (= ("S:\\workspace.eclipse.2k13_2\\leiningen\\leiningen-core\\dev-resources/test") ("
S:\\workspace.eclipse.2k13_2\\leiningen\\leiningen-core\\dev-resources\\test")))

lein test :only leiningen.core.test.project/test-merge-profile-paths

FAIL in (test-merge-profile-paths) (project.clj:270)
expected: (= ["/etc/myapp" "test/hi" "blue-resources" "resources"] (-> (make (test-project {:resourc
e-paths ["resources"], :profiles {:blue {:resource-paths ["blue-resources"]}}})) (merge-profiles [:b
lue :tes :qa]) :resource-paths))
  actual: (not (= ["/etc/myapp" "test/hi" "blue-resources" "resources"] ("\\etc\\myapp" "test\\hi" "
blue-resources" "resources")))

lein test :only leiningen.core.test.project/test-merge-profile-paths

FAIL in (test-merge-profile-paths) (project.clj:277)
expected: (= ["/etc/myapp" "test/hi" "blue-resources"] (-> (make (test-project {:resource-paths ["re
sources"], :profiles {:blue {:resource-paths ["blue-resources"]}}})) (merge-profiles [:blue :tes :qa
]) :resource-paths))
  actual: (not (= ["/etc/myapp" "test/hi" "blue-resources"] ("\\etc\\myapp" "test\\hi" "blue-resourc
es")))

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)
SendingSending  nomnomnom/nomnomnom/0.5.0-SNAPSHOT/nomnomnom-0.5.0-20130512.034858-1.jarnomnomnom/no
mnomnom/0.5.0-SNAPSHOT/nomnomnom-0.5.0-20130512.034858-1.pom  (14k)(3k)

        to file://C:\Users\user\AppData\Local\Temp\/lein-repo/to
 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.xml (1k)
Sending     nomnomnom/nomnomnom/maven-metadata.xml to(1k) file://C:\Users\user\AppData\Local\Temp\/l
ein-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-20130512.034900-1.pom (3k)
Sending nomnomnom/nomnomnom/0.5.0-SNAPSHOT/nomnomnom-0.5.0-20130512.034900-1.jar     (14k)to file://
C:\Users\user\AppData\Local\Temp\/deploy-only-repo/

    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)Sending
 nomnomnom/nomnomnom/0.5.0-SNAPSHOT/maven-metadata.xml     to (1k)file://C:\Users\user\AppData\Local
\Temp\/deploy-only-repo/

    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:149)
    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$eval2202$test_var_with_selector__2211.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__2136.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__2141$fn__2142.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$eval2202$fn__2268.invoke (NO_SOURCE_FILE:-1)
    user$eval2202.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/fn (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__1938.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__2001.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 :only leiningen.test.deps/test-native-deps

FAIL in (test-native-deps) (deps.clj:112)
expected: (= (conj (get-in native-lib-files-map [(eval/get-os) (eval/get-arch)]) ".gitkeep") (set (f
or [f (rest (file-seq (io/file (first (eval/native-arch-paths native-project)))))] (.getName f))))
  actual: (not (= #{"jri.dll rJava.dll" "OpenAL64.dll" ".gitkeep" "rxtxSerial.dll" "lwjgl64.dll" "ji
nput-raw_64.dll" "jinput-dx8_64.dll"} #{"OpenAL64.dll" ".gitkeep" "rJava.dll" "rxtxSerial.dll" "jri.
dll" "lwjgl64.dll" "jinput-raw_64.dll" "jinput-dx8_64.dll"}))

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/paths

FAIL in (paths) (templates.clj:55)
expected: (= (name-to-path "foo-bar.baz") "foo_bar/baz")
  actual: (not (= "foo_bar\\baz" "foo_bar/baz"))

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

FAIL in (renderers) (templates.clj:58)
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:60)
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 :only leiningen.test.pom/test-pom-default-values

FAIL in (test-pom-default-values) (pom.clj:99)
classes directory is included
expected: (= "target/classes" (first-in xml [:project :build :outputDirectory]))
  actual: (not (= "target/classes" "target\\classes"))

lein test :only leiningen.test.pom/test-pom-adds-java-source-paths

FAIL in (test-pom-adds-java-source-paths) (pom.clj:278)
expected: (= ["java/src" "java/another"] (-> (make-pom (with-profile sample-project {:java-source-pa
ths ["java/src" "java/another"]})) xml/parse-str (deep-content [:project :build :plugins :plugin :ex
ecutions :execution :configuration :sources]) ((partial mapcat :content))))
  actual: (not (= ["java/src" "java/another"] ("java\\src" "java\\another")))

lein test leiningen.test.repl

lein test :only leiningen.test.repl/test-options-for-reply

FAIL in (test-options-for-reply) (repl.clj:64)
expected: (= "/home/user/.lein-repl-history" (:history-file (options-for-reply {:root "/home/user"})
))
  actual: (not (= "/home/user/.lein-repl-history" "\\home\\user\\.lein-repl-history"))

lein test :only leiningen.test.repl/test-options-for-reply

FAIL in (test-options-for-reply) (repl.clj:67)
expected: (= (merge {:history-file (str (user/leiningen-home) "/repl-history"), :input-stream System
/in} {:standalone true}) (let [[prj-k prj-v arg-k arg-v] [:standalone true]] (apply options-for-repl
y {:repl-options (into {} (and prj-k {prj-k prj-v}))} (into [] (and arg-k [arg-k arg-v])))))
  actual: (not (= {:standalone true, :history-file "C:\\Users\\user\\.lein/repl-history", :input-str
eam #<RevivableInputStream com.hypirion.io.RevivableInputStream@e55871d>} {:standalone true, :histor
y-file "C:\\Users\\user\\.lein\\repl-history", :input-stream #<RevivableInputStream com.hypirion.io.
RevivableInputStream@e55871d>}))

lein test :only leiningen.test.repl/test-options-for-reply

FAIL in (test-options-for-reply) (repl.clj:67)
expected: (= (merge {:history-file (str (user/leiningen-home) "/repl-history"), :input-stream System
/in} {:custom-prompt prompt-fn}) (let [[prj-k prj-v arg-k arg-v] [:prompt prompt-fn]] (apply options
-for-reply {:repl-options (into {} (and prj-k {prj-k prj-v}))} (into [] (and arg-k [arg-k arg-v]))))
)
  actual: (not (= {:custom-prompt #<repl$fn__4603$prompt_fn__4608 leiningen.test.repl$fn__4603$promp
t_fn__4608@234172c8>, :history-file "C:\\Users\\user\\.lein/repl-history", :input-stream #<Revivable
InputStream com.hypirion.io.RevivableInputStream@e55871d>} {:custom-prompt #<repl$fn__4603$prompt_fn
__4608 leiningen.test.repl$fn__4603$prompt_fn__4608@234172c8>, :history-file "C:\\Users\\user\\.lein
\\repl-history", :input-stream #<RevivableInputStream com.hypirion.io.RevivableInputStream@e55871d>}
))

lein test :only leiningen.test.repl/test-options-for-reply

FAIL in (test-options-for-reply) (repl.clj:67)
expected: (= (merge {:history-file (str (user/leiningen-home) "/repl-history"), :input-stream System
/in} {:host "prj-host"}) (let [[prj-k prj-v arg-k arg-v] [:host "prj-host"]] (apply options-for-repl
y {:repl-options (into {} (and prj-k {prj-k prj-v}))} (into [] (and arg-k [arg-k arg-v])))))
  actual: (not (= {:host "prj-host", :history-file "C:\\Users\\user\\.lein/repl-history", :input-str
eam #<RevivableInputStream com.hypirion.io.RevivableInputStream@e55871d>} {:host "prj-host", :histor
y-file "C:\\Users\\user\\.lein\\repl-history", :input-stream #<RevivableInputStream com.hypirion.io.
RevivableInputStream@e55871d>}))

lein test :only leiningen.test.repl/test-options-for-reply

FAIL in (test-options-for-reply) (repl.clj:67)
expected: (= (merge {:history-file (str (user/leiningen-home) "/repl-history"), :input-stream System
/in} {:host "prj-host", :port "1"}) (let [[prj-k prj-v arg-k arg-v] [:host "prj-host" :port 1]] (app
ly options-for-reply {:repl-options (into {} (and prj-k {prj-k prj-v}))} (into [] (and arg-k [arg-k
arg-v])))))
  actual: (not (= {:port "1", :host "prj-host", :history-file "C:\\Users\\user\\.lein/repl-history",
 :input-stream #<RevivableInputStream com.hypirion.io.RevivableInputStream@e55871d>} {:port "1", :ho
st "prj-host", :history-file "C:\\Users\\user\\.lein\\repl-history", :input-stream #<RevivableInputS
tream com.hypirion.io.RevivableInputStream@e55871d>}))

lein test :only leiningen.test.repl/test-options-for-reply

FAIL in (test-options-for-reply) (repl.clj:67)
expected: (= (merge {:history-file (str (user/leiningen-home) "/repl-history"), :input-stream System
/in} {:port "1"}) (let [[prj-k prj-v arg-k arg-v] [nil nil :port 1]] (apply options-for-reply {:repl
-options (into {} (and prj-k {prj-k prj-v}))} (into [] (and arg-k [arg-k arg-v])))))
  actual: (not (= {:port "1", :history-file "C:\\Users\\user\\.lein/repl-history", :input-stream #<R
evivableInputStream com.hypirion.io.RevivableInputStream@e55871d>} {:port "1", :history-file "C:\\Us
ers\\user\\.lein\\repl-history", :input-stream #<RevivableInputStream com.hypirion.io.RevivableInput
Stream@e55871d>}))

lein test :only leiningen.test.repl/test-options-for-reply

FAIL in (test-options-for-reply) (repl.clj:67)
expected: (= (merge {:history-file (str (user/leiningen-home) "/repl-history"), :input-stream System
/in} {:port "2"}) (let [[prj-k prj-v arg-k arg-v] [:port 2]] (apply options-for-reply {:repl-options
 (into {} (and prj-k {prj-k prj-v}))} (into [] (and arg-k [arg-k arg-v])))))
  actual: (not (= {:port "2", :history-file "C:\\Users\\user\\.lein/repl-history", :input-stream #<R
evivableInputStream com.hypirion.io.RevivableInputStream@e55871d>} {:port "2", :history-file "C:\\Us
ers\\user\\.lein\\repl-history", :input-stream #<RevivableInputStream com.hypirion.io.RevivableInput
Stream@e55871d>}))

lein test :only leiningen.test.repl/test-options-for-reply

FAIL in (test-options-for-reply) (repl.clj:67)
expected: (= (merge {:history-file (str (user/leiningen-home) "/repl-history"), :input-stream System
/in} {:port "1"}) (let [[prj-k prj-v arg-k arg-v] [:port 2 :port 1]] (apply options-for-reply {:repl
-options (into {} (and prj-k {prj-k prj-v}))} (into [] (and arg-k [arg-k arg-v])))))
  actual: (not (= {:port "1", :history-file "C:\\Users\\user\\.lein/repl-history", :input-stream #<R
evivableInputStream com.hypirion.io.RevivableInputStream@e55871d>} {:port "1", :history-file "C:\\Us
ers\\user\\.lein\\repl-history", :input-stream #<RevivableInputStream com.hypirion.io.RevivableInput
Stream@e55871d>}))

lein test :only leiningen.test.repl/test-options-for-reply

FAIL in (test-options-for-reply) (repl.clj:67)
expected: (= (merge {:history-file (str (user/leiningen-home) "/repl-history"), :input-stream System
/in} {:attach "xy"}) (let [[prj-k prj-v arg-k arg-v] [:host "prj-host" :attach "xy"]] (apply options
-for-reply {:repl-options (into {} (and prj-k {prj-k prj-v}))} (into [] (and arg-k [arg-k arg-v]))))
)
  actual: (not (= {:attach "xy", :history-file "C:\\Users\\user\\.lein/repl-history", :input-stream
#<RevivableInputStream com.hypirion.io.RevivableInputStream@e55871d>} {:attach "xy", :history-file "
C:\\Users\\user\\.lein\\repl-history", :input-stream #<RevivableInputStream com.hypirion.io.Revivabl
eInputStream@e55871d>}))

lein test :only leiningen.test.repl/test-options-for-reply

FAIL in (test-options-for-reply) (repl.clj:67)
expected: (= (merge {:history-file (str (user/leiningen-home) "/repl-history"), :input-stream System
/in} {:attach "xy"}) (let [[prj-k prj-v arg-k arg-v] [:port 3 :attach "xy"]] (apply options-for-repl
y {:repl-options (into {} (and prj-k {prj-k prj-v}))} (into [] (and arg-k [arg-k arg-v])))))
  actual: (not (= {:attach "xy", :history-file "C:\\Users\\user\\.lein/repl-history", :input-stream
#<RevivableInputStream com.hypirion.io.RevivableInputStream@e55871d>} {:attach "xy", :history-file "
C:\\Users\\user\\.lein\\repl-history", :input-stream #<RevivableInputStream com.hypirion.io.Revivabl
eInputStream@e55871d>}))

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.
27 failures, 1 errors.
Tests failed.
Suppressed exit
s:\workspace.eclipse.2k13_2\leiningen>

(FIXED this one)If you've read this far, at least one thing is wrong "jri.dll rJava.dll" search for that in the project. It's supposed to be 2 Strings.

I could work on making these work on Windows too, if anyone would suggest exactly what to do :) (like: make a function which replaces path separators depending on the current OS?)

michaelklishin commented 11 years ago

All functions that expect paths should not make any assumptions about characters in the path. Unfortunately, without inspecting each test ns, it is hard to tell more. I definitely think that Leiningen tests should pass on Windows, although admittedly, almost all contributions from Windows users are around fixes to the lein.bat file and none of the active contributors uses Windows.

ghost commented 11 years ago

there is a flaw in normalize-path related to this [1] where it doesn't recognize paths like /tmp/lein-sample-project/src as absolute so it ends up adding the root project to the path so it yields /tmp/lein-sample-project/tmp/lein-sample-project/src but since this happens under windows only! it looks more like this s:\\tmp\\lein-sample-project\\tmp\\lein-sample-project\\src Should I just check if it has a starting / before attempting to do the (io/file root path) and only do it if it doesn't ? Code here btw [2]

[1] http://stackoverflow.com/questions/5154754/why-is-file-isabsolute-platform-dependent-when-the-file-class-is-platform-inde [2] https://github.com/technomancy/leiningen/blob/master/leiningen-core/src/leiningen/core/classpath.clj#L255-L257