Signed-off-by: Alexander Shishkin <[email protected]>
---
 testsuite/ar.tests |   28 ++++++++++++++++++++++++++++
 1 files changed, 28 insertions(+), 0 deletions(-)
 create mode 100755 testsuite/ar.tests

diff --git a/testsuite/ar.tests b/testsuite/ar.tests
new file mode 100755
index 0000000..d5b079e
--- /dev/null
+++ b/testsuite/ar.tests
@@ -0,0 +1,28 @@
+#!/bin/sh
+# Copyright 2010 Nokia Corporation
+# written by Alexander Shishkin
+# Licensed under GPL v2 or later, see file LICENSE for details.
+
+. testing.sh
+
+# testing "test name" "options" "expected result" "file input" "stdin"
+
+optional FEATURE_AR_CREATE
+
+testing "ar creates archives" \
+       "ar c test.a README && ar p test.a README | md5sum | cut -f1 -d' '" \
+       "$(md5sum README | cut -f1 -d' ')\n" \
+       "" \
+       ""
+
+rm test.a
+
+testing "ar replaces things in archives" \
+       "echo 'blah!' > file1 && echo 'blast!' > file2 && ar cr test.a README 
file1 file2 && mv file2 file1 && ar cr test.a file1 && ar p test.a file1" \
+       "blast!\n" \
+       "" \
+       ""
+
+rm test.a
+
+exit $FAILCOUNT
-- 
1.6.3.3

_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to