Skip to content

Commit

Permalink
Add to contributing and cabal-testsuite's readme
Browse files Browse the repository at this point in the history
  • Loading branch information
philderbeast committed Dec 24, 2024
1 parent 14850de commit 4b79ccc
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
9 changes: 6 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -395,9 +395,12 @@ description: {
}
```

Changelogs may also be written in "markdown-frontmatter" format. This is useful if your
description contains braces, which must be escaped with backslashes in `.cabal` file
format. The front matter is in YAML syntax, not `.cabal` file syntax, and the file
Changelogs may also be written in "markdown-frontmatter" format. This is useful
if your description contains braces, which must be escaped with backslashes in
`.cabal` file format. Another benefit of using an `.md` extension with your
changelog is that it will be checked for typos.

The front matter is in YAML syntax, not `.cabal` file syntax, and the file
_must_ begin with a line containing only hyphens.

```markdown
Expand Down
4 changes: 4 additions & 0 deletions cabal-testsuite/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,10 @@ variants of a command (e.g., `cabal'` rather than `cabal`) and use
`assertOutputContains`. Note that this will search over BOTH stdout
and stderr.

For convenience, paste expected multiline string values verbatim into a text
file and read these with `readFileVerbatim`. The suggested extension for these
files are `.expect.txt`.

**How do I skip running a test in some environments?** Use the
`skipIf` and `skipUnless` combinators. Useful parameters to test
these with include `hasSharedLibraries`, `hasProfiledLibraries`,
Expand Down
6 changes: 3 additions & 3 deletions changelog.d/pr-10646.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ expectations for `cabal-testsuite/PackageTests/**/*.test.hs` test scripts might
be have been easier but for a catch. We run these tests with older `GHC`
versions so would need to use `-XCPP` for those versions and the C preprocessor
does not play nicely with string gaps. While it is possible to encode a
multiline string as a single line with in embedded LF characters or by breaking
the line up arbitrarily and using `++` concatenation or by calling unlines on a
list of lines, string gaps are the multiline strings of Haskell prior to
multiline string as a single line with embedded LF characters or by breaking the
line up arbitrarily and using `++` concatenation or by calling unlines on a list
of lines, string gaps are the multiline strings of Haskell prior to
`-XMultilineStrings`.

To avoid these problems and for the convenience of pasting the expected value
Expand Down

0 comments on commit 4b79ccc

Please sign in to comment.