diff options
author | Florent Le Coz <louiz@louiz.org> | 2015-05-13 20:17:43 +0200 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2015-05-13 20:17:43 +0200 |
commit | fbeb5af364db54c8a82f5ea30b83df441988ea4b (patch) | |
tree | 8eaee7c293b264608562f757029fb31738dd8de8 /src/test.cpp | |
parent | 763be827c9349d39adbdd8cf731565bef316a01a (diff) | |
download | biboumi-fbeb5af364db54c8a82f5ea30b83df441988ea4b.tar.gz biboumi-fbeb5af364db54c8a82f5ea30b83df441988ea4b.tar.bz2 biboumi-fbeb5af364db54c8a82f5ea30b83df441988ea4b.tar.xz biboumi-fbeb5af364db54c8a82f5ea30b83df441988ea4b.zip |
Update to latest louloulibs revision, and add test for hostname validity
fix #2694
Diffstat (limited to 'src/test.cpp')
-rw-r--r-- | src/test.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
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 */ |