xref: /freebsd/contrib/libarchive/unzip/test/test_not_exist.c (revision bd66c1b43e33540205dbc1187c2f2a15c58b57ba)
1 /*
2  * SPDX-License-Identifier: BSD-2-Clause
3  *
4  * Copyright (c) 2023 Adrian Vovk
5  * All rights reserved.
6  */
7 #include "test.h"
8 
9 /* Test non existent file */
DEFINE_TEST(test_not_exist)10 DEFINE_TEST(test_not_exist)
11 {
12 	int r;
13 	r = systemf("%s nonexist.zip >test.out 2>test.err", testprog);
14 	assert(r != 0);
15 	assertEmptyFile("test.out");
16 	assertNonEmptyFile("test.err");
17 }
18