summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2016-06-14 20:14:36 +0200
committerlouiz’ <louiz@louiz.org>2016-06-14 20:14:36 +0200
commit80d0c19c5a8d548a8c6019033bf574ff2be4c0ce (patch)
treec02303b06ee6a7603f175aab767f3d5742152c4b /tests
parent19bca5c2f2b104d534a7c8be7f61dc48d928cf24 (diff)
downloadbiboumi-80d0c19c5a8d548a8c6019033bf574ff2be4c0ce.tar.gz
biboumi-80d0c19c5a8d548a8c6019033bf574ff2be4c0ce.tar.bz2
biboumi-80d0c19c5a8d548a8c6019033bf574ff2be4c0ce.tar.xz
biboumi-80d0c19c5a8d548a8c6019033bf574ff2be4c0ce.zip
Refactor, test and improve the way we cut too-long messages for IRC
Diffstat (limited to 'tests')
-rw-r--r--tests/utils.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/utils.cpp b/tests/utils.cpp
index 8691910..54e743f 100644
--- a/tests/utils.cpp
+++ b/tests/utils.cpp
@@ -88,3 +88,9 @@ TEST_CASE("empty if fixed irc server")
}
}
+
+TEST_CASE("string cut")
+{
+ CHECK(cut("coucou", 2).size() == 3);
+ CHECK(cut("bonjour les copains", 6).size() == 4);
+} \ No newline at end of file