Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(cabal.project parser): parse the packages ending with eof #222

Merged
merged 5 commits into from
Feb 6, 2024

Conversation

shivaraj-bh
Copy link
Contributor

To reproduce:

git clone git@github.com:srid/haskell-flake.git
curl https://github.com/raw/shivaraj-bh/haskell-flake/c80a145a228631161a16fcbb5edbc6a5171803ad/test/with-subdir/cabal.project > test/with-subdir/cabal.project
, test

@shivaraj-bh shivaraj-bh changed the title fix(parser): parse the packages ending with eof fix(cabal.project parser): parse the packages ending with eof Feb 5, 2024
Copy link
Owner

@srid srid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a unit test for this case (ending with eof) here?

cabalProjectTests =
let
eval = s:
let res = parser.parseCabalProjectPackages s; in
if res.type == "success" then res.value else res;
in
{
testSimple = {
expr = eval ''
packages:
foo
bar
'';
expected = [ "foo" "bar" ];
};
};

@shivaraj-bh
Copy link
Contributor Author

@srid unit test added

@srid srid merged commit 56c5550 into srid:master Feb 6, 2024
1 check passed
@shivaraj-bh shivaraj-bh deleted the parse-eof branch February 6, 2024 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants