#!/bin/sh # SPDX-License-Identifier: GPL-2.0-or-later # Copyright (c) International Business Machines Corp., 2001 # Copyright (c) Cyril Hrubis # Author: Manoj Iyer # # Tests basic functionality of unzip command. TST_SETUP=setup TST_TESTFUNC=do_test TST_NEEDS_TMPDIR=1 TST_NEEDS_CMDS="unzip" . tst_test.sh setup() { cat > unzip_exp.out < unzip.out if diff -w unzip_exp.out unzip.out; then tst_res TPASS "Unzip output is correct" else tst_res TFAIL "Unzip output is incorrect" cat unzip.out fi stable_ls "dir" > dir.out if diff "$TST_DATAROOT/dir.out" dir.out; then tst_res TPASS "Files unzipped correctly" else tst_res TFAIL "Files unzipped incorrectly" cat dir.out fi ROD rm -rf "dir/" } tst_run