The following commit has been merged in the master branch:
commit 21c75543edb7e02a428f1adde0a15dd86fc613e4
Author: Guillem Jover <guil...@debian.org>
Date:   Sat Feb 4 14:47:28 2012 +0100

    libdpkg: Add test case for default shell on command_shell()

diff --git a/lib/dpkg/test/t-command.c b/lib/dpkg/test/t-command.c
index 2e5e05c..793fa40 100644
--- a/lib/dpkg/test/t-command.c
+++ b/lib/dpkg/test/t-command.c
@@ -2,7 +2,7 @@
  * libdpkg - Debian packaging suite library routines
  * t-command.c - test command implementation
  *
- * Copyright © 2010-2011 Guillem Jover <guil...@debian.org>
+ * Copyright © 2010-2012 Guillem Jover <guil...@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
@@ -21,6 +21,8 @@
 #include <config.h>
 #include <compat.h>
 
+#include <stdlib.h>
+
 #include <dpkg/test.h>
 #include <dpkg/subproc.h>
 #include <dpkg/command.h>
@@ -169,6 +171,13 @@ test_command_shell(void)
                command_shell("false", "command shell fail test");
        ret = subproc_wait_check(pid, "command shell fail test", PROCNOERR);
        test_fail(ret == 0);
+
+       unsetenv("SHELL");
+       pid = subproc_fork();
+       if (pid == 0)
+               command_shell("true", "command default shell test");
+       ret = subproc_wait_check(pid, "command default shell test", 0);
+       test_pass(ret == 0);
 }
 
 static void

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to debian-dpkg-cvs-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to