[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master daa174e56be: Add python-mode tests for align.el
From: |
Stefan Kangas |
Subject: |
master daa174e56be: Add python-mode tests for align.el |
Date: |
Wed, 2 Aug 2023 18:50:25 -0400 (EDT) |
branch: master
commit daa174e56be6dedbf6f1f5dc197c4a442e901809
Author: Stefan Kangas <stefankangas@gmail.com>
Commit: Stefan Kangas <stefankangas@gmail.com>
Add python-mode tests for align.el
* test/lisp/align-tests.el (align-python): New test.
* test/lisp/align-resources/python-mode.erts: New file.
---
test/lisp/align-resources/python-mode.erts | 29 +++++++++++++++++++++++++++++
test/lisp/align-tests.el | 4 ++++
2 files changed, 33 insertions(+)
diff --git a/test/lisp/align-resources/python-mode.erts
b/test/lisp/align-resources/python-mode.erts
new file mode 100644
index 00000000000..1ce50b32dba
--- /dev/null
+++ b/test/lisp/align-resources/python-mode.erts
@@ -0,0 +1,29 @@
+Name: align assignments
+
+=-=
+foo = "bar"
+x = 1
+zzzzz = True
+y = None
+=-=
+foo = "bar"
+x = 1
+zzzzz = True
+y = None
+=-=-=
+
+Name: python-chain-logic and basic-line-continuation
+
+=-=
+if foo or\
+ b and \
+ bcxxx and \
+ c:
+ pass
+=-=
+if foo or \
+ b and \
+ bcxxx and \
+ c:
+ pass
+=-=-=
diff --git a/test/lisp/align-tests.el b/test/lisp/align-tests.el
index 52e136abfc8..90b6b9df9bf 100644
--- a/test/lisp/align-tests.el
+++ b/test/lisp/align-tests.el
@@ -43,6 +43,10 @@
(ert-test-erts-file (ert-resource-file "java-mode.erts")
(test-align-transform-fun #'java-mode)))
+(ert-deftest align-python ()
+ (ert-test-erts-file (ert-resource-file "python-mode.erts")
+ (test-align-transform-fun #'python-mode)))
+
(ert-deftest align-toml ()
(let ((indent-tabs-mode nil))
(ert-test-erts-file (ert-resource-file "conf-toml-mode.erts")
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master daa174e56be: Add python-mode tests for align.el,
Stefan Kangas <=