Fork me on GitHub
#cider
<
2019-01-05
>
bozhidar10:01:17

A trivial change resulted in this failure I cannot figure out. The two failing tests work from Emacs when you run them interactively with ert, but break down with make cask.

bozhidar10:01:34

That’s the only blocker for a new (long overdue) clojure-mode release. 🙂

bozhidar10:01:37

It’s some mess with the macroexpansion, but it seems like the test macro expands properly, even if it doesn’t work properly… The many joys of macros. 🙂

bozhidar10:01:12

(macroexpand-1 '(def-full-indent-test align-arguments
  'align-arguments
  "(some-function
  10
  1
  2)"
  "(some-function 10
               1
               2)"))
(ert-deftest test-backtracking-align-arguments nil
  (progn
    (with-temp-buffer
      (clojure-mode)
      (insert "\n" "(some-function\n 10\n 1\n 2)")
      (let
          ((clojure-indent-style 'align-arguments))
        (indent-region
         (point-min)
         (point-max)))
      (should
       (equal
        (buffer-string)
        "\n(some-function\n  10\n  1\n  2)")))
    (with-temp-buffer
      (clojure-mode)
      (insert "\n" "(some-function 10\n 1\n 2)")
      (let
          ((clojure-indent-style 'align-arguments))
        (indent-region
         (point-min)
         (point-max)))
      (should
       (equal
        (buffer-string)
        "\n(some-function 10\n               1\n               2)")))))

bozhidar11:01:55

Ah, forget about this. I finally found the error - turned out that single and double quoting of symbol were visually impossible to discern…

bozhidar11:01:29

And by impossible I mean confusing. 🙂