chiark / gitweb /
Test suite: list-tests: Break out seddery()
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 25 Jul 2015 17:53:32 +0000 (18:53 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 25 Jul 2015 17:53:32 +0000 (18:53 +0100)
tests/list-tests

index d0582f6..3381dbf 100755 (executable)
@@ -69,13 +69,18 @@ finish-gencontrol () {
        done
 }
 
+seddery () {
+       local seddery=$1
+       sed <$t -n '
+               20q;
+               /^: t-list-tests-end$/q;
+               '"$seddery"'
+       '
+}
+
 for t in $(run-parts --list tests/tests); do
        test-begin-$mode
-       for r in $(sed <$t -n '
-               20q;
-               /^: t-list-tests-end$/q;                
-               s/^t-restrict //p
-       '); do
+       for r in $(seddery 's/^t-restrict //p'); do
                restriction-$mode
        done
        test-done-$mode