diff options
m--------- | louloulibs | 0 | ||||
-rw-r--r-- | src/test.cpp | 7 |
2 files changed, 6 insertions, 1 deletions
diff --git a/louloulibs b/louloulibs -Subproject eaa4fbba814b56b4fe7ffb62984fddfbb928029 +Subproject 89398b5d886744c3812b65195308cae57eca2b5 diff --git a/src/test.cpp b/src/test.cpp index 553140f..842dfed 100644 --- a/src/test.cpp +++ b/src/test.cpp @@ -295,11 +295,16 @@ int main() assert(jidprep(badjid) == "~zigougoutm@epik-7d9d1fde.poez.io/Boujour/coucou/sltTM"); assert(jidprep(badjid) == "~zigougoutm@epik-7d9d1fde.poez.io/Boujour/coucou/sltTM"); - const std::string& badjid2("Zigougou@poez.io"); + const std::string badjid2("Zigougou@poez.io"); const std::string correctjid2 = jidprep(badjid2); std::cout << correctjid2 << std::endl; assert(correctjid2 == "zigougou@poez.io"); + const std::string crappy("~Bisous@7ea8beb1:c5fd2849:da9a048e:ip"); + const std::string fixed_crappy = jidprep(crappy); + std::cout << fixed_crappy << std::endl; + assert(fixed_crappy == "~bisous@7ea8beb1-c5fd2849-da9a048e-ip"); + /** * IID parsing */ |