aboutsummaryrefslogtreecommitdiff
path: root/testsuite/parse.tests
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-07-20 17:50:58 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-07-20 17:50:58 +0000
commit9b366f41367f717d8ddd9909fdc710b92f92a16c (patch)
tree8f84f7271f312b8658e0443ea723c20fcd1eb36f /testsuite/parse.tests
parenta34f1ed737e79e494904706e59f4e7fbb49e32b3 (diff)
downloadbusybox-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-xtestsuite/parse.tests43
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
26FILE=__parse.fstab 26FILE=__parse
27cat >$FILE <<EOF 27cat >$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 ""
62cp ../examples/inittab $FILE
63cat >$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]
75EOF
76
77testing "inittab from examples" \
78 "parse -n 4 -m 4 -f $(($GREEDY+$NO_TRIM)) -d'#:' $FILE" \
79 "`cat $FILE.res`\n" \
80 "" \
81 ""
82
83cp ../examples/udhcp/udhcpd.conf $FILE
84cat >$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]
95EOF
96
97testing "udhcpd.conf from examples" \
98 "parse -n 127 $FILE" \
99 "`cat $FILE.res`\n" \
100 "" \
101 ""
102
62rm -f $FILE $FILE.res 103rm -f $FILE $FILE.res
63 104
64exit $FAILCOUNT 105exit $FAILCOUNT