Annotation of /trunk/mkinitrd-magellan/busybox/testsuite/uuencode.tests
Parent Directory | Revision Log
Revision 532 -
(hide annotations)
(download)
Sat Sep 1 22:45:15 2007 UTC (16 years, 8 months ago) by niro
File size: 1144 byte(s)
Sat Sep 1 22:45:15 2007 UTC (16 years, 8 months ago) by niro
File size: 1144 byte(s)
-import if magellan mkinitrd; it is a fork of redhats mkinitrd-5.0.8 with all magellan patches and features; deprecates magellan-src/mkinitrd
1 | niro | 532 | #!/bin/sh |
2 | |||
3 | # unit test for uuencode to test functionality. | ||
4 | # Copyright 2006 by Erik Hovland <erik@hovland.org> | ||
5 | # Licensed under GPL v2, see file LICENSE for details. | ||
6 | |||
7 | # AUDIT: Unit tests for uuencode | ||
8 | |||
9 | . testing.sh | ||
10 | |||
11 | # testing "test name" "options" "expected result" "file input" "stdin" | ||
12 | # file input will be file called "input" | ||
13 | # test can create a file "actual" instead of writing to stdout | ||
14 | |||
15 | # Test setup of standard input | ||
16 | saved_umask=$(umask) | ||
17 | umask 0 | ||
18 | testing "uuencode sets standard input mode correctly" \ | ||
19 | "uuencode foo </dev/null | head -n 1 | grep -q 666 && echo yes" "yes\n" "" "" | ||
20 | umask $saved_umask | ||
21 | |||
22 | testing "uuencode correct encoding" "uuencode bb_uuenc_test.out" \ | ||
23 | "begin 644 bb_uuenc_test.out\nM5&AE(&9A<W0@9W)E>2!F;W@@:G5M<&5D(&]V97(@=&AE(&QA>GD@8G)O=VX@\n%9&]G+@H\`\n\`\nend\n" \ | ||
24 | "" "The fast grey fox jumped over the lazy brown dog.\n" | ||
25 | testing "uuencode correct base64 encoding" "uuencode -m bb_uuenc_test.out" \ | ||
26 | "begin-base64 644 bb_uuenc_test.out\nVGhlIGZhc3QgZ3JleSBmb3gganVtcGVkIG92ZXIgdGhlIGxhenkgYnJvd24g\nZG9nLgo=\n====\n" \ | ||
27 | "" "The fast grey fox jumped over the lazy brown dog.\n" | ||
28 | exit $FAILCOUNT |
Properties
Name | Value |
---|---|
svn:executable | * |