Skip to content

Commit d37626a

Browse files
committed
Add empty string local parser test
1 parent ef6cc13 commit d37626a

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
@@ -85,6 +85,7 @@ parserTests =
8585
, testCase "read local-no-index-repos" testLocalNoIndexRepos
8686
, testCase "set explicit provenance" testProjectConfigProvenance
8787
, testCase "read project-config-local-packages" testProjectConfigLocalPackages
88+
, testCase "read project-config-local-packages-empty-string" testProjectConfigLocalPackagesEmptyString
8889
, testCase "read project-config-all-packages" testProjectConfigAllPackages
8990
, testCase "read project-config-specific-packages" testProjectConfigSpecificPackages
9091
, testCase "test projectConfigAllPackages concatenation" testAllPackagesConcat
@@ -418,6 +419,14 @@ testProjectConfigLocalPackages = do
418419
packageConfigTestTestOptions = [toPathTemplate "--some-option", toPathTemplate "42"]
419420
packageConfigBenchmarkOptions = [toPathTemplate "--some-benchmark-option", toPathTemplate "--another-option"]
420421

422+
testProjectConfigLocalPackagesEmptyString :: Assertion
423+
testProjectConfigLocalPackagesEmptyString = do
424+
(config, legacy) <- readConfig "project-config-local-packages" "cabal.empty-string.project"
425+
assertConfigEquals expected config legacy (field . projectConfigLocalPackages . snd . condTreeData)
426+
where
427+
field = packageConfigTestHumanLog
428+
expected = NoFlag
429+
421430
testProjectConfigAllPackages :: Assertion
422431
testProjectConfigAllPackages = do
423432
(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)