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