From 65bdfd863c809db043c728f263a6adb3397aa69c Mon Sep 17 00:00:00 2001 From: Gracjan Polak Date: Tue, 15 Mar 2016 12:14:36 +0100 Subject: [PATCH] Convert all tabs to spaces --- haskell-cabal.el | 8 +- haskell-commands.el | 16 +-- haskell-font-lock.el | 24 ++--- haskell-interactive-mode.el | 12 +-- haskell-lexeme.el | 2 +- haskell-navigate-imports.el | 2 +- haskell-process.el | 6 +- haskell-session.el | 16 +-- haskell-sort-imports.el | 24 ++--- haskell.el | 2 +- tests/haskell-cabal-tests.el | 16 +-- tests/haskell-indent-tests.el | 66 ++++++------ tests/haskell-indentation-tests.el | 28 ++--- tests/haskell-mode-tests.el | 166 ++++++++++++++--------------- tests/haskell-string-tests.el | 30 +++--- 15 files changed, 209 insertions(+), 209 deletions(-) diff --git a/haskell-cabal.el b/haskell-cabal.el index fdaa74bc5..7a2e2425e 100644 --- a/haskell-cabal.el +++ b/haskell-cabal.el @@ -204,10 +204,10 @@ file), then this function returns nil." (let* ((file (haskell-cabal-find-file)) (dir (if file (file-name-directory file) default-directory))) (if use-defaults - dir - (haskell-utils-read-directory-name - (format "Cabal dir%s: " (if file (format " (guessed from %s)" (file-relative-name file)) "")) - dir)))) + dir + (haskell-utils-read-directory-name + (format "Cabal dir%s: " (if file (format " (guessed from %s)" (file-relative-name file)) "")) + dir)))) (defun haskell-cabal-compute-checksum (dir) "Compute MD5 checksum of package description file in DIR. diff --git a/haskell-commands.el b/haskell-commands.el index f63f2f492..1e9e9534f 100644 --- a/haskell-commands.el +++ b/haskell-commands.el @@ -527,8 +527,8 @@ of which the latter defaults to the current buffer." (or (haskell-session-get session 'current-dir) (haskell-session-get session 'cabal-dir) (if (buffer-file-name buffer) - (file-name-directory (buffer-file-name buffer)) - "~/"))) + (file-name-directory (buffer-file-name buffer)) + "~/"))) (defun haskell-session-prompt-set-current-dir (session &optional use-default) "Prompt for the current directory. @@ -537,8 +537,8 @@ Return current working directory for SESSION." (haskell-session-set-current-dir session (if use-default - default - (haskell-utils-read-directory-name "Set current directory: " default)))) + default + (haskell-utils-read-directory-name "Set current directory: " default)))) (haskell-session-get session 'current-dir)) (defun haskell-process-change-dir (session process dir) @@ -813,8 +813,8 @@ output. If CMD fails the buffer remains unchanged." (setq str (replace-match "" t t str))) str)) (_errout (lambda (fmt &rest args) - (let* ((warning-fill-prefix " ")) - (display-warning cmd (apply 'format fmt args) :warning)))) + (let* ((warning-fill-prefix " ")) + (display-warning cmd (apply 'format fmt args) :warning)))) (filename (buffer-file-name (current-buffer))) (cmd-prefix (replace-regexp-in-string " .*" "" cmd)) (tmp-file (make-temp-file cmd-prefix)) @@ -824,8 +824,8 @@ output. If CMD fails the buffer remains unchanged." (haskell-session-cabal-dir haskell-session) default-directory)) (_errcode (with-temp-file tmp-file - (call-process cmd filename - (list (current-buffer) err-file) nil))) + (call-process cmd filename + (list (current-buffer) err-file) nil))) (stderr-output (with-temp-buffer (insert-file-contents err-file) diff --git a/haskell-font-lock.el b/haskell-font-lock.el index 56816d14b..08a4c8df0 100644 --- a/haskell-font-lock.el +++ b/haskell-font-lock.el @@ -198,13 +198,13 @@ Regexp match data 0 points to the chars." (defun haskell-font-lock-symbols-keywords () (when (and haskell-font-lock-symbols - haskell-font-lock-symbols-alist) + haskell-font-lock-symbols-alist) `((,(regexp-opt (mapcar 'car haskell-font-lock-symbols-alist) t) (0 (haskell-font-lock-compose-symbol ',haskell-font-lock-symbols-alist) - ;; In Emacs-21, if the `override' field is nil, the face - ;; expressions is only evaluated if the text has currently - ;; no face. So force evaluation by using `keep'. - keep))))) + ;; In Emacs-21, if the `override' field is nil, the face + ;; expressions is only evaluated if the text has currently + ;; no face. So force evaluation by using `keep'. + keep))))) (defun haskell-font-lock-keywords () ;; this has to be a function because it depends on global value of @@ -437,13 +437,13 @@ Regexp match data 0 points to the chars." ((save-excursion (goto-char (nth 8 state)) (or (looking-at-p "\\(?:{- ?\\|-- \\)[|^*$]") - (and (looking-at-p "--") ; are we at double dash comment - (forward-line -1) ; this is nil on first line - (eq (get-text-property (line-end-position) 'face) - 'font-lock-doc-face) ; is a doc face - (forward-line) - (skip-syntax-forward "-") ; see if there is only whitespace - (eq (point) (nth 8 state))))) ; we are back in position + (and (looking-at-p "--") ; are we at double dash comment + (forward-line -1) ; this is nil on first line + (eq (get-text-property (line-end-position) 'face) + 'font-lock-doc-face) ; is a doc face + (forward-line) + (skip-syntax-forward "-") ; see if there is only whitespace + (eq (point) (nth 8 state))))) ; we are back in position 'font-lock-doc-face) (t 'font-lock-comment-face))) diff --git a/haskell-interactive-mode.el b/haskell-interactive-mode.el index 04f56357e..34eef0a40 100644 --- a/haskell-interactive-mode.el +++ b/haskell-interactive-mode.el @@ -337,13 +337,13 @@ SESSION, otherwise operate on the current buffer." (with-current-buffer (haskell-session-interactive-buffer session) (goto-char (point-max)) (insert (ansi-color-apply - (propertize text - 'font-lock-face 'haskell-interactive-face-result + (propertize text + 'font-lock-face 'haskell-interactive-face-result 'front-sticky t - 'prompt t - 'read-only t - 'rear-nonsticky t - 'result t))) + 'prompt t + 'read-only t + 'rear-nonsticky t + 'result t))) (haskell-interactive-mode-handle-h) (let ((marker (set (make-local-variable 'haskell-interactive-mode-result-end) (make-marker)))) diff --git a/haskell-lexeme.el b/haskell-lexeme.el index 4b2872968..127bc9450 100644 --- a/haskell-lexeme.el +++ b/haskell-lexeme.el @@ -29,7 +29,7 @@ (and (consp key) (> (car key) 128)) (and (numberp key) (> key 128))) (if (member val '(Pc Pd Po Sm Sc Sk So)) - (modify-category-entry key ?P)))) + (modify-category-entry key ?P)))) unicode-category-table) (dolist (key (string-to-list "!#$%&*+./<=>?@^|~\\-")) diff --git a/haskell-navigate-imports.el b/haskell-navigate-imports.el index 6a4e250ac..571576a61 100644 --- a/haskell-navigate-imports.el +++ b/haskell-navigate-imports.el @@ -99,7 +99,7 @@ (haskell-navigate-imports-line))) (forward-line)) (if (haskell-navigate-imports-line) - (point) + (point) nil))) (defun haskell-navigate-imports-line () diff --git a/haskell-process.el b/haskell-process.el index e5a4b3b8d..1f6a7f04b 100644 --- a/haskell-process.el +++ b/haskell-process.el @@ -86,7 +86,7 @@ HPTYPE is the result of calling `'haskell-process-type`' function." (apply haskell-process-wrapper-function (list (append (haskell-process-path-to-list haskell-process-path-ghci) - haskell-process-args-ghci))))) + haskell-process-args-ghci))))) ('cabal-repl (append (list (format "Starting inferior `cabal repl' process using %s ..." haskell-process-path-cabal) @@ -95,7 +95,7 @@ HPTYPE is the result of calling `'haskell-process-type`' function." (apply haskell-process-wrapper-function (list (append - (haskell-process-path-to-list haskell-process-path-cabal) + (haskell-process-path-to-list haskell-process-path-cabal) (list "repl") haskell-process-args-cabal-repl (let ((target (haskell-session-target session))) @@ -107,7 +107,7 @@ HPTYPE is the result of calling `'haskell-process-type`' function." (apply haskell-process-wrapper-function (list (append - (haskell-process-path-to-list haskell-process-path-stack) + (haskell-process-path-to-list haskell-process-path-stack) (list "ghci") (let ((target (haskell-session-target session))) (if target (list target) nil)) diff --git a/haskell-session.el b/haskell-session.el index e79a272d1..7d297bc64 100644 --- a/haskell-session.el +++ b/haskell-session.el @@ -65,7 +65,7 @@ (let ((dir (haskell-session-get a 'cabal-dir))) (if dir (if (string-prefix-p dir - (file-name-directory (buffer-file-name))) + (file-name-directory (buffer-file-name))) (if acc (if (and (> (length (haskell-session-get a 'cabal-dir)) @@ -155,9 +155,9 @@ If `haskell-process-load-or-reload-prompt' is nil, accept `default'." (let* ((maybe-target (haskell-session-get s 'target)) (target (if maybe-target maybe-target (let ((new-target - (if haskell-process-load-or-reload-prompt - (read-string "build target (empty for default):") - ""))) + (if haskell-process-load-or-reload-prompt + (read-string "build target (empty for default):") + ""))) (haskell-session-set-target s new-target))))) (if (not (string= target "")) target nil))) @@ -198,10 +198,10 @@ If `haskell-process-load-or-reload-prompt' is nil, accept `default'." "Get the session cabal-dir." (or (haskell-session-get s 'cabal-dir) (let ((set-dir (haskell-cabal-get-dir (not haskell-process-load-or-reload-prompt)))) - (if set-dir - (progn (haskell-session-set-cabal-dir s set-dir) - set-dir) - (haskell-session-cabal-dir s))))) + (if set-dir + (progn (haskell-session-set-cabal-dir s set-dir) + set-dir) + (haskell-session-cabal-dir s))))) (defun haskell-session-modify (session key update) "Update the value at KEY in SESSION with UPDATE." diff --git a/haskell-sort-imports.el b/haskell-sort-imports.el index 813a23286..bd676dc73 100644 --- a/haskell-sort-imports.el +++ b/haskell-sort-imports.el @@ -56,18 +56,18 @@ within that region." (haskell-sort-imports-goto-import-start)) (haskell-sort-imports-goto-group-start)) (let* ((start (point)) - (imports (haskell-sort-imports-collect-imports)) - (sorted (sort (cl-copy-list imports) - (lambda (a b) - (string< (haskell-sort-imports-normalize a) - (haskell-sort-imports-normalize b)))))) - (when (not (equal imports sorted)) - (delete-region start (point)) - (mapc (lambda (import) (insert import "\n")) sorted)) - (goto-char start) - (when (search-forward current-string nil t 1) - (forward-char (- (length current-string))) - (forward-char current-offset)))))) + (imports (haskell-sort-imports-collect-imports)) + (sorted (sort (cl-copy-list imports) + (lambda (a b) + (string< (haskell-sort-imports-normalize a) + (haskell-sort-imports-normalize b)))))) + (when (not (equal imports sorted)) + (delete-region start (point)) + (mapc (lambda (import) (insert import "\n")) sorted)) + (goto-char start) + (when (search-forward current-string nil t 1) + (forward-char (- (length current-string))) + (forward-char current-offset)))))) (defun haskell-sort-imports-normalize (i) "Normalize an import, if possible, so that it can be sorted." diff --git a/haskell.el b/haskell.el index daee14ca9..9f20cdd96 100644 --- a/haskell.el +++ b/haskell.el @@ -73,7 +73,7 @@ "A `completion-at-point' function using the current haskell process." (when (haskell-session-maybe) (let ((process (haskell-process)) - symbol-bounds) + symbol-bounds) (cond ;; ghci can complete module names, but it needs the "import " ;; string at the beginning diff --git a/tests/haskell-cabal-tests.el b/tests/haskell-cabal-tests.el index 3b354e64f..154367580 100644 --- a/tests/haskell-cabal-tests.el +++ b/tests/haskell-cabal-tests.el @@ -9,22 +9,22 @@ (with-temp-buffer (haskell-cabal-mode) (let ((scriptDir - (file-name-directory - (or (symbol-file 'haskell-cabal-enum-targets-1) - (buffer-file-name))))) + (file-name-directory + (or (symbol-file 'haskell-cabal-enum-targets-1) + (buffer-file-name))))) (setq default-directory (expand-file-name "test-data" scriptDir))) (should (equal '("Test" "test-1" "bench-1" "bin-1") - (haskell-cabal-enum-targets))))) + (haskell-cabal-enum-targets))))) (ert-deftest haskell-cabal-get-field-1 () (with-temp-buffer (let ((scriptDir - (file-name-directory - (or (symbol-file 'haskell-cabal-get-field-1) - (buffer-file-name))))) + (file-name-directory + (or (symbol-file 'haskell-cabal-get-field-1) + (buffer-file-name))))) (set-visited-file-name (expand-file-name "test-data/Source.hs" scriptDir) t t)) (should (equal "Simple" - (haskell-cabal-get-field "build-type"))))) + (haskell-cabal-get-field "build-type"))))) (ert-deftest haskell-cabal-compute-checksum-1 () (let ((scriptDir diff --git a/tests/haskell-indent-tests.el b/tests/haskell-indent-tests.el index d3cc15126..8e1ba682e 100644 --- a/tests/haskell-indent-tests.el +++ b/tests/haskell-indent-tests.el @@ -10,35 +10,35 @@ ;; even in batch mode. So we do not run this test. (skip-unless (< emacs-major-version 25)) (should (with-temp-buffer - (haskell-mode) - (haskell-indent-mode) - (insert (concat "module Test where\n" - "-- {{{ A header\n" - "--\n")) - (indent-for-tab-command) - t))) + (haskell-mode) + (haskell-indent-mode) + (insert (concat "module Test where\n" + "-- {{{ A header\n" + "--\n")) + (indent-for-tab-command) + t))) ;; haskell-indent-put-region-in-literate happens to be in haskell-indent ;; when the function is moved, move the tests also (ert-deftest haskell-indent-put-region-in-literate-1 () (should (equal "> literate" - (with-temp-buffer - (insert "literate") - (literate-haskell-mode) - (haskell-indent-put-region-in-literate (point-min) (point-max)) - (buffer-substring-no-properties (point-min) (point-max)))))) + (with-temp-buffer + (insert "literate") + (literate-haskell-mode) + (haskell-indent-put-region-in-literate (point-min) (point-max)) + (buffer-substring-no-properties (point-min) (point-max)))))) (ert-deftest haskell-indent-put-region-in-literate-2 () :expected-result (if (< emacs-major-version 24) - :failed - :passed) + :failed + :passed) (should (equal "literate" - (with-temp-buffer - (insert "> literate") - (literate-haskell-mode) - (haskell-indent-put-region-in-literate (point-min) (point-max) -1) - (buffer-substring-no-properties (point-min) (point-max)))))) + (with-temp-buffer + (insert "> literate") + (literate-haskell-mode) + (haskell-indent-put-region-in-literate (point-min) (point-max) -1) + (buffer-substring-no-properties (point-min) (point-max)))))) (defsubst string-trim-left (string) "Remove leading whitespace from STRING." @@ -653,25 +653,25 @@ test = [randomQQ| This is (hindent1-test "30* parse '[] identifier correctly" " instance Callable '[] " - (1 2)) + (1 2)) (hindent1-test "31* allow type class declaration without methods" " class Foo a where instance Bar Int " - (2 0)) + (2 0)) (hindent1-test "32* allow type operators" " data (:.) a b = a :. b " - (2 0 2)) + (2 0 2)) (hindent1-test "33* parse #else in CPP" " #ifdef FLAG foo = () #else " - (4 0)) + (4 0)) (hindent1-test "34 beginning of line inside parentheses" " @@ -691,7 +691,7 @@ az = Projection , maxR = pi } " - (6 2)) + (6 2)) (hindent1-test "35a* parse a backslash properly" " az = Projection @@ -701,7 +701,7 @@ az = Projection , maxR = pi } " - (6 2)) + (6 2)) (hindent1-test "36* yet another parser failure" " tokOpenTag = @@ -709,12 +709,12 @@ tokOpenTag = , return ] " - (4 7)) + (4 7)) (hindent1-test "37* Indent continuation lines in multiline string literal" " a = \"multiline\\ " - (2 4)) + (2 4)) (hindent1-test "38* Indent in do block after multiline string literal" " s = do @@ -730,20 +730,20 @@ servePost = do b <- queryT \"comma is important: , \\ \\ line 2 \" " - (6 0 2 4)) + (6 0 2 4)) (hindent1-test "40* parse error in multiline tuple" " a = ( 1 , " - (2 4) - (3 2)) + (2 4) + (3 2)) (hindent1-test "41 open do inside a list" " x = asum [ withX $ do return () ] " - (2 13)) + (2 13)) (hindent1-test "42 open do inside a list second element" " x = asum [ mzero @@ -751,7 +751,7 @@ x = asum [ mzero return () ] " - (3 13)) + (3 13)) (hindent1-test "43 open do inside a list second element, reset alignment" " x = asum [ mzero @@ -759,7 +759,7 @@ x = asum [ mzero return () ] " - (3 15)) + (3 15)) (hindent1-test "44 expression continues, reset alignment" " function = abc diff --git a/tests/haskell-indentation-tests.el b/tests/haskell-indentation-tests.el index 91e0c0252..176a9fd47 100644 --- a/tests/haskell-indentation-tests.el +++ b/tests/haskell-indentation-tests.el @@ -695,25 +695,25 @@ foo = [|forever $ do (hindent-test "30* parse '[] identifier correctly" " instance Callable '[] " - (1 2)) + (1 2)) (hindent-test "31* allow type class declaration without methods" " class Foo a where instance Bar Int " - (2 0)) + (2 0)) (hindent-test "32 allow type operators" " data (:.) a b = a :. b " - (2 0 16)) + (2 0 16)) (hindent-test "33* parse #else in CPP" " #ifdef FLAG foo = () #else " - (4 0)) + (4 0)) (hindent-test "34 beginning of line inside parentheses" " @@ -733,7 +733,7 @@ az = Projection , maxR = pi } " - (6 2)) + (6 2)) (hindent-test "35a parse a backslash properly" " az = Projection @@ -743,7 +743,7 @@ az = Projection , maxR = pi } " - (6 2)) + (6 2)) (hindent-test "36 yet another parser failure" " tokOpenTag = @@ -751,11 +751,11 @@ tokOpenTag = , return ] " - (4 7)) + (4 7)) (hindent-test "37* Indent continuation lines in multiline string literal" " a = \"multiline\\ " - (2 4)) + (2 4)) (hindent-test "38 Indent in do block after multiline string literal" " s = do @@ -771,20 +771,20 @@ servePost = do b <- queryT \"comma is important: , \\ \\ line 2 \" " - (6 0 2 4)) + (6 0 2 4)) (hindent-test "40 parse error in multiline tuple" " a = ( 1 , " - (2 4) - (3 2)) + (2 4) + (3 2)) (hindent-test "41 open do inside a list" " x = asum [ withX $ do return () ] " - (2 13)) + (2 13)) (hindent-test "42 open do inside a list second element" " x = asum [ mzero @@ -792,7 +792,7 @@ x = asum [ mzero return () ] " - (3 13)) + (3 13)) (hindent-test "43 open do inside a list second element, reset alignment" " x = asum [ mzero @@ -800,7 +800,7 @@ x = asum [ mzero return () ] " - (3 17)) + (3 17)) (hindent-test "44 expression continues, reset alignment" " function = abc diff --git a/tests/haskell-mode-tests.el b/tests/haskell-mode-tests.el index 238d5029f..09bdf2ba1 100644 --- a/tests/haskell-mode-tests.el +++ b/tests/haskell-mode-tests.el @@ -227,73 +227,73 @@ the beginning of the buffer. `fill-column' will be set to 10 so that it is easy to spot issues." (should (equal expected - (with-temp-buffer - (haskell-mode) - (setq fill-column 10) - (dolist (line initial) - (insert line) - (insert "\n")) - (goto-char (point-min)) - (skip-chars-forward "^@") - (if (eobp) - (goto-char (point-min)) - (delete-char 1)) - (fill-paragraph nil) - (split-string (buffer-substring-no-properties (point-min) (1- (point-max))) "\n"))))) + (with-temp-buffer + (haskell-mode) + (setq fill-column 10) + (dolist (line initial) + (insert line) + (insert "\n")) + (goto-char (point-min)) + (skip-chars-forward "^@") + (if (eobp) + (goto-char (point-min)) + (delete-char 1)) + (fill-paragraph nil) + (split-string (buffer-substring-no-properties (point-min) (1- (point-max))) "\n"))))) (ert-deftest fill-comment-1 () (check-fill '("{- a -}") - '("{- @a -}"))) + '("{- @a -}"))) (ert-deftest fill-comment-2 () (check-fill '("{- a b c d e" - "f g h i j" - "k -}") - '("{- @a b c d e f g h i j k -}"))) + "f g h i j" + "k -}") + '("{- @a b c d e f g h i j k -}"))) (ert-deftest fill-comment-3 () (check-fill '("{-" - "a" - "-}") - '("{-" - "@a" - "-}"))) + "a" + "-}") + '("{-" + "@a" + "-}"))) (ert-deftest fill-comment-4 () (check-fill '("{-" - "a b c d e" - "f g h i-}") - '("{-" - "@a" - "b" - "c" - "d e f g h i-}"))) + "a b c d e" + "f g h i-}") + '("{-" + "@a" + "b" + "c" + "d e f g h i-}"))) (ert-deftest fill-comment-5 () (check-fill '(" {-" - " a b c d e" - "f g h i" - " -}") - '(" {-" " @a b c d e f g h i" " -}"))) + " a b c d e" + "f g h i" + " -}") + '(" {-" " @a b c d e f g h i" " -}"))) (ert-deftest fill-comment-6 () (check-fill '(" -- a b c" - " -- d e f" - " -- g h i" - " -- j k l" - " -- m n o" - " -- p q r" - " -- s t u" - " -- v") - '(" -- @a b c d e f g h i j k l m n o p q r s t u v"))) + " -- d e f" + " -- g h i" + " -- j k l" + " -- m n o" + " -- p q r" + " -- s t u" + " -- v") + '(" -- @a b c d e f g h i j k l m n o p q r s t u v"))) (ert-deftest fill-comment-7 () (check-fill '(" -- a b" - " -- c d" - " -- e f" - " -- g h" - " -- i j") - '(" -- @a b c d e f g h i j "))) + " -- c d" + " -- e f" + " -- g h" + " -- i j") + '(" -- @a b c d e f g h i j "))) (ert-deftest fill-comment-8 () "Note: first letter of second line should be in the same column @@ -302,13 +302,13 @@ as first letter in the first line. Also should respect 10 column fill." :expected-result :failed (check-fill '(" {- a b" - " c d" - " e f" - " g h" - " i j" - " -}") - '(" {- @a b c d e f g h i j" - " -}"))) + " c d" + " e f" + " g h" + " i j" + " -}") + '(" {- @a b c d e f g h i j" + " -}"))) (ert-deftest fill-comment-9 () "Note: first letter in the second line position should be kept @@ -317,13 +317,13 @@ as defined, just the content should move properly. Also should respect 10 column fill." :expected-result :failed (check-fill '(" {- a b" - " c d e" - " f g h" - " i j" - " -}") - '(" {- @a" - " b c d e f g h i j" - " -}"))) + " c d e" + " f g h" + " i j" + " -}") + '(" {- @a" + " b c d e f g h i j" + " -}"))) (ert-deftest fill-comment-10 () "Note: first letter in the second line position should be kept @@ -333,15 +333,15 @@ lines should take position from second line. Also should respect 10 column fill." :expected-result :failed (check-fill '(" {- a b" - " c d e" - " f g h" - " i j" - " -}") - '(" {- @a" - " b c d e" - " f g h" - " i j" - " -}"))) + " c d e" + " f g h" + " i j" + " -}") + '(" {- @a" + " b c d e" + " f g h" + " i j" + " -}"))) (ert-deftest fill-comment-11 () "Note: first letter in the second line position should be kept @@ -350,11 +350,11 @@ as defined, just the content should move properly. Also should respect 10 column fill." :expected-result :failed (check-fill '(" -- a b" - " -- c d e" - " -- f g h" - " -- i j") - '(" -- @a" - " -- b c d e f g h i j"))) + " -- c d e" + " -- f g h" + " -- i j") + '(" -- @a" + " -- b c d e f g h i j"))) (ert-deftest fill-comment-12 () "Note: first letter in the second line position should be kept @@ -364,23 +364,23 @@ lines should take position from second line. Also should respect 10 column fill." :expected-result :failed (check-fill '(" -- a b" - " -- c d e" - " -- f g h" - " -- i j") - '(" -- @a" - " -- b c d e" - "--f g h" - " -- i j"))) + " -- c d e" + " -- f g h" + " -- i j") + '(" -- @a" + " -- b c d e" + "--f g h" + " -- i j"))) (ert-deftest fill-comment-haddock-1 () (check-fill '("-- | a b c" "-- d") - '("-- @| a b c d"))) + '("-- @| a b c d"))) (ert-deftest fill-comment-haddock-2 () (check-fill '("-- | a b c" "-- d e") - '("-- @| a b c d" + '("-- @| a b c d" "-- e"))) (ert-deftest insert-scc-feasible () diff --git a/tests/haskell-string-tests.el b/tests/haskell-string-tests.el index 2362fa39a..cac75250e 100644 --- a/tests/haskell-string-tests.el +++ b/tests/haskell-string-tests.el @@ -46,12 +46,12 @@ (ert-deftest haskell-string-literal-decode-empty () (dolist (s0 (list "\"\"" - "\"\\&\"" - "\"\\&\\&\\&\"" - "\"\\ \\\"" - "\"\\ \\\\ \\\"" - "\"\\&\\ \\\"" - "\"\\ \\\\&\\ \\\"")) + "\"\\&\"" + "\"\\&\\&\\&\"" + "\"\\ \\\"" + "\"\\ \\\\ \\\"" + "\"\\&\\ \\\"" + "\"\\ \\\\&\\ \\\"")) (should (string= "" (haskell-string-literal-decode s0))) (should (string= "" (haskell-string-literal-decode (substring s0 1 -1) t))))) @@ -95,15 +95,15 @@ (random "c7430a4") ;; some edge cases (dolist (s0 (list "\x0e\x48" ;; '\SO' 'H' - "\x01" ;; '\SOH' - "\x00df\x30" ;; '\223' '0' - "'" + "\x01" ;; '\SOH' + "\x00df\x30" ;; '\223' '0' + "'" "\'" - "\"" - "\x0e&H" - "\\" - " \\ \\" - "\\\\\"" + "\"" + "\x0e&H" + "\\" + " \\ \\" + "\\\\\"" (string 40 945 8322 946 8323 8743 947 178 949 178 41) "x" "xy" @@ -111,7 +111,7 @@ "\\ \\x123" " " " " - "")) ; + "")) (should (string= s0 (haskell-string-literal-decode (haskell-string-literal-encode s0)))) (should (string= s0 (haskell-string-literal-decode (haskell-string-literal-encode s0 t) t))))