Repro: mkdir /tmp/foo-bar, cd /tmp/foo-bar, clone ClojureScript there and go into clojurescript and then
mkdir /tmp/foo-bar
cd /tmp/foo-bar
clojurescript
lein test :only cljs.module-processing-tests/test-module-name-substitution
This results in what appears to be a munging-related failure:
FAIL in (test-module-name-substitution) (module_processing_tests.clj:123) expected: (= (str "goog.provide('my_calculator.core');" crlf "goog.require('cljs.core');" crlf "goog.require('" (absolute-module-path "src/test/cljs/calculator.js" true) "');" crlf) (compile (quote (ns my-calculator.core (:require [calculator :as calc :refer [subtract add] :rename {subtract sub}]))))) actual: (not (= "goog.provide('my_calculator.core');\ngoog.require('cljs.core');\ngoog.require('module$private$tmp$foo-bar$clojurescript$src$test$cljs$calculator');\n" "goog.provide('my_calculator.core');\ngoog.require('cljs.core');\ngoog.require('module$private$tmp$foo_bar$clojurescript$src$test$cljs$calculator');\n")) lein test :only cljs.module-processing-tests/test-module-name-substitution FAIL in (test-module-name-substitution) (module_processing_tests.clj:128) expected: (= output (compile (quote (calc/add 3 4)))) actual: (not (= "module$private$tmp$foo-bar$clojurescript$src$test$cljs$calculator[\"default\"].add((3),(4));\n" "module$private$tmp$foo_bar$clojurescript$src$test$cljs$calculator[\"default\"].add((3),(4));\n")) lein test :only cljs.module-processing-tests/test-module-name-substitution FAIL in (test-module-name-substitution) (module_processing_tests.clj:129) expected: (= output (compile (quote (calculator/add 3 4)))) actual: (not (= "module$private$tmp$foo-bar$clojurescript$src$test$cljs$calculator[\"default\"].add((3),(4));\n" "module$private$tmp$foo_bar$clojurescript$src$test$cljs$calculator[\"default\"].add((3),(4));\n")) lein test :only cljs.module-processing-tests/test-module-name-substitution FAIL in (test-module-name-substitution) (module_processing_tests.clj:130) expected: (= output (compile (quote (add 3 4)))) actual: (not (= "module$private$tmp$foo-bar$clojurescript$src$test$cljs$calculator[\"default\"].add((3),(4));\n" "module$private$tmp$foo_bar$clojurescript$src$test$cljs$calculator[\"default\"].add((3),(4));\n")) lein test :only cljs.module-processing-tests/test-module-name-substitution FAIL in (test-module-name-substitution) (module_processing_tests.clj:131) expected: (= (str (absolute-module-path "src/test/cljs/calculator.js" true) "[\"default\"].subtract((5),(4));" crlf) (compile (quote (sub 5 4)))) actual: (not (= "module$private$tmp$foo-bar$clojurescript$src$test$cljs$calculator[\"default\"].subtract((5),(4));\n" "module$private$tmp$foo_bar$clojurescript$src$test$cljs$calculator[\"default\"].subtract((5),(4));\n"))
Repro:
mkdir /tmp/foo-bar
,cd /tmp/foo-bar
, clone ClojureScript there and go intoclojurescript
and thenlein test :only cljs.module-processing-tests/test-module-name-substitution
This results in what appears to be a munging-related failure:
FAIL in (test-module-name-substitution) (module_processing_tests.clj:123) expected: (= (str "goog.provide('my_calculator.core');" crlf "goog.require('cljs.core');" crlf "goog.require('" (absolute-module-path "src/test/cljs/calculator.js" true) "');" crlf) (compile (quote (ns my-calculator.core (:require [calculator :as calc :refer [subtract add] :rename {subtract sub}]))))) actual: (not (= "goog.provide('my_calculator.core');\ngoog.require('cljs.core');\ngoog.require('module$private$tmp$foo-bar$clojurescript$src$test$cljs$calculator');\n" "goog.provide('my_calculator.core');\ngoog.require('cljs.core');\ngoog.require('module$private$tmp$foo_bar$clojurescript$src$test$cljs$calculator');\n")) lein test :only cljs.module-processing-tests/test-module-name-substitution FAIL in (test-module-name-substitution) (module_processing_tests.clj:128) expected: (= output (compile (quote (calc/add 3 4)))) actual: (not (= "module$private$tmp$foo-bar$clojurescript$src$test$cljs$calculator[\"default\"].add((3),(4));\n" "module$private$tmp$foo_bar$clojurescript$src$test$cljs$calculator[\"default\"].add((3),(4));\n")) lein test :only cljs.module-processing-tests/test-module-name-substitution FAIL in (test-module-name-substitution) (module_processing_tests.clj:129) expected: (= output (compile (quote (calculator/add 3 4)))) actual: (not (= "module$private$tmp$foo-bar$clojurescript$src$test$cljs$calculator[\"default\"].add((3),(4));\n" "module$private$tmp$foo_bar$clojurescript$src$test$cljs$calculator[\"default\"].add((3),(4));\n")) lein test :only cljs.module-processing-tests/test-module-name-substitution FAIL in (test-module-name-substitution) (module_processing_tests.clj:130) expected: (= output (compile (quote (add 3 4)))) actual: (not (= "module$private$tmp$foo-bar$clojurescript$src$test$cljs$calculator[\"default\"].add((3),(4));\n" "module$private$tmp$foo_bar$clojurescript$src$test$cljs$calculator[\"default\"].add((3),(4));\n")) lein test :only cljs.module-processing-tests/test-module-name-substitution FAIL in (test-module-name-substitution) (module_processing_tests.clj:131) expected: (= (str (absolute-module-path "src/test/cljs/calculator.js" true) "[\"default\"].subtract((5),(4));" crlf) (compile (quote (sub 5 4)))) actual: (not (= "module$private$tmp$foo-bar$clojurescript$src$test$cljs$calculator[\"default\"].subtract((5),(4));\n" "module$private$tmp$foo_bar$clojurescript$src$test$cljs$calculator[\"default\"].subtract((5),(4));\n"))