File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -757,4 +757,26 @@ function = abc
757757 def
758758 xyz"
759759 ((3 0 ) 0 7 ))
760+
761+
762+ (ert-deftest haskell-indentation-ret-indents ()
763+ (switch-to-buffer (get-buffer-create " source.hs" ))
764+ (haskell-mode )
765+ (insert " main = do" )
766+ (execute-kbd-macro (kbd " <RET>" ))
767+ (should (equal 2 (count-lines (point-min ) (point ))))
768+ (should (equal 2 (- (point ) (line-beginning-position )))))
769+
770+ (ert-deftest haskell-indentation-tab-and-backtab ()
771+ (switch-to-buffer (get-buffer-create " source.hs" ))
772+ (haskell-mode )
773+ (insert " main = do\n lala\n " )
774+ (execute-kbd-macro (kbd " TAB" ))
775+ (should (equal 4 (count-lines (point-min ) (point ))))
776+ (should (equal 4 (- (point ) (line-beginning-position ))))
777+ (execute-kbd-macro (kbd " <backtab>" ))
778+ (should (equal 4 (count-lines (point-min ) (point ))))
779+ (should (equal 2 (- (point ) (line-beginning-position )))))
780+
781+
760782; ;; haskell-indentation-tests.el ends here
You can’t perform that action at this time.
0 commit comments