Skip to content

Commit

Permalink
passed spec
Browse files Browse the repository at this point in the history
  • Loading branch information
at-grandpa committed Jul 7, 2018
1 parent d6326ae commit d0f2546
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 102 deletions.
10 changes: 0 additions & 10 deletions spec/clim/compile_time_error_spec/compile_time_error_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,6 @@ describe "Compile time spec, " do
^
ERROR
end
it "sub command with custom_help." do
`crystal run spec/clim/compile_time_error_spec/files/sub_command_with_custom_help.cr --no-color 2>&1`.should eq <<-ERROR
Error in spec/clim/compile_time_error_spec/files/sub_command_with_custom_help.cr:8: Can not be declared 'custom_help' as sub command.
custom_help do |desc, usage, options_help, sub_commands|
^~~~~~~~~~~
ERROR
end
end

This file was deleted.

66 changes: 0 additions & 66 deletions spec/clim/dsl_spec/main_command_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -657,69 +657,3 @@ spec(
]
)
{% end %}

{% begin %}
{%
main_help_message = <<-HELP_MESSAGE
command description: my desc message.
command usage: my usage message.
options:
--uint8=VALUE Option description. [type:UInt8]
--uint16=VALUE Option description. [type:UInt16]
--help Show this help.
sub_commands:
sub_command1 sub command 1.
sub_command2 sub command 2.
HELP_MESSAGE
%}

spec(
spec_class_name: MainCommandCustomHelpSpec,
spec_dsl_lines: [
"desc \"my desc message.\"",
"usage \"my usage message.\"",
"option \"--uint8=VALUE\", type: UInt8",
"option \"--uint16=VALUE\", type: UInt16",
<<-CUSTOM_HELP
custom_help do |desc, usage, options_help, sub_commands|
<<-MY_HELP
command description: \#{desc}
command usage: \#{usage}
options:
\#{options_help}
sub_commands:
\#{sub_commands}
MY_HELP
end
CUSTOM_HELP
],
spec_sub_command_lines: [
<<-SUB_COMMAND1,
sub_command "sub_command1" do
desc "sub command 1."
run do |options, arguments|
end
end
SUB_COMMAND1
<<-SUB_COMMAND2,
sub_command "sub_command2" do
desc "sub command 2."
run do |options, arguments|
end
end
SUB_COMMAND2
],
spec_desc: "option type spec,",
spec_cases: [
{
argv: ["--help"],
expect_help: {{main_help_message}},
},
]
)
{% end %}

0 comments on commit d0f2546

Please sign in to comment.