branch: scratch/editorconfig-cc commit b33e5568ff166ed7ecdf2bb2734f68c862b2fc3b Author: 10sr <8.slas...@gmail.com> Commit: Stefan Monnier <monn...@iro.umontreal.ca>
Add test for various normal whitespace Currently core-handle fails to parse files that contain whitespaces like line breaks, horizontal space, vertical space, etc. #161 --- ert-tests/editorconfig-core-handle.el | 6 ++++++ ert-tests/whitespaces/example-editorconfig.txt | 12 ++++++++++++ 2 files changed, 18 insertions(+) diff --git a/ert-tests/editorconfig-core-handle.el b/ert-tests/editorconfig-core-handle.el index de319fe1ae..41d96105fb 100644 --- a/ert-tests/editorconfig-core-handle.el +++ b/ert-tests/editorconfig-core-handle.el @@ -47,4 +47,10 @@ (concat fixtures "a.js")) '((("key" . "value")))))) + + ;; For checking various normal whitespace (line breaks, horizontal space, vertical space, etc.) + (let* ((conf (concat default-directory + "ert-tests/whitespaces/example-editorconfig.txt")) + (handle (editorconfig-core-handle conf))) + (should (editorconfig-core-handle-p handle))) ) diff --git a/ert-tests/whitespaces/example-editorconfig.txt b/ert-tests/whitespaces/example-editorconfig.txt new file mode 100644 index 0000000000..0472294c42 --- /dev/null +++ b/ert-tests/whitespaces/example-editorconfig.txt @@ -0,0 +1,12 @@ +root = true + +[*] + +# Text encoding name. +charset = utf-8 + +# Page Break + + +# Remove trailing whitespace on lines? +trim_trailing_whitespace = true