Skip to content

cabal init --tests does not create any tests if not using --lib{andexe} #7410

Closed
@kindaro

Description

@kindaro

Describe the bug

cabal init --tests does not create any tests.

To Reproduce

% cabal init --tests
Warning: The package list for 'hackage.haskell.org' is 23 days old.
Run 'cabal update' to get the latest list of available packages.

Guessing dependencies...

Generating LICENSE...
Warning: unknown license type, you must put a copy in LICENSE yourself.
Generating CHANGELOG.md...
Generating app/Main.hs...
Generating example.cabal...

Warning: no synopsis given. You should edit the .cabal file and add one.
You may want to edit the .cabal file and add a Description field.
% tree
.
├── app
│   └── Main.hs
├── CHANGELOG.md
└── example.cabal

1 directory, 3 files

Expected behavior

A directory is created with some tests. The tests are wired into example.cabal as appropriate.

System information

% cabal --version
cabal-install version 3.4.0.0
compiled using version 3.4.0.0 of the Cabal library 
% uname
Linux

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions