Fixup #9614: make config file extraction from help text more robust (#9667)
* Fixup #9614: make config file extraction from help text more robust
The previous test (PR #9614) did not work when the config file was
absent, because then the help text would add one more line at the
end (see issue #535).
The new test looks for the exact line printed before the line with the
config file.
We test both scenarios, with config file present or absent.
* Trim lines before searching the marker to work around CRLF issues.
---------
Co-authored-by:
mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Showing
- cabal-install/src/Distribution/Client/Main.hs 4 additions, 0 deletionscabal-install/src/Distribution/Client/Main.hs
- cabal-testsuite/PackageTests/Help/HelpPrintsConfigFile/help-prints-config-file.out 1 addition, 0 deletions...sts/Help/HelpPrintsConfigFile/help-prints-config-file.out
- cabal-testsuite/PackageTests/Help/HelpPrintsConfigFile/help-prints-config-file.test.hs 40 additions, 13 deletions...Help/HelpPrintsConfigFile/help-prints-config-file.test.hs
- cabal-testsuite/src/Test/Cabal/Monad.hs 1 addition, 1 deletioncabal-testsuite/src/Test/Cabal/Monad.hs
Loading
Please register or sign in to comment