1*cdf63a70SMartin Matuska /*- 2*cdf63a70SMartin Matuska * Copyright (c) 2014 Mike Kazantsev 3*cdf63a70SMartin Matuska * All rights reserved. 4*cdf63a70SMartin Matuska * 5*cdf63a70SMartin Matuska * Redistribution and use in source and binary forms, with or without 6*cdf63a70SMartin Matuska * modification, are permitted provided that the following conditions 7*cdf63a70SMartin Matuska * are met: 8*cdf63a70SMartin Matuska * 1. Redistributions of source code must retain the above copyright 9*cdf63a70SMartin Matuska * notice, this list of conditions and the following disclaimer. 10*cdf63a70SMartin Matuska * 2. Redistributions in binary form must reproduce the above copyright 11*cdf63a70SMartin Matuska * notice, this list of conditions and the following disclaimer in the 12*cdf63a70SMartin Matuska * documentation and/or other materials provided with the distribution. 13*cdf63a70SMartin Matuska * 14*cdf63a70SMartin Matuska * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR 15*cdf63a70SMartin Matuska * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16*cdf63a70SMartin Matuska * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17*cdf63a70SMartin Matuska * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT, 18*cdf63a70SMartin Matuska * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19*cdf63a70SMartin Matuska * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20*cdf63a70SMartin Matuska * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21*cdf63a70SMartin Matuska * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22*cdf63a70SMartin Matuska * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23*cdf63a70SMartin Matuska * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24*cdf63a70SMartin Matuska */ 25*cdf63a70SMartin Matuska #include "test.h" 26*cdf63a70SMartin Matuska 27*cdf63a70SMartin Matuska DEFINE_TEST(test_expand_mixed) 28*cdf63a70SMartin Matuska { 29*cdf63a70SMartin Matuska const char *reffile1 = "test_expand.Z"; 30*cdf63a70SMartin Matuska const char *reffile2 = "test_expand.plain"; 31*cdf63a70SMartin Matuska 32*cdf63a70SMartin Matuska extract_reference_file(reffile1); 33*cdf63a70SMartin Matuska extract_reference_file(reffile2); 34*cdf63a70SMartin Matuska assertEqualInt(0, systemf("%s %s %s >test.out 2>test.err", 35*cdf63a70SMartin Matuska testprog, reffile1, reffile2)); 36*cdf63a70SMartin Matuska 37*cdf63a70SMartin Matuska assertTextFileContents( 38*cdf63a70SMartin Matuska "contents of test_expand.Z.\n" 39*cdf63a70SMartin Matuska "contents of test_expand.plain.\n", "test.out"); 40*cdf63a70SMartin Matuska assertEmptyFile("test.err"); 41*cdf63a70SMartin Matuska } 42