Skip to content

Commit 7e7f319

Browse files
committed
Add empty string local parser test
1 parent 5c1b518 commit 7e7f319

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

‎cabal-install/parser-tests/Tests/ParserTests.hs‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ parserTests =
8686
, testCase "read local-no-index-repos" testLocalNoIndexRepos
8787
, testCase "set explicit provenance" testProjectConfigProvenance
8888
, testCase "read project-config-local-packages" testProjectConfigLocalPackages
89+
, testCase "read project-config-local-packages-empty-string" testProjectConfigLocalPackagesEmptyString
8990
, testCase "read project-config-all-packages" testProjectConfigAllPackages
9091
, testCase "read project-config-specific-packages" testProjectConfigSpecificPackages
9192
, testCase "test projectConfigAllPackages concatenation" testAllPackagesConcat
@@ -419,6 +420,14 @@ testProjectConfigLocalPackages = do
419420
packageConfigTestTestOptions = [toPathTemplate "--some-option", toPathTemplate "42"]
420421
packageConfigBenchmarkOptions = [toPathTemplate "--some-benchmark-option", toPathTemplate "--another-option"]
421422

423+
testProjectConfigLocalPackagesEmptyString :: Assertion
424+
testProjectConfigLocalPackagesEmptyString = do
425+
(config, legacy) <- readConfig "project-config-local-packages" "cabal.empty-string.project"
426+
assertConfigEquals expected config legacy (field . projectConfigLocalPackages . snd . condTreeData)
427+
where
428+
field = packageConfigTestHumanLog
429+
expected = NoFlag
430+
422431
testProjectConfigAllPackages :: Assertion
423432
testProjectConfigAllPackages = do
424433
(config, legacy) <- readConfigDefault "project-config-all-packages"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
test-log:

0 commit comments

Comments
 (0)