aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorStefan Kangas2023-08-03 00:48:23 +0200
committerStefan Kangas2023-08-03 00:49:02 +0200
commitdaa174e56be6dedbf6f1f5dc197c4a442e901809 (patch)
treeb1c4c978c49a05ecb173557a411368ac5d64073a /test
parent3c44d7a1b70a2f7c813c9034bb3e28932a1a66c9 (diff)
downloademacs-daa174e56be6dedbf6f1f5dc197c4a442e901809.tar.gz
emacs-daa174e56be6dedbf6f1f5dc197c4a442e901809.zip
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.
Diffstat (limited to 'test')
-rw-r--r--test/lisp/align-resources/python-mode.erts29
-rw-r--r--test/lisp/align-tests.el4
2 files changed, 33 insertions, 0 deletions
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 @@
1Name: align assignments
2
3=-=
4foo = "bar"
5x = 1
6zzzzz = True
7y = None
8=-=
9foo = "bar"
10x = 1
11zzzzz = True
12y = None
13=-=-=
14
15Name: python-chain-logic and basic-line-continuation
16
17=-=
18if foo or\
19 b and \
20 bcxxx and \
21 c:
22 pass
23=-=
24if foo or \
25 b and \
26 bcxxx and \
27 c:
28 pass
29=-=-=
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 @@
43 (ert-test-erts-file (ert-resource-file "java-mode.erts") 43 (ert-test-erts-file (ert-resource-file "java-mode.erts")
44 (test-align-transform-fun #'java-mode))) 44 (test-align-transform-fun #'java-mode)))
45 45
46(ert-deftest align-python ()
47 (ert-test-erts-file (ert-resource-file "python-mode.erts")
48 (test-align-transform-fun #'python-mode)))
49
46(ert-deftest align-toml () 50(ert-deftest align-toml ()
47 (let ((indent-tabs-mode nil)) 51 (let ((indent-tabs-mode nil))
48 (ert-test-erts-file (ert-resource-file "conf-toml-mode.erts") 52 (ert-test-erts-file (ert-resource-file "conf-toml-mode.erts")