chiark / gitweb /
Prep v239: Mask unneeded test in test-strip-ansi
[elogind.git] / src / test / test-strip-tab-ansi.c
index 4345f6a14c2f5ba4b62e445579401de5b2f69924..27e2a240ee168aae5519a71bdb98cff98477a3a3 100644 (file)
@@ -2,14 +2,19 @@
 
 #include <stdio.h>
 
-//#include "alloc-util.h"
+#include "alloc-util.h"
 #include "string-util.h"
 #include "terminal-util.h"
 #include "util.h"
 
 int main(int argc, char *argv[]) {
+#if 0 /// urlified and z are UNNEEDED by elogind
         _cleanup_free_ char *urlified = NULL, *q = NULL, *qq = NULL;
         char *p, *z;
+#else
+        _cleanup_free_ char *q = NULL, *qq = NULL;
+        char *p;
+#endif // 0
 
         assert_se(p = strdup("\tFoobar\tbar\twaldo\t"));
         assert_se(strip_tab_ansi(&p, NULL, NULL));
@@ -33,6 +38,7 @@ int main(int argc, char *argv[]) {
         assert_se(streq(p, "\x1B[waldo"));
         free(p);
 
+#if 0 /// UNNEEDED by elogind
         assert_se(terminal_urlify_path("/etc/fstab", "i am a fabulous link", &urlified) >= 0);
         assert_se(p = strjoin("something ", urlified, " something-else"));
         assert_se(q = strdup(p));
@@ -51,6 +57,7 @@ int main(int argc, char *argv[]) {
                 assert_se(strip_tab_ansi(&q, NULL, NULL));
                 assert_se(streq(q, qq));
         }
+#endif // 0
 
         return 0;
 }