Skip to content

Use an expect test for cli tests#1126

Merged
emillon merged 1 commit intoocaml-ppx:masterfrom
emillon:cli-test-expect
Nov 5, 2019
Merged

Use an expect test for cli tests#1126
emillon merged 1 commit intoocaml-ppx:masterfrom
emillon:cli-test-expect

Conversation

@emillon
Copy link
Copy Markdown
Collaborator

@emillon emillon commented Nov 5, 2019

This removes the test generator and replaces it by a driver that runs ocamlformat. The output is compared by dune to test_cli.expected which handles promotion.

This removes a generator and many small files while keeping the promotion-based workflow, so I think it's valuable. What do you think?

Copy link
Copy Markdown
Collaborator

@gpetiot gpetiot left a comment

Choose a reason for hiding this comment

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

Looks good to me, and it will be easier to test every combination of options.

@emillon
Copy link
Copy Markdown
Collaborator Author

emillon commented Nov 5, 2019

We don't really need to test all the combinations though :)

This removes the test generator and replaces it by a driver that runs
ocamlformat. The output is compared by dune to `test_cli.expected` which
handles promotion.
@emillon
Copy link
Copy Markdown
Collaborator Author

emillon commented Nov 5, 2019

Thanks!

@emillon emillon merged commit da96db1 into ocaml-ppx:master Nov 5, 2019
@emillon emillon deleted the cli-test-expect branch November 5, 2019 13:47
emillon added a commit to emillon/ocamlformat that referenced this pull request Nov 19, 2019
Test generators are a bit heavy, but running processes through ocaml is
a bit limited when we want to set a working directory or environment.

So, let's use a middle ground solution: run ocamlformat through dune,
but write the rules by hand.
emillon added a commit to emillon/ocamlformat that referenced this pull request Nov 19, 2019
Test generators are a bit heavy, but running processes through ocaml is
a bit limited when we want to set a working directory or environment.

So, let's use a middle ground solution: run ocamlformat through dune,
but write the rules by hand.
emillon added a commit to emillon/ocamlformat that referenced this pull request Nov 22, 2019
Test generators are a bit heavy, but running processes through ocaml is
a bit limited when we want to set a working directory or environment.

So, let's use a middle ground solution: run ocamlformat through dune,
but write the rules by hand.
emillon added a commit to emillon/ocamlformat that referenced this pull request Nov 22, 2019
Test generators are a bit heavy, but running processes through ocaml is
a bit limited when we want to set a working directory or environment.

So, let's use a middle ground solution: run ocamlformat through dune,
but write the rules by hand.
emillon added a commit that referenced this pull request Nov 22, 2019
Test generators are a bit heavy, but running processes through ocaml is
a bit limited when we want to set a working directory or environment.

So, let's use a middle ground solution: run ocamlformat through dune,
but write the rules by hand.
bogdan2412 pushed a commit to bogdan2412/ocamlformat that referenced this pull request Mar 28, 2020
This removes the test generator and replaces it by a driver that runs
ocamlformat. The output is compared by dune to `test_cli.expected` which
handles promotion.
bogdan2412 pushed a commit to bogdan2412/ocamlformat that referenced this pull request Mar 28, 2020
Test generators are a bit heavy, but running processes through ocaml is
a bit limited when we want to set a working directory or environment.

So, let's use a middle ground solution: run ocamlformat through dune,
but write the rules by hand.
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.

3 participants