From 4cd9a06f1f5d313447ea233bcd80e89a73e707af Mon Sep 17 00:00:00 2001 From: Alexey Khudyakov Date: Tue, 6 Oct 2015 12:17:25 +0300 Subject: [PATCH 1/2] Add failing tests for indentation --- tests/haskell-indentation-tests.el | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tests/haskell-indentation-tests.el b/tests/haskell-indentation-tests.el index 57c79d621..b8d1a701f 100644 --- a/tests/haskell-indentation-tests.el +++ b/tests/haskell-indentation-tests.el @@ -604,5 +604,24 @@ test = [randomQQ| This is " ((4 0) 0 7)) +(hindent-test "30 parse '[] identifier correctly" " +instance Callable '[] +" + ((1 0) 2)) +(hindent-test "31 allow type class declaration without methods" " +class Foo a where +instance Bar Int +" + ((2 0) 0)) +(hindent-test "32 allow type operators" " +data (:.) a b = a :. b +" + ((2 0) 16)) +(hindent-test "33 parse #else in CPP" " +#ifdef FLAG +foo = () +#else +" + ((4 0) 4)) ;;; haskell-indentation-tests.el ends here From 87642581bd64428245f83c00a992db02e0f560d0 Mon Sep 17 00:00:00 2001 From: Alexey Khudyakov Date: Tue, 6 Oct 2015 15:37:30 +0300 Subject: [PATCH 2/2] Add stars to test numbers and fix some expected indentation as well --- tests/haskell-indentation-tests.el | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/haskell-indentation-tests.el b/tests/haskell-indentation-tests.el index b8d1a701f..b51a6d192 100644 --- a/tests/haskell-indentation-tests.el +++ b/tests/haskell-indentation-tests.el @@ -604,24 +604,24 @@ test = [randomQQ| This is " ((4 0) 0 7)) -(hindent-test "30 parse '[] identifier correctly" " +(hindent-test "30* parse '[] identifier correctly" " instance Callable '[] " ((1 0) 2)) -(hindent-test "31 allow type class declaration without methods" " +(hindent-test "31* allow type class declaration without methods" " class Foo a where instance Bar Int " ((2 0) 0)) -(hindent-test "32 allow type operators" " +(hindent-test "32* allow type operators" " data (:.) a b = a :. b " - ((2 0) 16)) -(hindent-test "33 parse #else in CPP" " + ((2 0) 0 16)) +(hindent-test "33* parse #else in CPP" " #ifdef FLAG foo = () #else " - ((4 0) 4)) + ((4 0) 0)) ;;; haskell-indentation-tests.el ends here