|
@@ -2,7 +2,7 @@
|
|
|
* libdpkg - Debian packaging suite library routines
|
|
* libdpkg - Debian packaging suite library routines
|
|
|
* t-path.c - test path handling code
|
|
* t-path.c - test path handling code
|
|
|
*
|
|
*
|
|
|
- * Copyright © 2009 Guillem Jover <guillem@debian.org>
|
|
|
|
|
|
|
+ * Copyright © 2009-2012 Guillem Jover <guillem@debian.org>
|
|
|
*
|
|
*
|
|
|
* This is free software; you can redistribute it and/or modify
|
|
* This is free software; you can redistribute it and/or modify
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
* it under the terms of the GNU General Public License as published by
|
|
@@ -41,6 +41,7 @@ do { \
|
|
|
static void
|
|
static void
|
|
|
test_path_trim(void)
|
|
test_path_trim(void)
|
|
|
{
|
|
{
|
|
|
|
|
+ test_trim_eq_ref("/a", "/a");
|
|
|
test_trim_eq_ref("./././.", ".");
|
|
test_trim_eq_ref("./././.", ".");
|
|
|
test_trim_eq_ref("./././", ".");
|
|
test_trim_eq_ref("./././", ".");
|
|
|
test_trim_eq_ref("./.", ".");
|
|
test_trim_eq_ref("./.", ".");
|
|
@@ -122,6 +123,10 @@ test_path_quote(void)
|
|
|
char *dst;
|
|
char *dst;
|
|
|
size_t len;
|
|
size_t len;
|
|
|
|
|
|
|
|
|
|
+ /* Test 0 length. */
|
|
|
|
|
+ dst = NULL;
|
|
|
|
|
+ path_quote_filename(dst, src_7_bit, 0);
|
|
|
|
|
+
|
|
|
/* Test no quoting. */
|
|
/* Test no quoting. */
|
|
|
len = strlen(src_7_bit) + 1;
|
|
len = strlen(src_7_bit) + 1;
|
|
|
dst = malloc(len);
|
|
dst = malloc(len);
|