* test/lisp/align-tests.el (align-regexp): New test.
* test/lisp/align-resources/align-regexp.erts: New file.
* test/lisp/align-resources/c-mode.erts: Add new test case.
--- /dev/null
+Name: align function declaration
+
+=-=
+Fred (123) 456-7890
+Alice (123) 456-7890
+Mary-Anne (123) 456-7890
+Joe (123) 456-7890
+=-=
+Fred (123) 456-7890
+Alice (123) 456-7890
+Mary-Anne (123) 456-7890
+Joe (123) 456-7890
+=-=-=
main (int argc,
char *argv[]);
=-=-=
+
+Name: example from Commentary
+
+=-=
+ int a = 1;
+ short foo = 2;
+ double blah = 4;
+=-=
+ int a = 1;
+ short foo = 2;
+ double blah = 4;
+=-=-=
(require 'ert-x)
(require 'align)
+;;;; align
+
(defun test-align-transform-fun (function)
(lambda ()
(funcall function)
(ert-test-erts-file (ert-resource-file "conf-toml-mode.erts")
(test-align-transform-fun #'conf-toml-mode))))
+;;;; align-regexp
+
+(ert-deftest align-regexp ()
+ (let ((indent-tabs-mode nil))
+ (ert-test-erts-file (ert-resource-file "align-regexp.erts")
+ (lambda ()
+ (align-regexp (point-min) (point-max)
+ "\\(\\s-*\\)(")))))
+
(provide 'align-tests)
;;; align-tests.el ends here