Skip to content

Create indentation tests #271

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

Closed
bbatsov opened this issue Jan 11, 2015 · 2 comments
Closed

Create indentation tests #271

bbatsov opened this issue Jan 11, 2015 · 2 comments

Comments

@bbatsov
Copy link
Member

bbatsov commented Jan 11, 2015

Such tests would be really useful and will make the code less vulnerable to regressions.

We can borrow ideas from elixir-mode and swift-mode.

@andrewhr
Copy link

@bbatsov looks interesting. One idea though: since indentation is idempotent, the test macro could receive only the expected version. That way the tests could read a bit more like documentation. Something like:

(def-indentation-test vertically-aligns-function-args-spanning-multiple-lines 
  "
(filter even?
        (range 1 10))
")

Yep, I stealed the example from your style guide 😉

@the-kenny
Copy link

You could even read the forms from an external file - no need to embed code in strings which always seems messy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants