diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-07-20 17:50:58 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-07-20 17:50:58 +0000 |
commit | 9b366f41367f717d8ddd9909fdc710b92f92a16c (patch) | |
tree | 8f84f7271f312b8658e0443ea723c20fcd1eb36f /testsuite/parse.tests | |
parent | a34f1ed737e79e494904706e59f4e7fbb49e32b3 (diff) | |
download | busybox-w32-9b366f41367f717d8ddd9909fdc710b92f92a16c.tar.gz busybox-w32-9b366f41367f717d8ddd9909fdc710b92f92a16c.tar.bz2 busybox-w32-9b366f41367f717d8ddd9909fdc710b92f92a16c.zip |
libbb/parse_config.c: fix small buglet (by Vladimir)
Diffstat (limited to 'testsuite/parse.tests')
-rwxr-xr-x | testsuite/parse.tests | 43 |
1 files changed, 42 insertions, 1 deletions
diff --git a/testsuite/parse.tests b/testsuite/parse.tests index 1b43f9c9f..06be8d2b9 100755 --- a/testsuite/parse.tests +++ b/testsuite/parse.tests | |||
@@ -23,7 +23,7 @@ testing "notrim" \ | |||
23 | "-" \ | 23 | "-" \ |
24 | " sda 0:0 644 @echo @echo TEST \n" | 24 | " sda 0:0 644 @echo @echo TEST \n" |
25 | 25 | ||
26 | FILE=__parse.fstab | 26 | FILE=__parse |
27 | cat >$FILE <<EOF | 27 | cat >$FILE <<EOF |
28 | # | 28 | # |
29 | # Device Point System Options | 29 | # Device Point System Options |
@@ -59,6 +59,47 @@ testing "polluted fstab" \ | |||
59 | "`cat $FILE.res`\n" \ | 59 | "`cat $FILE.res`\n" \ |
60 | "" \ | 60 | "" \ |
61 | "" | 61 | "" |
62 | cp ../examples/inittab $FILE | ||
63 | cat >$FILE.res <<EOF | ||
64 | [][][sysinit][/etc/init.d/rcS] | ||
65 | [][][askfirst][-/bin/sh] | ||
66 | [tty2][][askfirst][-/bin/sh] | ||
67 | [tty3][][askfirst][-/bin/sh] | ||
68 | [tty4][][askfirst][-/bin/sh] | ||
69 | [tty4][][respawn][/sbin/getty 38400 tty5] | ||
70 | [tty5][][respawn][/sbin/getty 38400 tty6] | ||
71 | [][][restart][/sbin/init] | ||
72 | [][][ctrlaltdel][/sbin/reboot] | ||
73 | [][][shutdown][/bin/umount -a -r] | ||
74 | [][][shutdown][/sbin/swapoff -a] | ||
75 | EOF | ||
76 | |||
77 | testing "inittab from examples" \ | ||
78 | "parse -n 4 -m 4 -f $(($GREEDY+$NO_TRIM)) -d'#:' $FILE" \ | ||
79 | "`cat $FILE.res`\n" \ | ||
80 | "" \ | ||
81 | "" | ||
82 | |||
83 | cp ../examples/udhcp/udhcpd.conf $FILE | ||
84 | cat >$FILE.res <<EOF | ||
85 | [start][192.168.0.20] | ||
86 | [end][192.168.0.254] | ||
87 | [interface][eth0] | ||
88 | [opt][dns][192.168.10.2][192.168.10.10] | ||
89 | [option][subnet][255.255.255.0] | ||
90 | [opt][router][192.168.10.2] | ||
91 | [opt][wins][192.168.10.10] | ||
92 | [option][dns][129.219.13.81] | ||
93 | [option][domain][local] | ||
94 | [option][lease][864000] | ||
95 | EOF | ||
96 | |||
97 | testing "udhcpd.conf from examples" \ | ||
98 | "parse -n 127 $FILE" \ | ||
99 | "`cat $FILE.res`\n" \ | ||
100 | "" \ | ||
101 | "" | ||
102 | |||
62 | rm -f $FILE $FILE.res | 103 | rm -f $FILE $FILE.res |
63 | 104 | ||
64 | exit $FAILCOUNT | 105 | exit $FAILCOUNT |