Path: blob/main/contrib/libarchive/unzip/test/test_doubledash.c
39483 views
/*1* SPDX-License-Identifier: BSD-2-Clause2*3* Copyright (c) 2023 Adrian Vovk4* All rights reserved.5*/6#include "test.h"78/* Test double dash arg - swallow "--" and use next argument as file name */9DEFINE_TEST(test_doubledash)10{11const char *reffile = "test_basic.zip";12int r;1314extract_reference_file(reffile);15r = systemf("%s -- %s >test.out 2>test.err", testprog, reffile);16assertEqualInt(0, r);17assertNonEmptyFile("test.out");18assertEmptyFile("test.err");1920assertTextFileContents("contents a\n", "test_basic/a");21assertTextFileContents("contents b\n", "test_basic/b");22assertTextFileContents("contents c\n", "test_basic/c");23assertTextFileContents("contents CAPS\n", "test_basic/CAPS");24}252627