Contents of /trunk/mkinitrd-magellan/busybox/testsuite/sum.tests
Parent Directory | Revision Log
Revision 532 -
(show annotations)
(download)
Sat Sep 1 22:45:15 2007 UTC (17 years ago) by niro
File size: 818 byte(s)
Sat Sep 1 22:45:15 2007 UTC (17 years ago) by niro
File size: 818 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 | #!/bin/sh |
2 | |
3 | # unit test for sum. |
4 | # Copyright 2007 by Bernhard Fischer |
5 | # Licensed under GPL v2 or later, see file LICENSE for details. |
6 | |
7 | # AUDIT: Unit tests for sum |
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 | testing "sum -r file doesn't print file's name" \ |
16 | "sum -r $0 | grep -c $0 && echo wrongly_printed_filename || echo yes" \ |
17 | "0\nyes\n" "" "" |
18 | testing "sum -r file file does print both names" \ |
19 | "sum -r $0 $0 | grep -c $0 && echo yes || echo wrongly_omitted_filename" \ |
20 | "2\nyes\n" "" "" |
21 | testing "sum -s file does print file's name" \ |
22 | "sum -s $0 | grep -c $0 && echo yes || echo wrongly_omitted_filename" \ |
23 | "1\nyes\n" "" "" |
24 | exit $FAILCOUNT |
Properties
Name | Value |
---|---|
svn:executable | * |