From: Michihiro NAKAJIMA Date: Wed, 13 Apr 2011 13:54:59 +0000 (-0400) Subject: On Windows, this command line systemf("echo f | bsdcpio -pd copy >copy.out 2>copy... X-Git-Tag: v3.0.0a~462 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3ac3a2b2a28ced1c8fee32625710801f4b423603;p=thirdparty%2Flibarchive.git On Windows, this command line systemf("echo f | bsdcpio -pd copy >copy.out 2>copy.err"), bsdcpio will get a wrong filename "f ". this "echo f| bsdcpio ...." can correctly pass a intended filename to bsdcpio. SVN-Revision: 3224 --- diff --git a/cpio/test/test_option_u.c b/cpio/test/test_option_u.c index 08058aa45..b377def02 100644 --- a/cpio/test/test_option_u.c +++ b/cpio/test/test_option_u.c @@ -41,7 +41,7 @@ DEFINE_TEST(test_option_u) assertMakeFile("f", 0644, "a"); /* Copy the file to the "copy" dir. */ - r = systemf("echo f | %s -pd copy >copy.out 2>copy.err", + r = systemf("echo f| %s -pd copy >copy.out 2>copy.err", testprog); assertEqualInt(r, 0); @@ -60,7 +60,7 @@ DEFINE_TEST(test_option_u) assertEqualInt(0, utime("f", ×)); /* Copy the file to the "copy" dir. */ - r = systemf("echo f | %s -pd copy >copy.out 2>copy.err", + r = systemf("echo f| %s -pd copy >copy.out 2>copy.err", testprog); assertEqualInt(r, 0); @@ -70,7 +70,7 @@ DEFINE_TEST(test_option_u) assertEqualMem(p, "a", 1); /* Copy the file to the "copy" dir with -u (force) */ - r = systemf("echo f | %s -pud copy >copy.out 2>copy.err", + r = systemf("echo f| %s -pud copy >copy.out 2>copy.err", testprog); assertEqualInt(r, 0);