Skip to content

Commit

Permalink
Add more tests for code gen subcommands (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
desaikd authored Jun 6, 2024
1 parent ae8acdf commit bf3e5d7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Formula/ion-cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ def install
# Head should support all features of `ion-cli`
# Verify if `generate` subcommand exist on `beta` (`generate` is an experimental feature under `ion-cli`)
assert_match("generate", shell_output("ion beta generate --help"))
# Make an Ion schema file with simple type definition
(testpath/"example.isl").write "type::{ name: foo, type: int }"
# Generate code based on above schema file and assert that the exit status is 0 (successful)
shell_output("ion beta generate --directory #{testpath} --schema example.isl --language java --namespace org.example")
else
# Make sure that `ion --version` outputs the expected version number
assert_match("ion #{self.version}", shell_output("ion --version"))
Expand Down

0 comments on commit bf3e5d7

Please # to comment.