1255570Strasz/*-
2255570Strasz * Copyright (c) 2014 Sebastian Freundt
3255570Strasz * All rights reserved.
4255570Strasz *
5255570Strasz * Redistribution and use in source and binary forms, with or without
6255570Strasz * modification, are permitted provided that the following conditions
7255570Strasz * are met:
8255570Strasz * 1. Redistributions of source code must retain the above copyright
9255570Strasz *    notice, this list of conditions and the following disclaimer.
10255570Strasz * 2. Redistributions in binary form must reproduce the above copyright
11255570Strasz *    notice, this list of conditions and the following disclaimer in the
12255570Strasz *    documentation and/or other materials provided with the distribution.
13255570Strasz *
14255570Strasz * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
15255570Strasz * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
16255570Strasz * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
17255570Strasz * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
18255570Strasz * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19255570Strasz * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20255570Strasz * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21255570Strasz * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22255570Strasz * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23255570Strasz * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24255570Strasz */
25255570Strasz#include "test.h"
26255570Strasz
27255570StraszDEFINE_TEST(test_empty_lz4)
28255570Strasz{
29255570Strasz	const char *reffile = "test_empty.lz4";
30255570Strasz	int f;
31255570Strasz
32255570Strasz	extract_reference_file(reffile);
33255570Strasz	f = systemf("%s %s >test.out 2>test.err", testprog, reffile);
34255570Strasz	if (f == 0 || canLz4()) {
35255570Strasz		assertEqualInt(0, f);
36255570Strasz		assertEmptyFile("test.out");
37255570Strasz		assertEmptyFile("test.err");
38255570Strasz	} else {
39255570Strasz		skipping("It seems lz4 is not supported on this platform");
40255570Strasz	}
41255570Strasz}
42255570Strasz