# # # add_dir "tests/empty_command_name" # # add_file "tests/empty_command_name/__driver__.lua" # content [431f2137b4f89450381281a8b0f909bdc4f9306f] # # patch "commands.cc" # from [c16cdb15b8eb7ac70e5c23006e6f3ddf377a8a65] # to [d63ab460bfd07e887646fb4e5ead6a5ab4c2d0c8] # # patch "monotone.cc" # from [3203fd093d06929ee733eac5eba3eb101abc99d6] # to [a2b9556443f70695532d0916c30c2f7379e0f9c9] # ============================================================ --- commands.cc c16cdb15b8eb7ac70e5c23006e6f3ddf377a8a65 +++ commands.cc d63ab460bfd07e887646fb4e5ead6a5ab4c2d0c8 @@ -325,8 +325,6 @@ namespace commands { map< command_id, command * > matches; - I(!prefix().empty()); - for (children_set::const_iterator iter = children().begin(); iter != children().end(); iter++) { ============================================================ --- monotone.cc 3203fd093d06929ee733eac5eba3eb101abc99d6 +++ monotone.cc a2b9556443f70695532d0916c30c2f7379e0f9c9 @@ -219,7 +219,6 @@ cpp_main(int argc, char ** argv) if (!app.opts.args.empty()) { cmd_id = commands::complete_command(app.opts.args); - I(!cmd_id.empty()); } // check if the user specified default arguments for this command ============================================================ --- /dev/null +++ tests/empty_command_name/__driver__.lua 431f2137b4f89450381281a8b0f909bdc4f9306f @@ -0,0 +1,7 @@ +mtn_setup() + +check(mtn(''), 2, false, true) +check(qgrep("Usage: ", "stderr")) + +check(mtn('ls', ''), 1, false, true) +check(qgrep("is ambiguous", "stderr")) \ No newline at end of file