]> git.neil.brown.name Git - edlib.git/commitdiff
tests: Allow extra data files to be used in tests.
authorNeilBrown <neil@brown.name>
Sun, 20 Aug 2023 01:21:24 +0000 (11:21 +1000)
committerNeilBrown <neil@brown.name>
Sun, 20 Aug 2023 22:47:14 +0000 (08:47 +1000)
Only files in tests.d that start with a digit are now considered to be
tests.
Other files are copied into DOC/extra in the test area for tests to
examine.
I put it DOC so that most tests don't see the extra entry in a directory
and so don't need to be changed.  Only 02-presenter looks in DOC

Signed-off-by: NeilBrown <neil@brown.name>
tests
tests.d/02-presenter
tests.d/D-test-markup [new file with mode: 0644]

diff --git a/tests b/tests
index 1d326b9ce405489cab2adcbf456888d64fd982fb..a6751b151e98b2a57ccad7620cc57921b97d734a 100755 (executable)
--- a/tests
+++ b/tests
@@ -54,6 +54,7 @@ cmd=$0
 
 setup_test_dir() {
     if [ -d $TEST_DIR -a -d $TEST_DIR/.git ]; then
+        rm -rf $TEST_DIR/DOC/extra
        (cd $TEST_DIR ; git reset > /dev/null --hard $TEST_COMMIT ;
         git clean -fxd; git config core.abbrev 12 )
     else
@@ -61,6 +62,9 @@ setup_test_dir() {
        git clone . $TEST_DIR
        (cd $TEST_DIR ; git reset --hard $TEST_COMMIT; git config core.abbrev 12 )
     fi
+    rm -rf $TEST_DIR/DOC/extra
+    mkdir -p $TEST_DIR/DOC/extra
+    cp -a tests.d/[A-Za-z]* $TEST_DIR/DOC/extra
 }
 
 new_test() {
@@ -154,7 +158,7 @@ run_tests() {
     fi
     exit_code=0
     if [ $# -eq 0 ]; then
-       for f in tests.d/[A-Za-z0-9]*; do
+       for f in tests.d/[0-9]*; do
            b=${f#tests.d/}
            run_one_test "$b"
            if [ $exit_code -gt 0 ]; then
@@ -167,7 +171,7 @@ run_tests() {
            fi
        done
     elif [ " $1" = " -a" ]; then
-       for f in tests.d/[A-Za-z0-9]*; do
+       for f in tests.d/[0-9]*; do
            b=${f#tests.d/}
            run_one_test "$b"
        done
@@ -217,7 +221,7 @@ refresh_tests() {
           exit 1
     esac
     if [ -z "$tst" ]; then
-       for f in tests.d/[A-Za-z0-9]*; do
+       for f in tests.d/[0-9]*; do
            $cmd ${f#tests.d/}
        done
     else
index 91978a4fdcd66f71aa3221b3835b877ff2723455..f3dbc6c2332a162c060fbdf44a2b139db773f616 100644 (file)
@@ -10,15 +10,17 @@ Display 80,30 925108ADC87348A8D1CC11B39F619ACB 1,5
 Key ":C-N"
 Display 80,30 F25140E52559ED5E1CEF921A1FC28D19 1,6
 Key "-f"
-Display 80,30 7C618D2F52634A6E6FBE7E68819256A5 1,1
+Display 80,30 FC7B06F64F5B35EC2F5750318B58A56A 1,1
 Key ":C-N"
-Display 80,30 AC754AF84B643BFC79DE7973355E673F 1,2
+Display 80,30 5EF4C27CDF13CF852390132548B733F6 1,2
 Key ":C-N"
-Display 80,30 EB925ACF79B3C0D694BD69336D1F8877 1,3
+Display 80,30 5286FEEBD93C3F6173199218705B5B83 1,3
 Key ":C-N"
-Display 80,30 459D58275BD7727E8A16026FC4D0845A 1,4
+Display 80,30 9C9699AAA99BA13EEEDEA6F505215F39 1,4
 Key ":C-N"
-Display 80,30 C9050D404F11C08E581DB997D6FF625E 1,5
+Display 80,30 88EB319122A75426FD274B5FBC540FE7 1,5
+Key ":C-N"
+Display 80,30 7B9A4DB90A32DBF4B529BC5E04D7F158 1,6
 Key "-f"
 Display 80,30 38D1FE900BF3AE9C2C0F9AE7C6A777A5 1,1
 Key ":C-N"
@@ -221,4 +223,4 @@ Key ":C-X"
 Display 80,30 136AE3FD2089F71E23116BE983A85809 41,13
 Key ":C-C"
 Display 80,30 4C8C49A4BE2FC772B2C13E69D8E443FF 41,13
-Close 1440
+Close 1444
diff --git a/tests.d/D-test-markup b/tests.d/D-test-markup
new file mode 100644 (file)
index 0000000..417534e
--- /dev/null
@@ -0,0 +1,2 @@
+<space-above:40,space-below:10,20,fg:blue,bg:yellow,center>This is my test file for markup</>
+<wrap-tail:,wrap-head:-),wrap-,right:400,left:70>Now is the time for all good men to come to the aid of the party</a>