eclipse-archived / ceylon.formatter

A formatter for the Ceylon programming language, written in Ceylon.
Apache License 2.0
14 stars 11 forks source link

CLI tests #118

Closed lucaswerkmeister closed 9 years ago

lucaswerkmeister commented 9 years ago

We desperately need tests for the CLI – how file redirection and output works. Probably not as ceylon.test tests though, I think this would be simpler to test using some (shell) scripts.

lucaswerkmeister commented 9 years ago

Basically, the steps for each test are:

  1. create file structure
  2. run CLI formatter
  3. compare file structure to expected file structure
lucaswerkmeister commented 9 years ago

And the easiest way to do that might be to have one folder per test, and inside that:

and the test is simply to run command in the folder and then compare the trees of result-expected and result-actual (where result-actual is what the formatter produced).