diff irccdctl/rule_edit_cli.cpp @ 665:7ed23c858694

Tests: test irccdctl (rule-* commands) #785 While here, fix rule-edit which were triggering invalid_index because it was not added to the request. Also fix missing events from configuration file because they were forgotten. Finally, use std::set instead of std::unordered_set for a sorted output in rule-list and rule-info to ensure long-term compatibility in output.
author David Demelier <markand@malikania.fr>
date Thu, 29 Mar 2018 20:01:02 +0200
parents aae6d5a2b28d
children 903415e8ee2e
line wrap: on
line diff
--- a/irccdctl/rule_edit_cli.cpp	Thu Mar 29 19:42:16 2018 +0200
+++ b/irccdctl/rule_edit_cli.cpp	Thu Mar 29 20:01:02 2018 +0200
@@ -99,6 +99,8 @@
     if (!index)
         throw std::invalid_argument("invalid index argument");
 
+    json["index"] = *index;
+
     request(ctl, json);
 }