Skip to content
This repository has been archived by the owner on Jun 4, 2022. It is now read-only.

Commit

Permalink
LUMO-49: replaceAll semantics in lumo.repl/root-resource
Browse files Browse the repository at this point in the history
  • Loading branch information
anmonteiro committed Nov 27, 2016
1 parent b22632a commit 0c469c2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

- Regression where specifying a main script to be executed would print the banner
as if entering the REPL.
- Fix the semantics of the transformation of the load path into a classpath path
when using the `load` REPL special ([#49](https://github.com/anmonteiro/lumo/issues/49)).

## [1.0.0](https://github.com/anmonteiro/lumo/compare/1.0.0-alpha3...1.0.0) (2016-11-22)

Expand Down
4 changes: 2 additions & 2 deletions src/cljs/lumo/repl.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -512,8 +512,8 @@
[lib]
(str \/
(.. (name lib)
(replace \- \_)
(replace \. \/))))
(split \-) (join \_)
(split \.) (join \/))))

(defn- root-directory
"Returns the root resource path for a lib"
Expand Down
4 changes: 4 additions & 0 deletions test/lumo/repl_tests.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,7 @@
(is (contains? (set (lumo/get-completions "fo")) "foo"))
(is (contains? (set (lumo/get-completions "lon")) "longer-var"))
(is (contains? (set (lumo/get-completions "(lon")) "(longer-var")))))

(deftest test-root-resource
(is (= (lumo/root-resource 'foo-bar-baz) "/foo_bar_baz"))
(is (= (lumo/root-resource 'foo.bar.baz) "/foo/bar/baz")))

0 comments on commit 0c469c2

Please sign in to comment.