1299425Smm/*-
2299425Smm * Copyright (c) 2014 Mike Kazantsev
3299425Smm * Copyright (c) 2012, 2014 Michihiro NAKAJIMA
4299425Smm * All rights reserved.
5299425Smm *
6299425Smm * Redistribution and use in source and binary forms, with or without
7299425Smm * modification, are permitted provided that the following conditions
8299425Smm * are met:
9299425Smm * 1. Redistributions of source code must retain the above copyright
10299425Smm *    notice, this list of conditions and the following disclaimer.
11299425Smm * 2. Redistributions in binary form must reproduce the above copyright
12299425Smm *    notice, this list of conditions and the following disclaimer in the
13299425Smm *    documentation and/or other materials provided with the distribution.
14299425Smm *
15299425Smm * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
16299425Smm * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17299425Smm * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18299425Smm * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
19299425Smm * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20299425Smm * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21299425Smm * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22299425Smm * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23299425Smm * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24299425Smm * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25299425Smm */
26299425Smm#include "test.h"
27299425Smm
28299425SmmDEFINE_TEST(test_expand_lz4)
29299425Smm{
30299425Smm	const char *reffile = "test_expand.lz4";
31299425Smm	int f;
32299425Smm
33299425Smm	extract_reference_file(reffile);
34299425Smm	f = systemf("%s %s >test.out 2>test.err", testprog, reffile);
35299425Smm	if (f == 0 || canLz4()) {
36299425Smm		assertEqualInt(0, f);
37299425Smm		assertTextFileContents("contents of test_expand.lz4.\n", "test.out");
38299425Smm		assertEmptyFile("test.err");
39299425Smm	} else {
40299425Smm		skipping("It seems lz4 is not supported on this platform");
41299425Smm	}
42299425Smm}
43