Skip to content

Makes clojure-test-maybe-enable more discriminating. #157

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 25, 2013

Conversation

pjstadig
Copy link
Contributor

It will only enable clojure-test-mode if it finds clojure.test somewhere in the
file. This will prevent clojure-test-mode getting enabled for namespaces with
'test.' in their name that are for other testing frameworks.

It will also allow clojure-test-mode to co-exist with emacs modes for those
other frameworks. (I thinking specifically of conjecture-mode.)

It will only enable clojure-test-mode if it finds clojure.test somewhere in the
file.  This will prevent clojure-test-mode getting enabled for namespaces with
'test.' in their name that are for other testing frameworks.

It will also allow clojure-test-mode to co-exist with emacs modes for those
other frameworks.  (I thinking specifically of conjecture-mode.)
(let ((ns (clojure-find-package))) ; defined in clojure-mode.el
(when (and ns (string-match "test\\(\\.\\|$\\)" ns))
(let ((res (clojure-find-clojure-test)))
(when (and res (string-match "clojure\\.test" res))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why aren't you using the clojure-test-regex here?

@leathekd
Copy link
Member

+1, lgtm

@danlarkin
Copy link
Member

+1

pjstadig added a commit that referenced this pull request May 25, 2013
…able

Makes clojure-test-maybe-enable more discriminating.
@pjstadig pjstadig merged commit a34c168 into master May 25, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants