summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorDenis Vlasenko2008-03-29 17:26:10 +0000
committerDenis Vlasenko2008-03-29 17:26:10 +0000
commitf2f3868e0d69c586d395dc9187e0ca99d5e47880 (patch)
tree213a441d3d61141d473e9a357f02378126978df4 /testsuite
parentaa8a601084f7f0fc74fc561e12b42f8d7e3a6fe9 (diff)
downloadbusybox-f2f3868e0d69c586d395dc9187e0ca99d5e47880.zip
busybox-f2f3868e0d69c586d395dc9187e0ca99d5e47880.tar.gz
mdev: optional support for regex pattern group substitution.
+142 bytes.
Diffstat (limited to 'testsuite')
-rwxr-xr-xtestsuite/mdev.tests17
1 files changed, 17 insertions, 0 deletions
diff --git a/testsuite/mdev.tests b/testsuite/mdev.tests
index 777c5c5..81c440d 100755
--- a/testsuite/mdev.tests
+++ b/testsuite/mdev.tests
@@ -76,6 +76,23 @@ br--r--r-- 1 0 0 sda
" \
"" ""
+# continuing to use directory structure from prev test
+rm -rf mdev.testdir/dev/*
+# here we complicate things by having non-matching group 1 and using %0
+echo "s([0-9])*d([a-z]+) 0:0 644 >sd/%2_%0" >mdev.testdir/etc/mdev.conf
+testing "mdev regexp substring match + replace" \
+ "env - ACTION=add DEVPATH=/block/sda chroot mdev.testdir /mdev 2>&1;
+ ls -lnR mdev.testdir/dev | $FILTER_LS2" \
+"\
+mdev.testdir/dev:
+drwxr-xr-x 2 0 0 sd
+lrwxrwxrwx 1 0 0 sda -> sd/a_sda
+
+mdev.testdir/dev/sd:
+brw-r--r-- 1 0 0 a_sda
+" \
+ "" ""
+
# clean up
rm -rf mdev.testdir