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