libsodium: Needed for Dnscrypto-proxy Release 1.3.0
[tomato.git] / release / src / router / busybox / testsuite / unzip.tests
blob8677a0306214e099e131cbb97aa344dd8908e1d1
1 #!/bin/sh
3 # Tests for unzip.
4 # Copyright 2006 Rob Landley <rob@landley.net>
5 # Copyright 2006 Glenn McGrath
6 # Licensed under GPLv2, see file LICENSE in this source tree.
8 . ./testing.sh
10 # testing "test name" "options" "expected result" "file input" "stdin"
11 # file input will be file called "input"
12 # test can create a file "actual" instead of writing to stdout
14 # Create a scratch directory
16 mkdir temp
17 cd temp
19 # Create test file to work with.
21 mkdir foo
22 touch foo/bar
23 zip foo.zip foo foo/bar > /dev/null
24 rm -f foo/bar
25 rmdir foo
27 # Test that unzipping just foo doesn't create bar.
28 testing "unzip (subdir only)" "unzip -q foo.zip foo/ && test -d foo && test ! -f foo/bar && echo yes" "yes\n" "" ""
30 rmdir foo
31 rm foo.zip
33 # Clean up scratch directory.
35 cd ..
36 rm -rf temp
38 exit $FAILCOUNT