diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-03-29 17:26:10 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-03-29 17:26:10 +0000 |
commit | f2f3868e0d69c586d395dc9187e0ca99d5e47880 (patch) | |
tree | 213a441d3d61141d473e9a357f02378126978df4 /testsuite/mdev.tests | |
parent | aa8a601084f7f0fc74fc561e12b42f8d7e3a6fe9 (diff) | |
download | busybox-w32-f2f3868e0d69c586d395dc9187e0ca99d5e47880.tar.gz busybox-w32-f2f3868e0d69c586d395dc9187e0ca99d5e47880.tar.bz2 busybox-w32-f2f3868e0d69c586d395dc9187e0ca99d5e47880.zip |
mdev: optional support for regex pattern group substitution.
+142 bytes.
Diffstat (limited to 'testsuite/mdev.tests')
-rwxr-xr-x | testsuite/mdev.tests | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/testsuite/mdev.tests b/testsuite/mdev.tests index 777c5c540..81c440d1f 100755 --- a/testsuite/mdev.tests +++ b/testsuite/mdev.tests | |||
@@ -76,6 +76,23 @@ br--r--r-- 1 0 0 sda | |||
76 | " \ | 76 | " \ |
77 | "" "" | 77 | "" "" |
78 | 78 | ||
79 | # continuing to use directory structure from prev test | ||
80 | rm -rf mdev.testdir/dev/* | ||
81 | # here we complicate things by having non-matching group 1 and using %0 | ||
82 | echo "s([0-9])*d([a-z]+) 0:0 644 >sd/%2_%0" >mdev.testdir/etc/mdev.conf | ||
83 | testing "mdev regexp substring match + replace" \ | ||
84 | "env - ACTION=add DEVPATH=/block/sda chroot mdev.testdir /mdev 2>&1; | ||
85 | ls -lnR mdev.testdir/dev | $FILTER_LS2" \ | ||
86 | "\ | ||
87 | mdev.testdir/dev: | ||
88 | drwxr-xr-x 2 0 0 sd | ||
89 | lrwxrwxrwx 1 0 0 sda -> sd/a_sda | ||
90 | |||
91 | mdev.testdir/dev/sd: | ||
92 | brw-r--r-- 1 0 0 a_sda | ||
93 | " \ | ||
94 | "" "" | ||
95 | |||
79 | # clean up | 96 | # clean up |
80 | rm -rf mdev.testdir | 97 | rm -rf mdev.testdir |
81 | 98 | ||