summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRuss Allbery <rra@stanford.edu>2013-02-27 14:54:05 -0800
committerRuss Allbery <rra@stanford.edu>2013-02-27 16:52:57 -0800
commit93e566f6f9ae8a767d2188ad1fb1520c9c2d303a (patch)
tree470252615c14d94be07cf1c985cca4cee54c5b8e /tests
parent4d11772001f65264bf714711550acdbb05900f4c (diff)
Drop use of concat in favor of xasprintf
Change-Id: I6a84920b0c0dc1849af8a34ecf8f3fb70b45e17c Reviewed-on: https://gerrit.stanford.edu/843 Reviewed-by: Russ Allbery <rra@stanford.edu> Tested-by: Russ Allbery <rra@stanford.edu>
Diffstat (limited to 'tests')
-rw-r--r--tests/TESTS1
-rw-r--r--tests/util/concat-t.c46
2 files changed, 0 insertions, 47 deletions
diff --git a/tests/TESTS b/tests/TESTS
index 54b8190..807d944 100644
--- a/tests/TESTS
+++ b/tests/TESTS
@@ -13,7 +13,6 @@ portable/strlcpy
server/admin
server/backend
server/keytab
-util/concat
util/messages
util/messages-krb5
util/xmalloc
diff --git a/tests/util/concat-t.c b/tests/util/concat-t.c
deleted file mode 100644
index ca7de2c..0000000
--- a/tests/util/concat-t.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * concat test suite.
- *
- * Written by Russ Allbery <rra@stanford.edu>
- * Copyright 2009 Board of Trustees, Leland Stanford Jr. University
- * Copyright (c) 2004, 2005, 2006
- * by Internet Systems Consortium, Inc. ("ISC")
- * Copyright (c) 1991, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
- * 2002, 2003 by The Internet Software Consortium and Rich Salz
- *
- * See LICENSE for licensing terms.
- */
-
-#include <config.h>
-#include <portable/system.h>
-
-#include <tests/tap/basic.h>
-#include <util/concat.h>
-
-#define END (char *) 0
-
-/*
- * Memory leaks everywhere! Whoo-hoo!
- */
-int
-main(void)
-{
- plan(13);
-
- is_string("a", concat("a", END), "concat 1");
- is_string("ab", concat("a", "b", END), "concat 2");
- is_string("ab", concat("ab", "", END), "concat 3");
- is_string("ab", concat("", "ab", END), "concat 4");
- is_string("", concat("", END), "concat 5");
- is_string("abcde", concat("ab", "c", "", "de", END), "concat 6");
- is_string("abcde", concat("abc", "de", END, "f", END), "concat 7");
-
- is_string("/foo", concatpath("/bar", "/foo"), "path 1");
- is_string("/foo/bar", concatpath("/foo", "bar"), "path 2");
- is_string("./bar", concatpath("/foo", "./bar"), "path 3");
- is_string("/bar/baz/foo/bar", concatpath("/bar/baz", "foo/bar"), "path 4");
- is_string("./foo", concatpath(NULL, "foo"), "path 5");
- is_string("/foo/bar", concatpath(NULL, "/foo/bar"), "path 6");
-
- return 0;
-}