summaryrefslogtreecommitdiff
path: root/src/test.cpp
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2014-01-28 03:26:18 +0100
committerFlorent Le Coz <louiz@louiz.org>2014-01-28 03:30:12 +0100
commitde7b3503a47ea7d5a6177359f6c799c2dd5e586e (patch)
tree69d435bed55074a4d0269c126d3f7c9bcc7593c5 /src/test.cpp
parentb71547a32b9beefbe24465a5ba092d2f9b3b04e5 (diff)
downloadbiboumi-de7b3503a47ea7d5a6177359f6c799c2dd5e586e.tar.gz
biboumi-de7b3503a47ea7d5a6177359f6c799c2dd5e586e.tar.bz2
biboumi-de7b3503a47ea7d5a6177359f6c799c2dd5e586e.tar.xz
biboumi-de7b3503a47ea7d5a6177359f6c799c2dd5e586e.zip
Jidprep also handles the resource part
Diffstat (limited to 'src/test.cpp')
-rw-r--r--src/test.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/test.cpp b/src/test.cpp
index c9427f0..b95b379 100644
--- a/src/test.cpp
+++ b/src/test.cpp
@@ -161,10 +161,15 @@ int main()
assert(jid2.domain == "ツ.coucou");
assert(jid2.resource == "coucou@coucou/coucou");
- // Nodeprep
- const std::string& badjid("~louiz@EpiK-7D9D1FDE.poez.io");
+ // Jidprep
+ const std::string& badjid("~zigougou@EpiK-7D9D1FDE.poez.io/Boujour/coucou/slt");
const std::string correctjid = jidprep(badjid);
- assert(correctjid == "~louiz@epik-7d9d1fde.poez.io");
+ assert(correctjid == "~zigougou@epik-7d9d1fde.poez.io/Boujour/coucou/slt");
+
+ const std::string& badjid2("Zigougou@poez.io");
+ const std::string correctjid2 = jidprep(badjid2);
+ std::cout << correctjid2 << std::endl;
+ assert(correctjid2 == "zigougou@poez.io");
/**
* Config