File tree 3 files changed +24
-27
lines changed
tests/UnitTests/Distribution/Client/Init
3 files changed +24
-27
lines changed Original file line number Diff line number Diff line change 13
13
-- Entry point to the default cabal-install front-end.
14
14
-----------------------------------------------------------------------------
15
15
16
- {-# OPTIONS_GHC -Wno-deferred-type-errors #-}
17
16
module Main (main ) where
18
17
19
18
import Distribution.Client.Setup
Original file line number Diff line number Diff line change @@ -71,32 +71,6 @@ tests v initFlags _comp pkgIx srcDb = testGroup "golden"
71
71
pkgName = evalPrompt (packageNamePrompt srcDb initFlags)
72
72
$ fromList [" test-package" , " y" ]
73
73
74
- -- goldenCabalTests
75
- -- :: Verbosity
76
- -- -> InstalledPackageIndex
77
- -- -> FilePath
78
- -- -> PackageName
79
- -- -> SourcePackageDb
80
- -- -> TestTree
81
- -- goldenCabalTests v pkgIx pkgDir pkgName srcDb = testGroup ".cabal golden tests"
82
- -- [ goldenVsString "Create lib .cabal project" (goldenCabal "lib-cabal.golden") $
83
- -- runGoldenCabal emptyFlags { packageType = Flag Library }
84
- -- , goldenVsString "Create lib+test .cabal project" (goldenCabal "lib-test-cabal.golden") $
85
- -- runGoldenCabal emptyFlags
86
- -- { packageType = Flag Library
87
- -- , initializeTestSuite = Flag True
88
- -- }
89
- -- , goldenVsString "Create lib .cabal project" (goldenCabal "exe-cabal.golden") $
90
- -- runGoldenCabal emptyFlags { packageType = Flag Executable }
91
- -- ]
92
- -- where
93
- -- runGoldenCabal flags =
94
- -- case _runPrompt (createProject v pkgIx srcDb flags) of
95
- -- Right (t, _) -> return . BS8.pack $ showFields'
96
- -- annCommentLines postProcessFieldLines
97
- -- 4 [mkCabalStanza opts t]
98
- -- Left e -> assertFailure $ show e
99
-
100
74
goldenPkgDescTests
101
75
:: Verbosity
102
76
-> SourcePackageDb
Original file line number Diff line number Diff line change
1
+ synopsis: Cabal init rewrite
2
+ pr: #7344
3
+ issues: #7273 #7256 #7255 #7251 #6758 #6864 #1074
4
+ significance: significant
5
+ description: {
6
+
7
+ - Restructures the `cabal init` command to fix historical
8
+ issues. All flags are preserved.
9
+ - Codebases for interactive and non-interactive flags
10
+ are disentangled.
11
+ - Data structures now exploit relevant stanza structure
12
+ and formatters only care about stanza data
13
+ - Heuristics and prompts have a pure and impure implementation.
14
+
15
+ - Sets default behavior to be `--interactive` as opposed to
16
+ `--non-interactive`.
17
+
18
+ - Rewrites tests to achieve 98% coverage
19
+ - Golden files now test every stanza individually
20
+ - Every flag is covered by a unit test
21
+ - Interactive, simple, and non-interactive workflows are
22
+ covered.
23
+
24
+ }
You can’t perform that action at this time.
0 commit comments