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 assertEqualInt(0, 15 systemf("%s -i --passphrase pass1 < %s >test.out 2>test.err", 16 testprog, reffile)); 17 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 assertTextFileContents("1 block\n", "test.err"); 24 } 25