diff options
author | Alexander Shishkin <virtuoso@slind.org> | 2010-03-15 15:38:09 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-03-15 15:38:09 +0100 |
commit | 535584c750820dd6c36011697f9ef89fe0a0698c (patch) | |
tree | 6c682a7a6ca7d740529201c759fa4e64d9622797 /testsuite | |
parent | 814da220a5d451c036c9871094253366372676e0 (diff) | |
download | busybox-w32-535584c750820dd6c36011697f9ef89fe0a0698c.tar.gz busybox-w32-535584c750820dd6c36011697f9ef89fe0a0698c.tar.bz2 busybox-w32-535584c750820dd6c36011697f9ef89fe0a0698c.zip |
ar: add archive creation support
function old new delta
ar_main 184 542 +358
output_ar_header - 166 +166
copy_data - 54 +54
filter_replaceable - 19 +19
get_header_ar 409 414 +5
header_verbose_list_ar 85 88 +3
static.msg_unsupported_err 28 - -28
------------------------------------------------------------------------------
(add/remove: 3/1 grow/shrink: 3/0 up/down: 605/-28) Total: 577 bytes
Signed-off-by: Alexander Shishkin <virtuoso@slind.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'testsuite')
-rwxr-xr-x | testsuite/ar.tests | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/testsuite/ar.tests b/testsuite/ar.tests new file mode 100755 index 000000000..f112eb64a --- /dev/null +++ b/testsuite/ar.tests | |||
@@ -0,0 +1,27 @@ | |||
1 | #!/bin/sh | ||
2 | # Copyright 2010 Nokia Corporation | ||
3 | # Written by Alexander Shishkin | ||
4 | # Licensed under GPL v2 or later, see file LICENSE for details | ||
5 | |||
6 | . ./testing.sh | ||
7 | |||
8 | # testing "test name" "command(s)" "expected result" "file input" "stdin" | ||
9 | |||
10 | optional FEATURE_AR_CREATE | ||
11 | |||
12 | rm test.a 2>/dev/null | ||
13 | testing "ar creates archives" \ | ||
14 | "ar rc test.a README && ar p test.a README | md5sum" \ | ||
15 | "$(md5sum <README)\n" \ | ||
16 | "" \ | ||
17 | "" | ||
18 | rm test.a | ||
19 | |||
20 | testing "ar replaces things in archives" \ | ||
21 | "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" \ | ||
22 | "blast!\n" \ | ||
23 | "" \ | ||
24 | "" | ||
25 | rm test.a | ||
26 | |||
27 | exit $FAILCOUNT | ||