Uploaded image for project: 'ClojureScript'
  1. CLJS-2915

Tests fail if directory has a period (.) in the path

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Completed
    • Affects versions: 1.10.238
    • Fix versions: None
    • Labels:
      None
    • Patch:
      Code

      Description

      Check out compiler into a cljs.dev directory and run lein test :only cljs.module-processing-tests.

      Seems very similar to CLJS-2914 Closed .

      $ lein test :only cljs.module-processing-tests
      
      lein test cljs.module-processing-tests
      
      lein test :only cljs.module-processing-tests/test-module-name-substitution
      
      FAIL in (test-module-name-substitution) (module_processing_tests.clj:124)
      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$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$calculator');\n" "goog.provide('my_calculator.core');\ngoog.require('cljs.core');\ngoog.require('module$Users$ray$dev$cljs_dev$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:129)
      expected: (= output (compile (quote (calc/add 3 4))))
        actual: (not (= "module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$calculator[\"default\"].add((3),(4));\n" "module$Users$ray$dev$cljs_dev$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 (calculator/add 3 4))))
        actual: (not (= "module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$calculator[\"default\"].add((3),(4));\n" "module$Users$ray$dev$cljs_dev$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: (= output (compile (quote (add 3 4))))
        actual: (not (= "module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$calculator[\"default\"].add((3),(4));\n" "module$Users$ray$dev$cljs_dev$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:132)
      expected: (= (str (absolute-module-path "src/test/cljs/calculator.js" true) "[\"default\"].subtract((5),(4));" crlf) (compile (quote (sub 5 4))))
        actual: (not (= "module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$calculator[\"default\"].subtract((5),(4));\n" "module$Users$ray$dev$cljs_dev$clojurescript$src$test$cljs$calculator[\"default\"].subtract((5),(4));\n"))
      
      lein test :only cljs.module-processing-tests/commonjs-module-processing-preprocess-symbol
      
      FAIL in (commonjs-module-processing-preprocess-symbol) (module_processing_tests.clj:191)
      Processed modules are added to :js-module-index
      expected: (= {"React" {:name (absolute-module-path "src/test/cljs/reactJS.js"), :module-type :commonjs}, "Circle" {:name (absolute-module-path "src/test/cljs/Circle.js"), :module-type :commonjs}} (:js-module-index (clojure.core/deref cenv)))
        actual: (not (= {"React" {:name "module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$reactJS", :module-type :commonjs}, "Circle" {:name "module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$Circle", :module-type :commonjs}} {"React" {:name "module$Users$ray$dev$cljs-dev$clojurescript$src$test$cljs$reactJS", :module-type :commonjs}, "Circle" {:name "module$Users$ray$dev$cljs-dev$clojurescript$src$test$cljs$Circle", :module-type :commonjs}}))
      
      lein test :only cljs.module-processing-tests/es6-module-processing
      
      FAIL in (es6-module-processing) (module_processing_tests.clj:97)
      Processed modules are added to :js-module-index
      expected: (= {"es6-hello" {:name (absolute-module-path "src/test/cljs/es6_hello.js"), :module-type :es6}} (:js-module-index (clojure.core/deref cenv)))
        actual: (not (= {"es6-hello" {:name "module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$es6-hello", :module-type :es6}} {"es6-hello" {:name "module$Users$ray$dev$cljs-dev$clojurescript$src$test$cljs$es6-hello", :module-type :es6}}))
      
      lein test :only cljs.module-processing-tests/test-cljs-1822
      
      FAIL in (test-cljs-1822) (module_processing_tests.clj:162)
      Processed modules are added to :js-module-index
      expected: (= {"React" {:name (absolute-module-path "src/test/cljs/react-min.js"), :module-type :commonjs}, "Circle" {:name (absolute-module-path "src/test/cljs/Circle-min.js"), :module-type :commonjs}} (:js-module-index (clojure.core/deref cenv)))
        actual: (not (= {"React" {:name "module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$react-min", :module-type :commonjs}, "Circle" {:name "module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$Circle-min", :module-type :commonjs}} {"React" {:name "module$Users$ray$dev$cljs-dev$clojurescript$src$test$cljs$react-min", :module-type :commonjs}, "Circle" {:name "module$Users$ray$dev$cljs-dev$clojurescript$src$test$cljs$Circle-min", :module-type :commonjs}}))
      
      lein test :only cljs.module-processing-tests/commonjs-module-processing
      
      FAIL in (commonjs-module-processing) (module_processing_tests.clj:71)
      Processed modules are added to :js-module-index
      expected: (= {"React" {:name (absolute-module-path "src/test/cljs/reactJS.js"), :module-type :commonjs}, "Circle" {:name (absolute-module-path "src/test/cljs/Circle.js"), :module-type :commonjs}} (:js-module-index (clojure.core/deref cenv)))
        actual: (not (= {"React" {:name "module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$reactJS", :module-type :commonjs}, "Circle" {:name "module$Users$ray$dev$cljs.dev$clojurescript$src$test$cljs$Circle", :module-type :commonjs}} {"React" {:name "module$Users$ray$dev$cljs-dev$clojurescript$src$test$cljs$reactJS", :module-type :commonjs}, "Circle" {:name "module$Users$ray$dev$cljs-dev$clojurescript$src$test$cljs$Circle", :module-type :commonjs}}))
      
      Ran 5 tests containing 14 assertions.
      9 failures, 0 errors.
      Tests failed.
      

        Attachments

          Activity

            People

            • Assignee:
              dnolen David Nolen
              Reporter:
              ray.mcdermott Ray Mcdermott
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: