@@ -65,6 +65,10 @@ tests = testGroup "Language.Haskell.Stylish.Step.Imports.Tests"
65
65
, testCase " case 31" case31
66
66
, testCase " case 32" case32
67
67
, testCase " case 33" case33
68
+ , testCase " case 34" case34
69
+ , testCase " case 35" case35
70
+ , testCase " case 36" case36
71
+ , testCase " case 37" case37
68
72
]
69
73
70
74
@@ -885,3 +889,37 @@ case33 = assertSnippet (step Nothing defaultOptions {postQualified = True})
885
889
, " import Data.Foo (Foo (Bar, Foo), Goo (Goo))"
886
890
, " import Data.Set (empty, intersect, nub)"
887
891
]
892
+
893
+ --------------------------------------------------------------------------------
894
+ case34 :: Assertion
895
+ case34 = assertSnippet (step Nothing defaultOptions {postQualified = True })
896
+ [ " import qualified Data.Aeson as JSON (Value)"
897
+ ]
898
+ [ " import Data.Aeson qualified as JSON (Value)"
899
+ ]
900
+
901
+ --------------------------------------------------------------------------------
902
+ case35 :: Assertion
903
+ case35 = assertSnippet (step Nothing defaultOptions {postQualified = True })
904
+ [ " import Data.Aeson qualified as JSON (Value)"
905
+ ]
906
+ [ " import Data.Aeson qualified as JSON (Value)"
907
+ ]
908
+
909
+ --------------------------------------------------------------------------------
910
+ case36 :: Assertion
911
+ case36 = assertSnippet (step Nothing defaultOptions {postQualified = True })
912
+ [ " import qualified Data.Aeson as JSON (Value)"
913
+ , " import qualified Data.Aeson as JSON (encode, decode)"
914
+ ]
915
+ [ " import Data.Aeson qualified as JSON (Value, decode, encode)"
916
+ ]
917
+
918
+ --------------------------------------------------------------------------------
919
+ case37 :: Assertion
920
+ case37 = assertSnippet (step Nothing defaultOptions {postQualified = True })
921
+ [ " import Data.Aeson qualified as JSON (Value)"
922
+ , " import Data.Aeson qualified as JSON (encode, decode)"
923
+ ]
924
+ [ " import Data.Aeson qualified as JSON (Value, decode, encode)"
925
+ ]
0 commit comments