blob: 975079db66bce5e8053c48eb0c2d6f8a1c4b625e [file] [log] [blame]
# Tests for unzip.
# Copyright 2006 Rob Landley <>
# Copyright 2006 Glenn McGrath
# Licensed under GPL v2, see file LICENSE for details.
# testing "test name" "options" "expected result" "file input" "stdin"
# file input will be file called "input"
# test can create a file "actual" instead of writing to stdout
# Create a scratch directory
mkdir temp
cd temp
# Create test file to work with.
mkdir foo
touch foo/bar
zip foo foo/bar > /dev/null
rm -f foo/bar
rmdir foo
# Test that unzipping just foo doesn't create bar.
testing "unzip (subdir only)" "unzip -q foo/ && test -d foo && test ! -f foo/bar && echo yes" "yes\n" "" ""
rmdir foo
# Clean up scratch directory.
cd ..
rm -rf temp