Forráskód Böngészése

libdpkg: Add more test cases for path module

Guillem Jover 14 éve
szülő
commit
01f7a1875d
1 módosított fájl, 6 hozzáadás és 1 törlés
  1. 6 1
      lib/dpkg/test/t-path.c

+ 6 - 1
lib/dpkg/test/t-path.c

@@ -2,7 +2,7 @@
  * libdpkg - Debian packaging suite library routines
  * 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
  * it under the terms of the GNU General Public License as published by
@@ -41,6 +41,7 @@ do { \
 static void
 test_path_trim(void)
 {
+	test_trim_eq_ref("/a", "/a");
 	test_trim_eq_ref("./././.", ".");
 	test_trim_eq_ref("./././", ".");
 	test_trim_eq_ref("./.", ".");
@@ -122,6 +123,10 @@ test_path_quote(void)
 	char *dst;
 	size_t len;
 
+	/* Test 0 length. */
+	dst = NULL;
+	path_quote_filename(dst, src_7_bit, 0);
+
 	/* Test no quoting. */
 	len = strlen(src_7_bit) + 1;
 	dst = malloc(len);