Blame SOURCES/0066-testsuite-add-test-for-strremovech-str-ch.patch

4b6aa8
From 57ef3de7bed1dbe3028e9589063b7ee2a373630d Mon Sep 17 00:00:00 2001
4b6aa8
From: Jakub Filak <jfilak@redhat.com>
4b6aa8
Date: Fri, 12 Sep 2014 16:09:06 +0200
4b6aa8
Subject: [LIBREPORT PATCH 66/93] testsuite: add test for strremovech(str, ch)
4b6aa8
4b6aa8
Related to rhbz#1140224
4b6aa8
4b6aa8
Signed-off-by: Jakub Filak <jfilak@redhat.com>
4b6aa8
---
4b6aa8
 tests/strbuf.at | 23 +++++++++++++++++++++++
4b6aa8
 1 file changed, 23 insertions(+)
4b6aa8
4b6aa8
diff --git a/tests/strbuf.at b/tests/strbuf.at
4b6aa8
index 9f1d6ef..a548044 100644
4b6aa8
--- a/tests/strbuf.at
4b6aa8
+++ b/tests/strbuf.at
4b6aa8
@@ -71,3 +71,26 @@ int main(void)
4b6aa8
   return 0;
4b6aa8
 }
4b6aa8
 ]])
4b6aa8
+
4b6aa8
+
4b6aa8
+## ----------- ##
4b6aa8
+## strremovech ##
4b6aa8
+## ----------- ##
4b6aa8
+
4b6aa8
+AT_TESTFUN([strremovech],
4b6aa8
+[[
4b6aa8
+#include "internal_libreport.h"
4b6aa8
+#include <assert.h>
4b6aa8
+int main(void)
4b6aa8
+{
4b6aa8
+    char test[] = "Hello , world!";
4b6aa8
+
4b6aa8
+    if (strcmp(strremovech(test, ' '), "Hello,world!") != 0)
4b6aa8
+    {
4b6aa8
+        fprintf(stderr, "Expected: 'Hello,world!'\nResult  : '%s'", test);
4b6aa8
+        assert(!"Failed to remove space");
4b6aa8
+    }
4b6aa8
+
4b6aa8
+    return 0;
4b6aa8
+}
4b6aa8
+]])
4b6aa8
-- 
4b6aa8
1.8.3.1
4b6aa8