diff options
| author | Stefan Kangas | 2023-08-03 00:48:23 +0200 |
|---|---|---|
| committer | Stefan Kangas | 2023-08-03 00:49:02 +0200 |
| commit | daa174e56be6dedbf6f1f5dc197c4a442e901809 (patch) | |
| tree | b1c4c978c49a05ecb173557a411368ac5d64073a /test | |
| parent | 3c44d7a1b70a2f7c813c9034bb3e28932a1a66c9 (diff) | |
| download | emacs-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.erts | 29 | ||||
| -rw-r--r-- | test/lisp/align-tests.el | 4 |
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 @@ | |||
| 1 | Name: align assignments | ||
| 2 | |||
| 3 | =-= | ||
| 4 | foo = "bar" | ||
| 5 | x = 1 | ||
| 6 | zzzzz = True | ||
| 7 | y = None | ||
| 8 | =-= | ||
| 9 | foo = "bar" | ||
| 10 | x = 1 | ||
| 11 | zzzzz = True | ||
| 12 | y = None | ||
| 13 | =-=-= | ||
| 14 | |||
| 15 | Name: python-chain-logic and basic-line-continuation | ||
| 16 | |||
| 17 | =-= | ||
| 18 | if foo or\ | ||
| 19 | b and \ | ||
| 20 | bcxxx and \ | ||
| 21 | c: | ||
| 22 | pass | ||
| 23 | =-= | ||
| 24 | if 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") |