From 7b9660c3b91d7550686f522650da3721e415ed64 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Tue, 1 Aug 2023 14:26:51 +0200 Subject: [PATCH] Add align tests for CSS * test/lisp/align-tests.el (align-css): New test. * test/lisp/align-resources/css-mode.erts: New file. --- test/lisp/align-resources/css-mode.erts | 23 +++++++++++++++++++++++ test/lisp/align-tests.el | 5 +++++ 2 files changed, 28 insertions(+) create mode 100644 test/lisp/align-resources/css-mode.erts diff --git a/test/lisp/align-resources/css-mode.erts b/test/lisp/align-resources/css-mode.erts new file mode 100644 index 00000000000..e4455601083 --- /dev/null +++ b/test/lisp/align-resources/css-mode.erts @@ -0,0 +1,23 @@ +Name: align attributes + +=-= +div { + border: 1px solid black; + padding: 25px 50px 75px 100px; + background-color: lightblue; +} +p.center { + text-align: center; + color: red; +} +=-= +div { + border: 1px solid black; + padding: 25px 50px 75px 100px; + background-color: lightblue; +} +p.center { + text-align: center; + color: red; +} +=-=-= diff --git a/test/lisp/align-tests.el b/test/lisp/align-tests.el index 9f94bcb611f..52e136abfc8 100644 --- a/test/lisp/align-tests.el +++ b/test/lisp/align-tests.el @@ -34,6 +34,11 @@ (ert-test-erts-file (ert-resource-file "c-mode.erts") (test-align-transform-fun #'c-mode))) +(ert-deftest align-css () + (let ((indent-tabs-mode nil)) + (ert-test-erts-file (ert-resource-file "css-mode.erts") + (test-align-transform-fun #'css-mode)))) + (ert-deftest align-java () (ert-test-erts-file (ert-resource-file "java-mode.erts") (test-align-transform-fun #'java-mode))) -- 2.39.2