1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 3 * 4 * Copyright (c) 2014 Michihiro NAKAJIMA 5 * All rights reserved. 6 */ 7 #include "test.h" 8 9 DEFINE_TEST(test_option_passphrase) 10 { 11 const char *reffile = "test_option_passphrase.zip"; 12 13 extract_reference_file(reffile); 14 failure("--passphrase option is broken"); 15 assertEqualInt(0, systemf( 16 "%s --passphrase pass1 -xf %s >test.out 2>test.err", 17 testprog, reffile)); 18 assertFileExists("file1"); 19 assertTextFileContents("contents of file1.\n", "file1"); 20 assertFileExists("file2"); 21 assertTextFileContents("contents of file2.\n", "file2"); 22 assertEmptyFile("test.out"); 23 assertEmptyFile("test.err"); 24 } 25