summaryrefslogtreecommitdiff
path: root/src/test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/test.cpp')
-rw-r--r--src/test.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test.cpp b/src/test.cpp
index 553140f..a46bfd1 100644
--- a/src/test.cpp
+++ b/src/test.cpp
@@ -396,7 +396,15 @@ int main()
assert(iid6.get_server() == "fixed.example.com");
assert(iid6.is_channel);
assert(!iid6.is_user);
+
+ Config::set("fixed_irc_server", "", false);
}
+ std::cout << color << "Testing JID (xep 0106) decoding…" << reset << std::endl;
+ assert(Iid{"space\\20cadet!"}.get_local() == "space cadet");
+ assert(Iid{"call\\20me\\20\\22ishmael\\22!"}.get_local() == "call me \"ishmael\"");
+ assert(Iid{"\\2f.fanboy!"}.get_local() == "/.fanboy");
+ assert(Iid{"Q\\40CServe.quakenet.org!"}.get_local() == "q@cserve.quakenet.org");
+
return 0;
}