tar/test/test_option_newer_than.c \
tar/test/test_option_nodump.c \
tar/test/test_option_older_than.c \
+ tar/test/test_option_passphrase.c \
tar/test/test_option_q.c \
tar/test/test_option_r.c \
tar/test/test_option_s.c \
tar/test/test_extract.tar.lzo.uu \
tar/test/test_extract.tar.xz.uu \
tar/test/test_option_keep_newer_files.tar.Z.uu \
+ tar/test/test_option_passphrase.zip.uu \
tar/test/test_option_s.tar.Z.uu \
tar/test/test_patterns_2.tar.uu \
tar/test/test_patterns_3.tar.uu \
cpio/test/test_option_lzma.c \
cpio/test/test_option_lzop.c \
cpio/test/test_option_m.c \
+ cpio/test/test_option_passphrase.c \
cpio/test/test_option_t.c \
cpio/test/test_option_u.c \
cpio/test/test_option_uuencode.c \
cpio/test/test_gcpio_compat_ref_nosym.ustar.uu \
cpio/test/test_option_f.cpio.uu \
cpio/test/test_option_m.cpio.uu \
+ cpio/test/test_option_passphrase.zip.uu \
cpio/test/test_option_t.cpio.uu \
cpio/test/test_option_t.stdout.uu \
cpio/test/test_option_tv.stdout.uu \
test_option_lzma.c
test_option_lzop.c
test_option_m.c
+ test_option_passphrase.c
test_option_t.c
test_option_u.c
test_option_uuencode.c
--- /dev/null
+/*-
+ * Copyright (c) 2014 Michihiro NAKAJIMA
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#include "test.h"
+__FBSDID("$FreeBSD$");
+
+DEFINE_TEST(test_option_passphrase)
+{
+ const char *reffile = "test_option_passphrase.zip";
+
+ extract_reference_file(reffile);
+ assertEqualInt(0,
+ systemf("%s -i --passphrase pass1 < %s >test.out 2>test.err",
+ testprog, reffile));
+
+ assertFileExists("file1");
+ assertTextFileContents("contents of file1.\n", "file1");
+ assertFileExists("file2");
+ assertTextFileContents("contents of file2.\n", "file2");
+ assertEmptyFile("test.out");
+ assertTextFileContents("1 block\n", "test.err");
+}
--- /dev/null
+begin 644 test_option_passphrase.zip
+M4$L#!`H`"0```#B91$7D$C4,'P```!,````%`!P`9FEL93%55`D``VS'+U0"
+MQR]4=7@+``$$]0$```04````BHPD*"^*I04=XKI\_FQ*TE+#),TD7TTKSP/7
+MR6R35%!+!PCD$C4,'P```!,```!02P,$"@`)````09E$1;VL<PX?````$P``
+M``4`'`!F:6QE,E54"0`#><<O5`+'+U1U>`L``03U`0``!!0```!D#6Z\@CI8
+MV1GIJO5TISQF^I:7.;Y3<-G3$YOCL(C_4$L'"+VL<PX?````$P```%!+`0(>
+M`PH`"0```#B91$7D$C4,'P```!,````%`!@```````$```"D@0````!F:6QE
+M,554!0`#;,<O5'5X"P`!!/4!```$%````%!+`0(>`PH`"0```$&91$6]K',.
+M'P```!,````%`!@```````$```"D@6X```!F:6QE,E54!0`#><<O5'5X"P`!
+@!/4!```$%````%!+!08``````@`"`)8```#<````````
+`
+end
test_option_newer_than.c
test_option_nodump.c
test_option_older_than.c
+ test_option_passphrase.c
test_option_q.c
test_option_r.c
test_option_s.c
--- /dev/null
+/*-
+ * Copyright (c) 2014 Michihiro NAKAJIMA
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#include "test.h"
+__FBSDID("$FreeBSD$");
+
+DEFINE_TEST(test_option_passphrase)
+{
+ const char *reffile = "test_option_passphrase.zip";
+
+ extract_reference_file(reffile);
+ failure("--passphrase option is broken");
+ assertEqualInt(0, systemf(
+ "%s --passphrase pass1 -xf %s >test.out 2>test.err",
+ testprog, reffile));
+ assertFileExists("file1");
+ assertTextFileContents("contents of file1.\n", "file1");
+ assertFileExists("file2");
+ assertTextFileContents("contents of file2.\n", "file2");
+ assertEmptyFile("test.out");
+ assertEmptyFile("test.err");
+}
--- /dev/null
+begin 644 test_option_passphrase.zip
+M4$L#!`H`"0```#B91$7D$C4,'P```!,````%`!P`9FEL93%55`D``VS'+U0"
+MQR]4=7@+``$$]0$```04````BHPD*"^*I04=XKI\_FQ*TE+#),TD7TTKSP/7
+MR6R35%!+!PCD$C4,'P```!,```!02P,$"@`)````09E$1;VL<PX?````$P``
+M``4`'`!F:6QE,E54"0`#><<O5`+'+U1U>`L``03U`0``!!0```!D#6Z\@CI8
+MV1GIJO5TISQF^I:7.;Y3<-G3$YOCL(C_4$L'"+VL<PX?````$P```%!+`0(>
+M`PH`"0```#B91$7D$C4,'P```!,````%`!@```````$```"D@0````!F:6QE
+M,554!0`#;,<O5'5X"P`!!/4!```$%````%!+`0(>`PH`"0```$&91$6]K',.
+M'P```!,````%`!@```````$```"D@6X```!F:6QE,E54!0`#><<O5'5X"P`!
+@!/4!```$%````%!+!08``````@`"`)8```#<````````
+`
+end