svn commit: trunk/busybox/testsuite

landley at busybox.net landley at busybox.net
Sat Jun 24 22:55:15 UTC 2006


Author: landley
Date: 2006-06-24 15:55:13 -0700 (Sat, 24 Jun 2006)
New Revision: 15503

Log:
Add a test from Glenn.


Added:
   trunk/busybox/testsuite/unzip.tests


Changeset:
Added: trunk/busybox/testsuite/unzip.tests
===================================================================
--- trunk/busybox/testsuite/unzip.tests	2006-06-24 22:39:19 UTC (rev 15502)
+++ trunk/busybox/testsuite/unzip.tests	2006-06-24 22:55:13 UTC (rev 15503)
@@ -0,0 +1,38 @@
+#!/bin/sh
+
+# Tests for unzip.
+# Copyright 2006 Rob Landley <rob at landley.net>
+# Copyright 2006 Glenn McGrath <bug1 at ihug.co.nz>
+# Licensed under GPL v2, see file LICENSE for details.
+
+. testing.sh
+
+# 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.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.zip foo/ && test -d foo && test ! -f foo/bar && echo yes" "yes\n" "" ""
+
+rmdir foo
+rm foo.zip
+
+# Clean up scratch directory.
+
+cd ..
+rm -rf temp
+
+exit $FAILCOUNT


Property changes on: trunk/busybox/testsuite/unzip.tests
___________________________________________________________________
Name: svn:executable
   + *




More information about the busybox-cvs mailing list