Skip to content

Commit 96375e5

Browse files
committed
Adapting tests' outputs and fixing naming
1 parent d1736bd commit 96375e5

File tree

9 files changed

+10
-71
lines changed

9 files changed

+10
-71
lines changed

cabal-install/tests/UnitTests/Distribution/Client/Init/Golden.hs

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ goldenExeTests
110110
-> PackageName
111111
-> TestTree
112112
goldenExeTests v pkgIx pkgDir pkgName = testGroup "exe golden tests"
113-
[ goldenVsString "Empty flags, not simple, no options"
114-
(goldenExe "exe.golden") $
113+
[ goldenVsString "Empty flags, not simple, no options, no comments"
114+
(goldenExe "exe-no-comments.golden") $
115115
let opts = WriteOpts False False True v pkgDir Executable pkgName defaultCabalVersion
116116
in runGoldenExe opts exeArgs emptyFlags
117117

@@ -148,12 +148,13 @@ goldenLibTests
148148
-> PackageName
149149
-> TestTree
150150
goldenLibTests v pkgIx pkgDir pkgName = testGroup "lib golden tests"
151-
[ goldenVsString "Empty flags, not simple, no options"
152-
(goldenLib "lib.golden") $
151+
[ goldenVsString "Empty flags, not simple, no options, no comments"
152+
(goldenLib "lib-no-comments.golden") $
153153
let opts = WriteOpts False False True v pkgDir Library pkgName defaultCabalVersion
154154
in runGoldenLib opts libArgs emptyFlags
155155

156-
, goldenVsString "Empty flags, simple, no options" (goldenLib "lib-simple.golden") $
156+
, goldenVsString "Empty flags, simple, no options, no comments"
157+
(goldenLib "lib-simple-no-comments.golden") $
157158
let opts = WriteOpts False False True v pkgDir Library pkgName defaultCabalVersion
158159
in runGoldenLib opts libArgs emptyFlags
159160

@@ -190,8 +191,8 @@ goldenTestTests
190191
-> PackageName
191192
-> TestTree
192193
goldenTestTests v pkgIx pkgDir pkgName = testGroup "test golden tests"
193-
[ goldenVsString "Empty flags, not simple, no options"
194-
(goldenTest "test.golden") $
194+
[ goldenVsString "Empty flags, not simple, no options, no comments"
195+
(goldenTest "test-no-comments.golden") $
195196
let opts = WriteOpts False False True v pkgDir Library pkgName defaultCabalVersion
196197
in runGoldenTest opts testArgs emptyFlags
197198

@@ -215,8 +216,8 @@ goldenTestTests v pkgIx pkgDir pkgName = testGroup "test golden tests"
215216
let opts = WriteOpts False False False v pkgDir Library pkgName defaultCabalVersion
216217
in runGoldenTest opts testArgs (emptyFlags {buildTools = Flag ["happy"]})
217218

218-
, goldenVsString "Standalone tests, empty flags, not simple, no options"
219-
(goldenTest "standalone-test.golden") $
219+
, goldenVsString "Standalone tests, empty flags, not simple, no options, no comments"
220+
(goldenTest "standalone-test-no-comments.golden") $
220221
let opts = WriteOpts False False True v pkgDir TestSuite pkgName defaultCabalVersion
221222
in runGoldenTest opts testArgs emptyFlags
222223

cabal-install/tests/fixtures/init/golden/cabal/cabal-lib-and-exe-no-comments.golden

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,16 @@ cabal-version: 3.0
22
name: y
33
version: 0.1.0.0
44
synopsis: synopsis
5-
6-
-- A longer description of the package.
75
-- description:
86
homepage: home
97
license: BSD-3-Clause
108
license-file: LICENSE
119
author: foo-kmett
1210
maintainer: [email protected]
13-
14-
-- A copyright notice.
1511
-- copyright:
1612
category: Data
1713
build-type: Simple
1814
extra-doc-files: CHANGELOG.md
19-
20-
-- Extra source files to be distributed with the package, such as examples, or a tutorial module.
2115
-- extra-source-files:
2216

2317
common warnings
@@ -26,11 +20,7 @@ common warnings
2620
library
2721
import: warnings
2822
exposed-modules: MyLib
29-
30-
-- Modules included in this library but not exported.
3123
-- other-modules:
32-
33-
-- LANGUAGE extensions used by modules in this package.
3424
-- other-extensions:
3525
build-depends: base
3626
hs-source-dirs: src
@@ -39,11 +29,7 @@ library
3929
executable y
4030
import: warnings
4131
main-is: Main.hs
42-
43-
-- Modules included in this executable, other than Main.
4432
-- other-modules:
45-
46-
-- LANGUAGE extensions used by modules in this package.
4733
-- other-extensions:
4834
build-depends:
4935
base,
@@ -55,11 +41,7 @@ executable y
5541
test-suite y-test
5642
import: warnings
5743
default-language: Haskell2010
58-
59-
-- Modules included in this executable, other than Main.
6044
-- other-modules:
61-
62-
-- LANGUAGE extensions used by modules in this package.
6345
-- other-extensions:
6446
type: exitcode-stdio-1.0
6547
hs-source-dirs: test

cabal-install/tests/fixtures/init/golden/cabal/cabal-lib-no-comments.golden

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,16 @@ cabal-version: 3.0
22
name: y
33
version: 0.1.0.0
44
synopsis: synopsis
5-
6-
-- A longer description of the package.
75
-- description:
86
homepage: home
97
license: BSD-3-Clause
108
license-file: LICENSE
119
author: foo-kmett
1210
maintainer: [email protected]
13-
14-
-- A copyright notice.
1511
-- copyright:
1612
category: Data
1713
build-type: Simple
1814
extra-doc-files: CHANGELOG.md
19-
20-
-- Extra source files to be distributed with the package, such as examples, or a tutorial module.
2115
-- extra-source-files:
2216

2317
common warnings
@@ -26,11 +20,7 @@ common warnings
2620
library
2721
import: warnings
2822
exposed-modules: MyLib
29-
30-
-- Modules included in this library but not exported.
3123
-- other-modules:
32-
33-
-- LANGUAGE extensions used by modules in this package.
3424
-- other-extensions:
3525
build-depends: base
3626
hs-source-dirs: src
@@ -39,11 +29,7 @@ library
3929
test-suite y-test
4030
import: warnings
4131
default-language: Haskell2010
42-
43-
-- Modules included in this executable, other than Main.
4432
-- other-modules:
45-
46-
-- LANGUAGE extensions used by modules in this package.
4733
-- other-extensions:
4834
type: exitcode-stdio-1.0
4935
hs-source-dirs: test

cabal-install/tests/fixtures/init/golden/cabal/cabal-test-suite-no-comments.golden

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,16 @@ cabal-version: 3.0
22
name: y
33
version: 0.1.0.0
44
synopsis: synopsis
5-
6-
-- A longer description of the package.
75
-- description:
86
homepage: home
97
license: BSD-3-Clause
108
license-file: LICENSE
119
author: foo-kmett
1210
maintainer: [email protected]
13-
14-
-- A copyright notice.
1511
-- copyright:
1612
category: Data
1713
build-type: Simple
1814
extra-doc-files: CHANGELOG.md
19-
20-
-- Extra source files to be distributed with the package, such as examples, or a tutorial module.
2115
-- extra-source-files:
2216

2317
common warnings
@@ -26,11 +20,7 @@ common warnings
2620
test-suite y-test
2721
import: warnings
2822
default-language: Haskell2010
29-
30-
-- Modules included in this executable, other than Main.
3123
-- other-modules:
32-
33-
-- LANGUAGE extensions used by modules in this package.
3424
-- other-extensions:
3525
type: exitcode-stdio-1.0
3626
hs-source-dirs: test

cabal-install/tests/fixtures/init/golden/exe/exe.golden renamed to cabal-install/tests/fixtures/init/golden/exe/exe-no-comments.golden

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
executable y
22
import: warnings
33
main-is: Main.hs
4-
5-
-- Modules included in this executable, other than Main.
64
-- other-modules:
7-
8-
-- LANGUAGE extensions used by modules in this package.
95
-- other-extensions:
106
build-depends: base
117
hs-source-dirs: exe

cabal-install/tests/fixtures/init/golden/lib/lib-simple.golden renamed to cabal-install/tests/fixtures/init/golden/lib/lib-no-comments.golden

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
library
22
import: warnings
33
exposed-modules: MyLib
4-
5-
-- Modules included in this library but not exported.
64
-- other-modules:
7-
8-
-- LANGUAGE extensions used by modules in this package.
95
-- other-extensions:
106
build-depends: base
117
hs-source-dirs: src

cabal-install/tests/fixtures/init/golden/lib/lib.golden renamed to cabal-install/tests/fixtures/init/golden/lib/lib-simple-no-comments.golden

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
library
22
import: warnings
33
exposed-modules: MyLib
4-
5-
-- Modules included in this library but not exported.
64
-- other-modules:
7-
8-
-- LANGUAGE extensions used by modules in this package.
95
-- other-extensions:
106
build-depends: base
117
hs-source-dirs: src

cabal-install/tests/fixtures/init/golden/test/test.golden renamed to cabal-install/tests/fixtures/init/golden/test/standalone-test-no-comments.golden

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
test-suite y-test
22
import: warnings
33
default-language: Haskell2010
4-
5-
-- Modules included in this executable, other than Main.
64
-- other-modules:
7-
8-
-- LANGUAGE extensions used by modules in this package.
95
-- other-extensions:
106
type: exitcode-stdio-1.0
117
hs-source-dirs: test

cabal-install/tests/fixtures/init/golden/test/standalone-test.golden renamed to cabal-install/tests/fixtures/init/golden/test/test-no-comments.golden

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
test-suite y-test
22
import: warnings
33
default-language: Haskell2010
4-
5-
-- Modules included in this executable, other than Main.
64
-- other-modules:
7-
8-
-- LANGUAGE extensions used by modules in this package.
95
-- other-extensions:
106
type: exitcode-stdio-1.0
117
hs-source-dirs: test

0 commit comments

Comments
 (0)